WS90 Signal Strength And Battery Status

513 views
Skip to first unread message

weewx-user

unread,
Jun 21, 2023, 11:09:31 AM6/21/23
to weewx-user
I am using a Ecowitt GW2000 with an WS90 outdoor sensor.


It is mostly setup as I would like it but for the life of me I can't get the WS90 signal strength or battery status to show up under sensors. This is what I have in the skin.conf

[Labels]

    # Override some labels. No need to identify these as a "Battery"
    # or "Voltage", because that is included in the template.
    [[Generic]]
        wh31_ch1_batt = Bedroom (WH31)
        wh31_ch2_batt = Loft (WH31)
        wh31_ch3_batt = Conservatory (WH31)
        ws90_batt = Main Sensor (WS90)
        wh57_batt = Lightning (WH57)
        ws90_sig = Main Sensor Signal (WS90)

Could someone give me some very simple (my skin set is quite low) pointers please.

weewx-user

unread,
Jun 21, 2023, 11:13:44 AM6/21/23
to weewx-user

Sorry SKILL SET is low!!!!

Rainer Lang

unread,
Jun 21, 2023, 1:03:02 PM6/21/23
to weewx...@googlegroups.com
Could you please send (attach as txt file) your whole skin.conf ?
The excerpt you show only means that certain sensor labels get a different name - it doesn't mean that these sensors are shown somewhere.

You have to understand how weewx works and what needs to be done for certain observations (sensor values) to appear in the Seasons skin.

a) current values are shown in the left hand side table - and are defined in the file current.inc which will be included into the index.html file
by the index.html.tmpl file when the report(s) are generated - there only something will be shown which is defined already in current.inc
if something hasn't been defined there, you will have to add it there

b) historical values (day, week, month, year) are generated from the data archived (written into the weewx database) at the end of each archiving cycle
(usually 300 seconds = 5 minutes).
Only the values for which a database field exists can be shown in the graphs or in the high/low table (under the current values).
Which database fields are available can be seen in the ws_extended.py database schema to be found under /usr/share/weewx/schemas *).
Observations/fields which are not in there cannot be shown. If you want to show them, you either have to extend the ws_extended database schema or use (=repurpose) an existing field which is not used by your sensors (see the field map in the gw1000 driver WiKi and compare to the ws_extended database schema). When repurposing an unused database field, you have to assign your wanted observation to that field - and when showing it in the report use the name of this repurposed field.
This must happen in weewx.conf in the [[StdCalibrate]] [[[Corrections]]] section.

In skin.conf you have to "activate" this/these field/s (new database field or repurposed field) by including it into the list of observations which are supposed to be shown.

My suggestion is that you print out for yourself the 4-5 files current.inc, hilo.inc. weewx.conf, skin.conf and index.html.tmpl (on separate pages) and see how they work together
weewx.conf --> skin.conf ---> index.html.tmpl (inluding current.inc and hilo.inc - and a few more not so relevant right now)
The report and image generators work these files in that sequence and create the reports based on these configuration files

Compare this with the result that your configuration files produce right now.
Then identify the lines where the observations (fields, variables) are mentioned are where the ones you want to have have to be added.
In the first step forget about the database and the pictures.
Just focus on the current values (current.inc) - they can be shown without having been saved before into the database.

Next step is to identify the place where the observations (fields, variables) have to be added in skin.conf and in index.html.tmpl
For them to be added the database fields need to exist (either new database column or repurposed database column/field)

This story is somewhat complex but without understanding what needs to be done where and why you will not succeed.
(or you explain what exactly you want to do and find someone who writes for you all the entries/lines to be added for your result to come up
and you just copy this into your configuration files and do the database extension or repurposing,
and/but you have no clue what was done and why - and next time you want to add something you find yourself in the same boat you are in now)

*) if you have a weewx installation via setup.py the path is different - see the basic weewx documentation for details (www.weewx.com)
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/db9e94d3-1fbf-4bb9-96da-3be8db8c1508n%40googlegroups.com.


weewx-user

unread,
Jun 21, 2023, 1:50:59 PM6/21/23
to weewx-user

Here is my skin.conf and sensors.inc - I would like Bothe the signal strength and battery status of the WS90 to appear in the sensors area 
skin.conf
sensors.inc
Screenshot 2023-06-21 at 6.49.21 pm.png

vince

unread,
Jun 21, 2023, 2:25:19 PM6/21/23
to weewx-user
I think I'd start by veryifying that the WS90 data you are looking for is in the weewx database to begin with. What weewx.sdb elements did you use to store the WS90 battery and signal strength in ?   How did you define that to happen ?

weewx-user

unread,
Jun 21, 2023, 2:54:17 PM6/21/23
to weewx-user
I have used the Ecowit Gateway Driver from here - https://github.com/gjr80/weewx-gw1000 and read the Wiki from here https://github.com/gjr80/weewx-gw1000/wiki and followed the steps as best I can (see my comments about my skin set before)

If I use PYTHONPATH=/usr/share/weewx python -m user.gw1000 --test-driver the following is returned 

Using configuration file /etc/weewx/weewx.conf

Interrogating GW2000 at 192.168.1.45:45000

2023-06-21 19:52:36 BST (1687373556): 'co2': '400', 'co2_24h_avg': '404', 'dateTime': '1687373556', 'daymaxwind': '5.8', 'dayRain': '0.0', 'extraHumid1': '48', 'extraHumid2': '36', 'extraHumid3': '41', 'extraHumid17': '58', 'extraTemp1': '26.4', 'extraTemp2': '33.4', 'extraTemp3': '28.0', 'extraTemp17': '24.8', 'inHumidity': '54', 'inTemp': '23.9', 'lightning_distance': '37', 'lightning_last_det_time': '1687271411', 'lightning_strike_count': 'None', 'lightningcount': '0', 'luminosity': '7120.0', 'monthRain': '30.5', 'outHumidity': '51', 'outTemp': '24.3', 'pm2_55': '2.1', 'pm2_55_24h_avg': '1.9', 'pm10': '2.6', 'pm10_24h_avg': '2.6', 'pressure': '1017.1', 'rain': 'None', 'rainRate': '0.0', 'relbarometer': '1017.1', 'stormRain': '0.0', 'usUnits': '17', 'UV': '0', 'uvradiation': '0.0', 'weekRain': '30.5', 'wh31_ch1_batt': '0', 'wh31_ch1_sig': '4', 'wh31_ch2_batt': '0', 'wh31_ch2_sig': '4', 'wh31_ch3_batt': '0', 'wh31_ch3_sig': '4', 'wh45_batt': '6', 'wh45_sig': '4', 'wh57_batt': '5', 'wh57_sig': '4', 'windDir': '205', 'windGust': '0.0', 'windSpeed': '0.0', 'ws90_batt': '3.22', 'ws90_sig': '3', 'yearRain': '261.2'

As you can see both the WS90 signal and battery strength are returned

Rainer Lang

unread,
Jun 21, 2023, 3:43:02 PM6/21/23
to weewx...@googlegroups.com

what the driver reads from the console and what is stored in the database are two completely different things.
You can display in the Seasons skin all these values as current values as long as they are used by index.html.tmpl and its inclusion files (*.inc).'
But stored in the database is only for what a respective standard field exists in the ws_extended database schema.
And everything else but the current values is displayed only when there is a corresponding (and addressed !) field in the database.
You better read my earlier mail closely ...

What you want can be done, but it's a bigger piece of work and also depends on what way of implementation you choose (database extension or repurposing).
And I'm not sure if someone here in the community is ready to do all this work for you. It's not just 2-3 lines and done.

You need to have some Linux and Python knowledge - and understand how weewx works - before you can make changes.

There are "readimade" weewx.conf, skin.conf etc. files available created by some enthousiastic developer which would meet your needs (covering all possible Ecowitt sensors and data which the Ecowitt Gateway driver reads including database extension etc.), but without a deeper understanding of how weewx works there is no point in throwing them "over the fence" *)

so "SKILL SET is low" is unfortunately not a good start, unless, as said earlier, someone is willing to do this job for you

*) if you still feel keen to work with them (including your contribution in getting more knowledgeable), send me a PM

--
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+...@googlegroups.com.

vince

unread,
Jun 21, 2023, 5:05:18 PM6/21/23
to weewx-user
On Wednesday, June 21, 2023 at 11:54:17 AM UTC-7 weewx-user wrote:
I have used the Ecowit Gateway Driver from here - https://github.com/gjr80/weewx-gw1000 and read the Wiki from here https://github.com/gjr80/weewx-gw1000/wiki and followed the steps as best I can (see my comments about my skin set before)

If I use PYTHONPATH=/usr/share/weewx python -m user.gw1000 --test-driver the following is returned 

Using configuration file /etc/weewx/weewx.conf

Interrogating GW2000 at 192.168.1.45:45000

2023-06-21 19:52:36 BST (1687373556): 'co2': '400', 'co2_24h_avg': '404', 'dateTime': '1687373556', 'daymaxwind': '5.8', 'dayRain': '0.0', 'extraHumid1': '48', 'extraHumid2': '36', 'extraHumid3': '41', 'extraHumid17': '58', 'extraTemp1': '26.4', 'extraTemp2': '33.4', 'extraTemp3': '28.0', 'extraTemp17': '24.8', 'inHumidity': '54', 'inTemp': '23.9', 'lightning_distance': '37', 'lightning_last_det_time': '1687271411', 'lightning_strike_count': 'None', 'lightningcount': '0', 'luminosity': '7120.0', 'monthRain': '30.5', 'outHumidity': '51', 'outTemp': '24.3', 'pm2_55': '2.1', 'pm2_55_24h_avg': '1.9', 'pm10': '2.6', 'pm10_24h_avg': '2.6', 'pressure': '1017.1', 'rain': 'None', 'rainRate': '0.0', 'relbarometer': '1017.1', 'stormRain': '0.0', 'usUnits': '17', 'UV': '0', 'uvradiation': '0.0', 'weekRain': '30.5', 'wh31_ch1_batt': '0', 'wh31_ch1_sig': '4', 'wh31_ch2_batt': '0', 'wh31_ch2_sig': '4', 'wh31_ch3_batt': '0', 'wh31_ch3_sig': '4', 'wh45_batt': '6', 'wh45_sig': '4', 'wh57_batt': '5', 'wh57_sig': '4', 'windDir': '205', 'windGust': '0.0', 'windSpeed': '0.0', 'ws90_batt': '3.22', 'ws90_sig': '3', 'yearRain': '261.2'

As you can see both the WS90 signal and battery strength are returned

Good.  Now we need to see the [GW1000] section of your weewx.conf to verify that wh90_sig and wh90_batt are actually saved to the database.  I suspect you did not do that part.

Reminder - you need to restart weewx after editing weewx.conf

This is my 'example' - I have a WH26 outside sensor, four WH31 inside sensors on channels 1-4, and one WH51 soil moisture sensor so I mapped them as follows to match my hardware.  You'd need to do something similar for your sensors.

[GW1000]
    [[field_map_extensions]]
        outTempBatteryStatus = wh26_batt
        batteryStatus1 = wh31_ch1_batt
        batteryStatus2 = wh31_ch2_batt
        batteryStatus3 = wh31_ch3_batt
        batteryStatus4 = wh31_ch4_batt
        batteryStatus8 = wh51_ch1_batt
 

gjr80

unread,
Jun 21, 2023, 5:57:41 PM6/21/23
to weewx-user
Or you can modify your database with wee_database and add fields wh31_ch1_batt, wh31_ch2_batt etc to the database schema. Utilising the existing batteryStatus1, batteryStatus2 fields is arguably simpler and quicker to implement, adding fields to the database arguably provide self evident names to the database fields and only involves use of wee_database and no modification of the field map.

At the end of the day if you want plots of battery state values you need to have the battery state data appear in loop packet fields that exist in the database - how you do that is a matter of personal preference (if you just want to display the current value there is no need to change the database or the field map just the skin config). 

Gary

vince

unread,
Jun 21, 2023, 9:11:58 PM6/21/23
to weewx-user
The reason I map things to existing fields is that it's upgrade proof.  If you extend the db then you need to remember to do that if you rebuild your system from scratch.  Same reason I do the edits in weewx.conf rather than skin.conf for the skin.  It keeps the skin upgrade proof.

gjr80

unread,
Jun 22, 2023, 4:21:02 AM6/22/23
to weewx-user
Absolutely, I just wanted to point out there is more than one way to skin the cat. I too have my skin customisations in weewx.conf and when I rebuild my system the current database goes with it so no problems there.

Gary

Reply all
Reply to author
Forward
0 new messages