How does battery and signal observation works/proccess?

54 views
Skip to first unread message

jmc...@gmail.com

unread,
Jan 16, 2021, 8:21:09 PM1/16/21
to weewx-user
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.



gjr80

unread,
Jan 17, 2021, 6:02:52 PM1/17/21
to weewx-user
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. 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 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

Jonis Maurin Ceará

unread,
Jan 17, 2021, 7:51:10 PM1/17/21
to weewx...@googlegroups.com
Tks Gary, helped a lot! 


--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/DvHT0iuXcqc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/37c346ae-73d1-482f-8246-35cce214c714n%40googlegroups.com.

Greg Troxel

unread,
Jan 17, 2021, 8:06:09 PM1/17/21
to jmc...@gmail.com, weewx-user

"jmc...@gmail.com" <jmc...@gmail.com> writes:

> For signal (signal1, signal2, etc..), I have link-quality (0-255) and dBm
> (negative values).

I don't mean to contradict anything already said, but it's good to
understand that dBm means dB relative to 1 mW (milliwatt, 10^-3 W),
which is the standard way to measure RF power. While calibration is
hard, it is entirely sensible for a receiver to measure signal strength
in dBm. As an example -30 dBm means 30 dB, which is 3 B, which is 10^3
= 1000 less than 1 mW, which means 1 uW. As a received signal strength
this is huge.

The smallest signal strength that works depends on the modulation and
data rate. A very rough notion of a minimally workable signal strength
might be -100 dBm. Take that with a huge grain of salt.

Also realize that much equipment isn't calibrated or close, so this is
all relative more than it should be. But typically, relative values
from the same receiver can be compared.

Some stations (Davis) report something that is more or less % of recent
transmission that were received. This is correlated with strength but
is fundamentally different. In RF data networking, what really matters
is if packets are received.
signature.asc
Reply all
Reply to author
Forward
0 new messages