Hi, Provided the battery status field concerned is in your database schema WeeWX just stores whatever values the driver emits in any xxxxBatteryStatus fields, so if your driver emits 0 or 1 or a number from 0 to 255 that is what WeeWX stores. How that data is presented then comes down to the skins/reports that you are using. If you are using the Seasons skin Seasons assumes that if xxxxBatteryStatus is 0 then the battery status is 'OK' otherwise it is considered 'low'. If your station/driver works differently eg 1 is 'OK' and 0 is 'low' or >= 75 is 'OK' and < 75 is 'low' then you will need to alter some of the logic in the relevant report template. In the case of the Seasons skin this is skins/Seasons/sensors.inc, in particular the internal get_battery_status() function which is defined starting at line 11.
Signal levels/states are similar but in this case you may need to make sure your driver emits signal status in fields that are included in your database schema, if the field names are different you will need to change the field/sensor mapping in the driver (if possible) or do some field name gymnastics in the StdCalibrate service <http://weewx.com/docs/usersguide.htm#StdCalibrate>. The Seasons skin does not include any code to display any of the signal fields, you will need to add this yourself to sensors.inc (the xxxxBatteryStatus HTML template code should give you some clues as to what to do/include). The other complicating factor here is that if your signal fields are dB then you will need to tell WeeWX this in order to make use of the formatting/conversion capabilities of the WeeWX report tags, otherwise WeeWX will treat the signal fields as just plain numbers (you could not bother but you will then be responsible for all formatting yourself). You might want to have a look at this thread <https://groups.google.com/g/weewx-user/c/f15v4Tc1kNI/m/XM14E2pPCAAJ> where I helped someone with similar requirements. In particular, look at the final sensors.inc (posted as sensors.txt) and the additions to skins/Seasons/skin.conf and user/extensions.py. Gary On Sunday, 17 January 2021 at 11:21:09 UTC+10 [email protected] wrote: > Hi! > How does these two observations works? > I mean: for battery, I have "0-100" (%) for "inTempBatteryStatus" > field.....but in reports page, I'm getting "LOW". > > For signal (signal1, signal2, etc..), I have link-quality (0-255) and dBm > (negative values). I'm not using any right now, but I would like to > use....I just don't know how it is proccesed/displayed. > > > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/37c346ae-73d1-482f-8246-35cce214c714n%40googlegroups.com.
