StdConvert issue?

108 views
Skip to first unread message

olivier...@gmail.com

unread,
Jan 18, 2018, 5:36:01 PM1/18/18
to weewx-user
Hello,

Just a bit of background: I currently have a VP2 and I recently bought a WS3000 with 8 sensors to monitor the inside temperature in various places. What I would like to do is to store all the data in the same database. My goal is to enhance each VP2 record with the temperature coming from the WS3000.

I found absolutely everything I needed to do this in the documentation, so congrats, you did a really great job documenting weewx and the possibilities of this tool are just amazing. I love it!

Anyway, here is what I did:
- rewrote a brand new driver for the WS3000, which works with the standard weewx code (no need to use the USB branch).
- created a small service that gets the current sensor values from the WS3000 and adds them to each new record (and loop packet as well).
- modified the database schema to include extraTemp1 to 8 and extraHumid1 to 8, to store the data from the WS3000.

This all seems to work quite well (so far tested with the Simulator only), except for a weird problem: all the temperature are properly converted to the appropriate metrics, except for extraTemp8.
Is there some kind of limit to the number of values that get converted with StdConvert?

NOTE: WS3000 reports temperature in °C. I modified the Simulator to do the same, but I store the values in the database using °F.

Any clue on what's wrong?

Here is a typical loop packet:
LOOP:   2018-01-18 23:32:07 CET (1516314727) altimeter: None, appTemp: 106.743627453, barometer: None, cloudbase: 1601.11136389, dateTime: 1516314727, dewpoint: 83.6206936222, extraHumid1: 47, extraHumid2: 46, extraHumid3: 48, extraHumid4: 46, extraHumid5: 45, extraHumid6: 44, extraHumid7: 47, extraHumid8: 46, extraTemp1: 74.12, extraTemp2: 73.94, extraTemp3: 74.12, extraTemp4: 74.12, extraTemp5: 74.12, extraTemp6: 74.3, extraTemp7: 74.3, extraTemp8: 23.6, heatindex: 115.825270834, humidex: 120.858219625, inDewpoint: None, inHumidity: 29.9996112567, inTemp: None, maxSolarRad: None, outHumidity: 79.9997084411, outTemp: 90.6655836233, pressure: None, radiation: 0, rain: 0.0, usUnits: 1, UV: 0, windchill: 90.6655836233, windDir: 359.998250647, windGust: 0.000130440063404, windGustDir: 359.998250647, windSpeed: 0.000108700052838

=> as you can see, extraTemp8 is still expressed in °C, while all the others are in °F.

Thanks!

PS: I attached all the files I am currently using:
- the WS3000 driver
- the data service
- my weewx.conf

add_ws3000_data.py
ws3000.py
ws3000db.py
weewx.conf

Thomas Keffer

unread,
Jan 18, 2018, 5:46:23 PM1/18/18
to weewx-user
There is indeed such a limit. The observation types extraTemp1 through extraTemp7 are defined, but anything beyond that, are not. It's very easy to add more. Put the following in user/extensions.py:

import weewx.units
weewx.units.obs_group_dict['extraTemp8'] = 'group_temperature'

That should be all you need.

-tk


--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

olivier...@gmail.com

unread,
Jan 19, 2018, 8:43:07 AM1/19/18
to weewx-user
OK, thanks, it's all working now.

I just need to do some clean up and figure out how to share all of this...
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
Message has been deleted

Ton vanN

unread,
Feb 9, 2020, 2:51:21 PM2/9/20
to weewx-user
Olivier,

Nice that it works with a Simulator, but how to make the next & final steps towards the real interface of the HP300x-console?

Have been trying with your proposed ideas in the WS3000-thread, but no luck.
Have stron feeling that in file weewx.conf the 'station'-section is the place to tune.
For comment my present layout (which does not work):

[HP3000]
   
# This section is for HP-3000 temperature/humidity sensors
   
   
# The model name such as Ambient WS-3000-X5
    model
= WS3000
   
   
# The driver to use
    driver
= user.hp3000

   
[[sensor_map]]
        inTemp
= t_1
        outTemp
= t_2
        extraTemp1
=
        extraTemp2
=
        extraTemp3
= t_3
        extraTemp4
= t_4
        extraTemp5
= t_5
        extraTemp6
= t_6
        extraTemp7
= t_7
        extraTemp8
= t_8
        inHumidity
= h_1
        outHumidity
= h_2
        extraHumid1
=
        extraHumid2
=
        extraHumid3
= h_3
        extraHumid4
= h_4
        extraHumid5
= h_5
        extraHumid6
= h_6
        extraHumid7
= h_7
        extraHumid8
= h_8

Is this a suitable approach, or a complete mistake?
Why? And what would be the correct solution?
Alternatively, what is a working practical setup to get this interface operational?

Most curious, Anton


Op donderdag 18 januari 2018 23:36:01 UTC+1 schreef olivier...@gmail.com:
Reply all
Reply to author
Forward
0 new messages