matthewwall / weewx-wh23xx Goto Github PK
View Code? Open in Web Editor NEWweewx driver for fine offset wh23xx hardware (tycon tp2700)
License: GNU General Public License v3.0
weewx driver for fine offset wh23xx hardware (tycon tp2700)
License: GNU General Public License v3.0
weewx-wh23xx Copyright 2016 Matthew Wall License: GPLv3 This is a weewx driver for Fine Offset WH23xx hardware. These stations are commonly available as Tycon TP2700 and Froggit WH4000 weather stations. Installation 0) install weewx, select 'Simulator' driver http://weewx.com/docs/usersguide.htm#installing 1) download the driver wget -O weewx-wh23xx.zip https://github.com/matthewwall/weewx-wh23xx/archive/master.zip 2) install the driver sudo wee_extension --install weewx-wh23xx.zip 3) configure the driver sudo wee_config --reconfigure 4) start weewx sudo /etc/init.d/weewx start
I think we have the answer to the FO 'UV' as to what it actually is. Firstly it seems that it has to be multiplied by 1000 to get the true (FO) UV value and the UVI is derived from that based on a standard table. I have crosschecked this against the output and it appears to be correct.
I contacted Alisa Huang from FO in China and they have been helpful and provided some details of their code and calculations relating to UV, attached below.
่ฝฌๅ: RE: WH2310 USB output data
FO-UV.txt
Is it possible to add the driver version # to the debug info generated in Syslog?
I had frequently get_current errors in my log file, although after some failures it succeed to download the current record.
I now found out that the problems seems to be the line
while len(tmp) < record_size and cnt < max_cnt:
in _read_record.
I corrected it to
while len(tmp) <= record_size and cnt < max_cnt:
which resolved the problem.
Hello Matthew,
i have a weather station WS980, and it seems, it uses the same protocol like TP2700.
I want to implemet the protocol for myself and search for a documentation.
In your code you wrote:
Based on the protocol specified in "TP2700 EEPROM data structure" V1.0 with
serial number FOS-ENG-022-A for model WH2300, and "TP2700 PC Protocol".
Can you tell me, where this documentation is available?
A google search gets no hits.
Regards
Rainer
The driver somehow isn't being installed (files don't appear in driver folder and not available when using wee_config)
I got the following error, and weewx did seem to recover and restart itself but I then noticed some bad Solar Data right after. I have also seen similar errors and then bad rain data.
wh23xx: no mapping for item id 0x3b (0x7b) at index 9 of 01 02 58 02 02 16 03 01 7b 7b 7b 16 05 02 16 06 24 07 22 08 26 43 09 27 d4 0a 00 b4 0b 00 03 0c 00 07 0e 00 00 00 00 10 00 00 00 00 11 00 00 00 15 12 00 00 01 56 13 00 00 01 56 14 00 00 01 56 15 00 00 82 dc 16 00 63 17 01 (len=74)
weewx[32415]: engine: Caught WeeWxIOError: no mapping for id 0x3b
engine: Caught WeeWxIOError: read_record: missing READ_RECORD: 0x3b != 0x04
Also have gotten this error.
wh23xx: no mapping for item id 0x33 (0xb3) at index 25 of 01 02 67 02 01 b4 03 01 a7 04 01 b4 05 01 b4 06 22 07 5b 08 26 22 09 27 b3 b3 00 2d 0b 00 00 0c 00 07 0e 00 00 00 00 10 00 00 00 00 11 00 00 00 15 12 00 00 01 56 13 00 00 01 56 14 00 00 01 56 15 00 00 00 00 16 00 00 17 00 (len=74)
engine: Shutting down StdReport thread
engine: Caught WeeWxIOError: no mapping for id 0x33
This weather station is a POS actually, think I'm going to return it, but figured I'd show this error.
There seems to be an anomaly with Fine Offset producing 3 values of light namely UVI, UV and Light - the latter as LUX light value. UVI displays correctly although it comes under the label of UV on the Weeewx HTML page. The problem is that the UV value (which is around 3.5 on sunny day) seems to be used directly by Weevx as solar radiation in w/m2 and this can also be seen incorrectly on the wunderground upload as well. I think the solar radiation should be the 'Light' LUX value which is then multiplied by the 0.0079 constant standard to produce the correct w/m2. Log attached.
wh2310-snippet.txt
Weewx version 4.0 was refactored and the log_trackback method was moved from the weeutil module to log module.
Line 255: from weeutil.weeutil import timestamp_to_string, log_traceback
causes an fatal error and weewx daemon closes.
should be:
from weeutil.weeutil import timestamp_to_string
from weeutil.log import log_traceback
instead of:
from weeutil.weeutil import timestamp_to_string, log_traceback
Busted on Buster - I can't get it to work with the new Buster Deb which I had to switch to in order to upgrade the OpenSSL. Tried it with Weewx 4.1 including the upgrades to log_trackback and with my original Weewx 3.6.2 . Weewx just sits there occasionally showing some meaningless spurious data. Any chance of taking a look Matthew or maybe some pointers to try?
It appears that when the Solar Sensors go offline this driver crashes weewx with the following error.
No other sensors went offline at the time. I got the solar sensor back up and everything started working again. Unsure what would happen if any of the other sensors went down. I wonder if there can be any error handling added to avoid the crash.
Traceback (most recent call last):
File "/usr/bin/weewxd", line 64, in
weewx.engine.main(options, args)
File "/usr/share/weewx/weewx/engine.py", line 847, in main
engine.run()
File "/usr/share/weewx/weewx/engine.py", line 186, in run
for packet in self.console.genLoopPackets():
File "/usr/share/weewx/user/wh23xx.py", line 421, in genLoopPackets
packet = self._data_to_packet(decoded)
File "/usr/share/weewx/user/wh23xx.py", line 469, in _data_to_packet
pkt['radiation'] = pkt['luminosity'] * LUMINOSITY_TO_RADIATION
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
Here is the last data point before the crash:
LOOP: 2017-01-23 18:45:00 GST (1485222300) altimeter: 29.7772633607, appTemp: 53.6055562095, barometer: 29.7948270007, cloudbase: 1543.95712939, dateTime: 1485222300, dewpoint: 51.6653886307, heatindex: 53.06, humidex: 56.1517736111, inDewpoint: 47.1926169982, inHumidity: 38, inTemp: 74.48, luminosity: 0.0, maxSolarRad: None, outHumidity: 95, outTemp: 53.06, outTempDay: None, outTempNight: 53.06, pressure: 28.4875789413, radiation: 0.0, rain: 0.0, rainRate: 0, usUnits: 1, UV: 0, uv_raw: 0, windchill: 53.06, windDir: None, windGust: 0.0, windGustDir: None, windSpeed: 0.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.