the driver only collects the data provided by the gateway API - and if
you have created corresponding fields and assignments, weewx stores this
data in the data base. That's it.
There is no further code as far as I am aware of.
Can you tell what exactly you want to do ?
Display the codes as human readable text e.g. in the current value table
(left side table) of the Seasons skin ?
If so, you could implement the logic (code) in e.g. current.inc which is
included into index.html.tmpl at report generation time.
Something like
#if $current.wh45_bat = 0
<tr>
<td class="label">$obs.label.wh45_bat</td>
<td class="data">OFF</td>
</tr>
#else if $current.wh45_bat = 1
<tr>
<td class="label">$obs.label.wh45_bat</td>
<td class="data">LOW</td>
</tr>
#else if $current.wh45_bat = 2
.............
#else
#endif
etc.
(there are more elegant versions by creating one or two internal
tables/arrays with the SET statement where you have defined all your
possible values against which you can then check in a loop, but the
above solution will also work)
On 14.08.2023 08:14, Daidl Himself wrote:
Hi,
I have the GW2000 with lots of sensors sattached, and grab the data
with the gw1000 driver. The Season skin is used to display the data.
adapting the database and the extension.py was successfull to write
the data in the database with a logical group assigned.
What I struggle with, is the logic for the Battery status for some
sensors. As mentioned in the wiki, the sensors give different values
for the status and might need to be individual configurated.
I have a wh45, that gives me values 0-5 for Battery use and a 6 for
external power. Where can I find the code to validate the staus as
"OK", "BAD"or "USB" and change it accordingly?
--
You received this message because you are subscribed to the Google
Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/00ee8aba-985b-4a0a-b5bf-2d2b35e226ffn%40googlegroups.com
<https://groups.google.com/d/msgid/weewx-user/00ee8aba-985b-4a0a-b5bf-2d2b35e226ffn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/8c4a3b87-315c-5945-61ef-a387d62dbd6f%40gmail.com.