Connecting HP1000 tp weewx direct Mode

813 views
Skip to first unread message

kaiman

unread,
Apr 18, 2016, 5:39:32 AM4/18/16
to weewx-user
Hello,

i just tried to get a HP1000 connected to weewx.

i installed the deb packet on my ubuntu computer and installed the observerIP extenstion (ver 0.5)

i want to talk to the hp1000 directly w/out redirecting the WU update.

every time i start weewx i get this error:

 Apr 18 11:13:49 xxx weewx[563]: engine: Initializing weewx version 3.5.0
Apr 18 11:13:49 xxx weewx[563]: engine: Using Python 2.7.3 (default, Jun 22 2015, 19:33:41) #012[GCC 4.6.3]
Apr 18 11:13:49 xxx weewx[563]: engine: Platform Linux-3.2.0-84-generic-x86_64-with-Ubuntu-12.04-precise
Apr 18 11:13:49 xxx weewx[563]: engine: pid file is /var/run/weewx.pid
Apr 18 11:13:49 xxx weewx[567]: engine: Using configuration file /etc/weewx/weewx.conf
Apr 18 11:13:49 xxx weewx[567]: engine: Loading station type ObserverIP (user.observerip)
Apr 18 11:13:49 xxx weewx[567]: observerip: version is 0.5mw
Apr 18 11:13:51 xxx weewx[567]: observerip: socket timeout 1 of 5
Apr 18 11:13:55 xxx weewx[567]: observerip: socket timeout 2 of 5
Apr 18 11:13:59 xxx weewx[567]: observerip: socket timeout 3 of 5
Apr 18 11:14:03 xxx weewx[567]: observerip: socket timeout 4 of 5
Apr 18 11:14:07 xxx weewx[567]: observerip: socket timeout 5 of 5
Apr 18 11:14:09 xxx weewx[567]: observerip: probe failed after 5 tries
Apr 18 11:14:09 xxx weewx[567]: engine: Unable to load driver: ObserverIP network probe failed
Apr 18 11:14:09 xxx weewx[567]:     ****  Exiting...

How can i check what is going wrong?
any idea?

kaiman

mwall

unread,
Apr 18, 2016, 5:59:27 AM4/18/16
to weewx-user
On Monday, April 18, 2016 at 5:39:32 AM UTC-4, kaiman wrote:
 Apr 18 11:13:49 xxx weewx[563]: engine: Initializing weewx version 3.5.0
Apr 18 11:13:49 xxx weewx[563]: engine: Using Python 2.7.3 (default, Jun 22 2015, 19:33:41) #012[GCC 4.6.3]
Apr 18 11:13:49 xxx weewx[563]: engine: Platform Linux-3.2.0-84-generic-x86_64-with-Ubuntu-12.04-precise
Apr 18 11:13:49 xxx weewx[563]: engine: pid file is /var/run/weewx.pid
Apr 18 11:13:49 xxx weewx[567]: engine: Using configuration file /etc/weewx/weewx.conf
Apr 18 11:13:49 xxx weewx[567]: engine: Loading station type ObserverIP (user.observerip)
Apr 18 11:13:49 xxx weewx[567]: observerip: version is 0.5mw
Apr 18 11:13:51 xxx weewx[567]: observerip: socket timeout 1 of 5
Apr 18 11:13:55 xxx weewx[567]: observerip: socket timeout 2 of 5
Apr 18 11:13:59 xxx weewx[567]: observerip: socket timeout 3 of 5
Apr 18 11:14:03 xxx weewx[567]: observerip: socket timeout 4 of 5
Apr 18 11:14:07 xxx weewx[567]: observerip: socket timeout 5 of 5
Apr 18 11:14:09 xxx weewx[567]: observerip: probe failed after 5 tries
Apr 18 11:14:09 xxx weewx[567]: engine: Unable to load driver: ObserverIP network probe failed
Apr 18 11:14:09 xxx weewx[567]:     ****  Exiting...

How can i check what is going wrong?
any idea?

is the observerip on the same network segment as the computer on which weewx is running?

what happens when you put the address of the observerip in the config:

[ObserverIP]
    hostname = 1.2.3.4

it looks like not all versions of the firmware respond the same way to the broadcasts that the observerip driver uses to find the station.  it would be helpful if you could post your firmware version and oem branding as well.  see this thread for some details:

https://groups.google.com/forum/#!topic/weewx-user/dTQRfttXnIs

fwiw, the 'direct' mode is an html screen scraper, and the 'indirect' mode reads data from a separate process that sniffs network traffic.

pat o'brien did a simplified version of the screen scraper approach here:

https://github.com/poblabs/weewx-ObserverIP

m

kaiman

unread,
Apr 18, 2016, 6:16:08 AM4/18/16
to weewx-user
Hi

SWVERSION
HP1001

V2.2.2


I also tried  https://github.com/poblabs/weewx-ObserverIP ; but when i try to start weewx, after i copied the observerip.py and modifying the conf

engine: Unable to load driver: float() argument must be a string or a number


mwall

unread,
Apr 18, 2016, 6:26:04 AM4/18/16
to weewx-user
On Monday, April 18, 2016 at 6:16:08 AM UTC-4, kaiman wrote:
I also tried  https://github.com/poblabs/weewx-ObserverIP ; but when i try to start weewx, after i copied the observerip.py and modifying the conf

engine: Unable to load driver: float() argument must be a string or a number

that's easy.  either change line 28 from this:

        self.loop_interval = float(stn_dict.get('loop_interval'))

to this:

        self
.loop_interval = float(stn_dict.get('loop_interval', 10.0))

or put this in your weewx.conf:

[ObserverIP]
    loop_interval = 10.0

m

kaiman

unread,
Apr 18, 2016, 6:50:11 AM4/18/16
to weewx-user
Hi
thx the error is gone;

but i think my station is not sending the data ;(

ObserverIP driver had an error yielding data packet to weewx.
ObserverIP driver couldn't access the livedata.htm webpage.
Apr 18 12:42:29 xxx weewx[3676]: Error caught was: HTTPConnectionPool(host='None', port=80): Max retries exceeded with url: /livedata.htm (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x2c120d0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Apr 18 12:42:29 xxx weewx[3676]: ObserverIP driver had an error yielding data packet to weewx.
Apr 18 12:42:29 xxx weewx[3676]: Error caught was: local variable 'outTemp' referenced before assignment
Apr 18 12:42:44 xxx weewx[3676]: ObserverIP driver couldn't access the livedata.htm webpage.
Apr 18 12:42:44 xxx weewx[3676]: Error caught was: HTTPConnectionPool(host='None', port=80): Max retries exceeded with url: /livedata.htm (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x2c121d0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

I also tried to access the http://##ip##/livedata.htm but i got no response from the station.

now i am looking for another way ... perhaps i will try the indirect way ...
i can change the server to which the HP1001 should post the data ...

this is what i am currently do with FHEM ...

Will this work, when i use the ObserverIP Version 0.5 in indirect mode with an running apache on the weewx server with the weatherstation/updateweatherstation.php file ...

as i far as i understand this solution - i do not need to redirect anything about WU, because i can enter my lokal server in the HP1001 Unit as resporting server.

mwall

unread,
Apr 18, 2016, 7:18:24 AM4/18/16
to weewx-user
On Monday, April 18, 2016 at 6:50:11 AM UTC-4, kaiman wrote:
Hi
thx the error is gone;

but i think my station is not sending the data ;(

ObserverIP driver had an error yielding data packet to weewx.
ObserverIP driver couldn't access the livedata.htm webpage.
Apr 18 12:42:29 xxx weewx[3676]: Error caught was: HTTPConnectionPool(host='None', port=80): Max retries exceeded with url: /livedata.htm (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x2c120d0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Apr 18 12:42:29 xxx weewx[3676]: ObserverIP driver had an error yielding data packet to weewx.
Apr 18 12:42:29 xxx weewx[3676]: Error caught was: local variable 'outTemp' referenced before assignment
Apr 18 12:42:44 xxx weewx[3676]: ObserverIP driver couldn't access the livedata.htm webpage.
Apr 18 12:42:44 xxx weewx[3676]: Error caught was: HTTPConnectionPool(host='None', port=80): Max retries exceeded with url: /livedata.htm (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x2c121d0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

I also tried to access the http://##ip##/livedata.htm but i got no response from the station.

interesting.  so apparently not every observerip has a web server?

 
now i am looking for another way ... perhaps i will try the indirect way ...
i can change the server to which the HP1001 should post the data ...

this is what i am currently do with FHEM ...

Will this work, when i use the ObserverIP Version 0.5 in indirect mode with an running apache on the weewx server with the weatherstation/updateweatherstation.php file ...

unfortunately no - it parses a file made by a process that sniffs the traffic.  so it will not understand direct communication from the observerip.
 
as i far as i understand this solution - i do not need to redirect anything about WU, because i can enter my lokal server in the HP1001 Unit as resporting server.

ah, you must have the european version.

try using the interceptor extension:

https://github.com/matthewwall/weewx-interceptor

and set the device_type to observerip and port to 80:

[Interceptor]
    device_type = observerip
    port = 80

then configure your observerip to send to the machine that is running weewx.

you also should have debug=1, at least until everything is working properly.

sorry there are so many variations of observerip code right now.  on the other hand, it is good to have many options :)

m

kaiman

unread,
Apr 18, 2016, 7:24:09 AM4/18/16
to weewx-user
I am confused ....

i changed in the weewx.conf from direct to indirect:

[ObserverIP]
    # This section is for the weewx ObserverIP driver
    # hostname - hostname or IP address of the ObserverIP, not required
    # mode determines the method for obtaining data from the station
    #      direct   - communicate directly with the station
    #      indirect - get station data from the CGI intermediary
    mode = indirect
    # poll_interval
    #   mode = direct   - The time (in seconds) between LOOP packets (should be 16)
    #   mode = indirect - Time to wait for new packet ( 17 is a good value)
    poll_interval = 16
    # dup_interval
    #   mode = direct   - time to wait if there is an error getting a packet
    #   mode = indirect - subsequent time to wait if new packet has not arived after poll_interval
    dup_interval = 2
    # xferfile
    #   mode = direct   - unused
    #   mode = indirect - file where the CGI script puts the data from the observerip
    xferfile = /tmp/xfile
    # retry_wait - time to wait after failed network attempt
    # check_calibration - make sure the station calibration is as expected
    check_calibration = true
    # set_calibration - set calibration in station if it is not as expected
    #                   only meaningful if check_calibration is true
    set_calibration = false
    # The driver to use:
    driver = user.observerip
    # The calibration the driver expects from the station, only useful
    # if check_calibration is set. Items that are not set, are not checked.
    [[calibration]]
        RainGain = 1.00
        windDirOffset = 0
        inHumiOffset = 0
        AbsOffset = 0.00
        UVGain = 1.00
...

i also added the config part for the apache.

but when i start the weewx server i still get

observerip: version is 0.5mw
Apr 18 13:21:07 xx weewx[5535]: observerip: socket timeout 1 of 5
Apr 18 13:21:11 xx weewx[5535]: observerip: socket timeout 2 of 5
Apr 18 13:21:15 xx weewx[5535]: observerip: socket timeout 3 of 5
Apr 18 13:21:19 xx weewx[5535]: observerip: socket timeout 4 of 5
Apr 18 13:21:23 xx weewx[5535]: observerip: socket timeout 5 of 5
Apr 18 13:21:25 xx weewx[5535]: observerip: probe failed after 5 tries
Apr 18 13:21:25 xx weewx[5535]: engine: Unable to load driver: ObserverIP network probe failed


when i try to call the webpage manually http://IP/weatherstation/updateweatherstation.php

#!/bin/bash # This script is ment to run on a private network # There has been absolutly no thought give to security !!!! # Do not expose this to the outside world without looking at it first!!!!! xferfile=/tmp/xfile id= passwd= user_agent="Mozilla/4.0" barometeroffset=2.66 lastfile= intfile= seqfile= host=rtupdate.wunderground.com echo -en "Content-Type: text/html\r\n" echo -en "Date:" $(date -u +%a,\ %d\ %b\ %Y\ %H:%M:%S\ GMT) "\r\n" echo "" echo success [ -f $lastfile ] && lastpacket=$(cat $lastfile) || lastpacket=0 [ -f "$seqfile" ] && seqnum=$(cat $seqfile) || seqnum=0 seqnum=$[ $seqnum + 1 ] [ -n "$seqfile" ] && echo $seqnum > $seqfile [ -n "$seqfile" ] && echo "seqnum=$seqnum" >$xferfile || echo -n >>$xferfile data="$QUERY_STRING" while [ -n "$data" ] ; do item=${data%%\&*} var=${item%%=*} val=${item#*=} case $var in ID) [ -n "$id" ] && val="$id" [ -n "$req" ] && req="$req&$var=$val" || req="$var=$val" echo "$item" >> $xferfile ;; PASSWORD) [ -n "$passwd" ] && val="$passwd" [ -n "$req" ] && req="$req&$var=$val" || req="$var=$val" echo "$item" >> $xferfile ;; softwaretype) req="$req&$var=Baked%20logger%20v1.0" echo "$item" >> $xferfile ;; UV) tm=$(date +%H%M) if [ $tm -lt 1300 -o $tm -gt 1700 ] ; then req="$req&$item" fi echo "$item" >> $xferfile ;; dateutc) realutc=$(date -u +%Y-%m-%d%%20%H:%M:%S) # [ -n "$req" ] && req="$req&$item" || req="$item" [ -n "$req" ] && req="$req&dateutc=$realutc" || req="dateutc=$realutc" obsdate=$(echo $val | sed "s/\%20/ /") obsepoch=$(date -u -d "$obsdate" +%s) echo "realutc=$realutc" >> $xferfile echo "$item" >> $xferfile date +epoch=%s >> $xferfile echo "opoch=$obsepoch" >> $xferfile if [ -n "$lastfile" ] ; then packint=$[ $obsepoch - $lastpacket ] [ -n "$intfile" ] && echo $packint >> $intfile echo $obsepoch > $lastfile fi ;; rtfreq) # give the real frequency to wunderground [ -n "$req" ] && req="$req&rtfreq=16" || req="rtfreq=16" echo "$item" >> $xferfile ;; #barometer is set to station pressure, correct to sea level for wunderground baromin) cval=$( echo $val + $barometeroffset | bc ) [ -n "$req" ] && req="$req&$var=$cval" || req="$var=$cval" echo "$item" >> $xferfile ;; #dont send indoor readings to wunderground indoortempf) echo "$item" >> $xferfile ;; indoorhumidity) echo "$item" >> $xferfile ;; *) [ -n "$req" ] && req="$req&$item" || req="$item" echo "$item" >> $xferfile ;; esac newdata=${data#*\&} if [ "$newdata" = "$data" ] ; then data="" else data="$newdata" fi done echo "observerip=$REMOTE_ADDR" >> $xferfile if [ -n "$id" ] && [ -n "$passwd" ] ; then curl -s -m 2 -A ${user_agent} "http://$host/weatherstation/updateweatherstation.php?$req" > /dev/null fi # sample iptable command for destination NAT # iptables -t nat -I PREROUTING -i br-lan -s windy ! -d 192.168.0.0/16 -p tcp --dport 80 --to-destination 192.168.1.1

is this correct ?

mwall

unread,
Apr 18, 2016, 7:33:26 AM4/18/16
to weewx-user
On Monday, April 18, 2016 at 7:24:09 AM UTC-4, kaiman wrote:
when i try to call the webpage manually http://IP/weatherstation/updateweatherstation.php

#!/bin/bash # This script is ment to run on a private network # There has been absolutly no thought give to security !!!!

your web server is returning the raw php instead of interpreting it.  to fix it you would have to install php and configure apache execute updateweatherstation.php as a script.

in the indirect approach, the observerip sends to apache, apache passes it to php, php saves the data to file, then the observerip driver reads the data from file.

the weewx-interceptor receives the data directly from the observerip.

please try the weewx-interceptor first - there are fewer things to go wrong.  be sure to turn off apache - only one process can listen on port 80.

m

kaiman

unread,
Apr 18, 2016, 7:46:30 AM4/18/16
to weewx-user
Hello,

i installed the weewx-interceptor

and configured the conf: (i used 8881 because 80 is already used in this computer

[Interceptor]
    # This section is for the network traffic interceptor driver.
    device_type = observerip
    port = 8881 
    # The driver to use:
    driver = user.interceptor


when i try to start weewx:

Apr 18 13:44:35 xx weewx[6312]: engine: Loading station type Interceptor (user.interceptor)
Apr 18 13:44:35 xx weewx[6312]: interceptor: MainThread: driver version is 0.4
Apr 18 13:44:35 xx weewx[6312]: interceptor: MainThread: server will listen on :8881
Apr 18 13:44:35 xx weewx[6312]: interceptor: MainThread: sensor map: None
Apr 18 13:44:35 xx weewx[6312]: engine: Unable to load driver: an integer is required
Apr 18 13:44:35 xx weewx[6312]:     ****  Exiting...

mwall

unread,
Apr 18, 2016, 7:59:28 AM4/18/16
to weewx-user
On Monday, April 18, 2016 at 7:46:30 AM UTC-4, kaiman wrote:
when i try to start weewx:

Apr 18 13:44:35 xx weewx[6312]: engine: Loading station type Interceptor (user.interceptor)
Apr 18 13:44:35 xx weewx[6312]: interceptor: MainThread: driver version is 0.4
Apr 18 13:44:35 xx weewx[6312]: interceptor: MainThread: server will listen on :8881
Apr 18 13:44:35 xx weewx[6312]: interceptor: MainThread: sensor map: None
Apr 18 13:44:35 xx weewx[6312]: engine: Unable to load driver: an integer is required
Apr 18 13:44:35 xx weewx[6312]:     ****  Exiting...

ha! i made the same coding mistake that pat made.  in interceptor.py at line 745, change this:

        self._port = stn_dict.get('port', DEFAULT_PORT)

to this:

        self._port = int(stn_dict.get('port', DEFAULT_PORT))
 

kaiman

unread,
Apr 18, 2016, 12:51:42 PM4/18/16
to weewx-user
hi

i changed the entry in the HP1001 and i can see with nc -l 8881 that the station is posting its string:
GET /weatherstation/updateweatherstation.php?ID=xxxxxxxxx&PASSWORD=yyyyyyyyy&intemp=24.6&outtemp=14.4&dewpoint=-1.7&windchill=14.4&inhumi=37&outhumi=33&windspeed=0.0&windgust=0.0&winddir=229&absbaro=1004.9&relbaro=1028.8&rainrate=0.0&dailyrain=0.0&weeklyrain=10.5&monthlyrain=10.5&yearlyrain=10.5&light=10270.0&UV=213&dateutc=2016-4-18%2016:48:25&softwaretype=HP1001%20V2.2.2&action=updateraw&realtime=1&rtfreq=5 HTTP/1.0
 

but when i start weewx i get this:
Apr 18 18:50:28 xxx weewx[12913]: engine: Loading station type Interceptor (user.interceptor)
Apr 18 18:50:28 xxx weewx[12913]: interceptor: MainThread: driver version is 0.4
Apr 18 18:50:28 xxx weewx[12913]: interceptor: MainThread: server will listen on :8881
Apr 18 18:50:28 xxx weewx[12913]: interceptor: MainThread: sensor map: None
...
Apr 18 18:50:28 xxx weewx[12913]: engine: Station does not support reading the time
Apr 18 18:50:28 xxx weewx[12913]: engine: Starting main packet loop.
Apr 18 18:50:38 xxx weewx[12913]: interceptor: MainThread: empty queue

mwall

unread,
Apr 18, 2016, 5:56:55 PM4/18/16
to weewx-user

that looks ok.  you should see 'empty queue' as the driver waits for data from the station.  then at some point you should see messages about 'raw data', 'raw packet', and 'mapped packet' each time the station sends.  i think the observer sends every 5 minutes.

ah!  i think the observer does a GET not a POST

either insert this after the do_POST method in Consumer.Handler:

        def do_GET(self):
            data = str(self.path)
            logdbg('GET: %s' % data)
            Consumer.queue.put(data)
            response = bytes(self.get_response())
            self.send_response(200)
            self.send_header("Content-Length", str(len(response)))
            self.end_headers()
            self.wfile.write(response)

or download the latest interceptor from github.

https://github.com/matthewwall/weewx-interceptor/blob/master/bin/user/interceptor.py

m

mwall

unread,
Apr 18, 2016, 8:07:51 PM4/18/16
to weewx-user
On Monday, April 18, 2016 at 12:51:42 PM UTC-4, kaiman wrote:

kaiman,

please use the latest interceptor.py from github (commit e1dc27a)

in GET requests it uses the query string, not the entire path.

also, what response do you see from the server when your station contacts the internet server directly?  which server does it contact?

thank you,

m

kaiman

unread,
Apr 19, 2016, 12:47:26 AM4/19/16
to weewx-user
hi
thx
i used the latest version;

now data is received, but then weewx crashes:

Apr 19 06:42:35 x weewx[26911]: engine: Main loop exiting. Shutting engine down.
Apr 19 06:42:35 x weewx[26911]: interceptor: MainThread: shutting down server thread
Apr 19 06:42:35 x weewx[26911]: engine: Caught unrecoverable exception in engine:
Apr 19 06:42:35 x weewx[26911]:     ****  'indoortempf'
Apr 19 06:42:35 x weewx[26911]:     ****  Traceback (most recent call last):
Apr 19 06:42:35 x weewx[26911]:     ****    File "/usr/share/weewx/weewx/engine.py", line 859, in main
Apr 19 06:42:35 x weewx[26911]:     ****      engine.run()
Apr 19 06:42:35 x weewx[26911]:     ****    File "/usr/share/weewx/weewx/engine.py", line 182, in run
Apr 19 06:42:35 x weewx[26911]:     ****      for packet in self.console.genLoopPackets():
Apr 19 06:42:35 x weewx[26911]:     ****    File "/usr/share/weewx/user/interceptor.py", line 825, in genLoopPackets
Apr 19 06:42:35 x weewx[26911]:     ****      pkt = self._device.parser.parse(data)
Apr 19 06:42:35 x weewx[26911]:     ****    File "/usr/share/weewx/user/interceptor.py", line 410, in parse
Apr 19 06:42:35 x weewx[26911]:     ****      pkt['inTemp'] = self.decode_float(data['indoortempf'])
Apr 19 06:42:35 x weewx[26911]:     ****  KeyError: 'indoortempf'
Apr 19 06:42:35 x weewx[26911]:     ****  Exiting.

as far as i sends the station other variables :o
ans it send in metrics / C instead on us and F ...

ID=xxx&PASSWORD=yyy&intemp=22.8&outtemp=1.4&dewpoint=1.1&windchill=1.4&inhumi=36&outhumi=98&windspeed=0.0&windgust=0.0&winddir=193&absbaro=1009.5&relbaro=1033.4&rainrate=0.0&dailyrain=0.0&weeklyrain=10.5&monthlyrain=10.5&yearlyrain=10.5&light=1724.9&UV=38&dateutc=2016-4-19%204:42:35&softwaretype=HP1001%20V2.2.2&action=updateraw&realtime=1&rtfreq=5

mwall

unread,
Apr 19, 2016, 2:05:35 AM4/19/16
to weewx-user
On Tuesday, April 19, 2016 at 12:47:26 AM UTC-4, kaiman wrote:
as far as i sends the station other variables :o
ans it send in metrics / C instead on us and F ...

ID=xxx&PASSWORD=yyy&intemp=22.8&outtemp=1.4&dewpoint=1.1&windchill=1.4&inhumi=36&outhumi=98&windspeed=0.0&windgust=0.0&winddir=193&absbaro=1009.5&relbaro=1033.4&rainrate=0.0&dailyrain=0.0&weeklyrain=10.5&monthlyrain=10.5&yearlyrain=10.5&light=1724.9&UV=38&dateutc=2016-4-19%204:42:35&softwaretype=HP1001%20V2.2.2&action=updateraw&realtime=1&rtfreq=5

thanks for this.  we are very close now.  please try commit af2ac71 from github.

more things i need to know: what are the units of windspeed, and what are the units of dailyrain/weeklyrain/monthlyrain/yearlyrain?

also, what is your altitude?

it looks like 'light' is an approximation for solarradiation in W/m^2

m

kaiman

unread,
Apr 19, 2016, 2:18:37 AM4/19/16
to weewx-user
Hi,

new error:
Apr 19 08:11:23 xx weewx[5441]: interceptor: MainThread: unrecognized parameter weeklyrain=10.5
Apr 19 08:11:23 xx weewx[5441]: engine: Main loop exiting. Shutting engine down.
Apr 19 08:11:23 xx weewx[5441]: interceptor: MainThread: shutting down server thread
Apr 19 08:11:23 xx weewx[5441]: engine: Caught unrecoverable exception in engine:
Apr 19 08:11:23 xx weewx[5441]:     ****  global name 'decode_float' is not defined
Apr 19 08:11:23 xx weewx[5441]:     ****  Traceback (most recent call last):
Apr 19 08:11:23 xx weewx[5441]:     ****    File "/usr/share/weewx/weewx/engine.py", line 859, in main
Apr 19 08:11:23 xx weewx[5441]:     ****      engine.run()
Apr 19 08:11:23 xx weewx[5441]:     ****    File "/usr/share/weewx/weewx/engine.py", line 182, in run
Apr 19 08:11:23 xx weewx[5441]:     ****      for packet in self.console.genLoopPackets():
Apr 19 08:11:23 xx weewx[5441]:     ****    File "/usr/share/weewx/user/interceptor.py", line 853, in genLoopPackets
Apr 19 08:11:23 xx weewx[5441]:     ****      pkt = self._device.parser.parse(data)
Apr 19 08:11:23 xx weewx[5441]:     ****    File "/usr/share/weewx/user/interceptor.py", line 446, in parse
Apr 19 08:11:23 xx weewx[5441]:     ****      pkt[LABEL_MAP[n]] = decode_float(data[n])
Apr 19 08:11:23 xx weewx[5441]:     ****  NameError: global name 'decode_float' is not defined
Apr 19 08:11:23 xx weewx[5441]:     ****  Exiting.


more things i need to know: what are the units of windspeed, and what are the units of dailyrain/weeklyrain/monthlyrain/yearlyrain?

i have to check the units at home .. currently i am out.
i will post them as soon as i am back home (will be late this evening in about 10 hours)

also, what is your altitude? about 393 ft


mwall

unread,
Apr 19, 2016, 2:25:55 AM4/19/16
to weewx-user


On Tuesday, April 19, 2016 at 2:18:37 AM UTC-4, kaiman wrote:
Apr 19 08:11:23 xx weewx[5441]:     ****  NameError: global name 'decode_float' is not defined
Apr 19 08:11:23 xx weewx[5441]:     ****  Exiting.

fixed at commit 2aa7802
 

more things i need to know: what are the units of windspeed, and what are the units of dailyrain/weeklyrain/monthlyrain/yearlyrain?

i have to check the units at home .. currently i am out.
i will post them as soon as i am back home (will be late this evening in about 10 hours)

also, what is your altitude? about 393 ft

ok, let me know.

the rel pressure reading of 1033.4 seems a bit high.  given the outside temperature of 1.4C and absolute pressure of 1009.5mbar i would have expected about 1025mbar. but we'll see about that later.

m

kaiman

unread,
Apr 19, 2016, 2:43:26 AM4/19/16
to weewx-user
hi

new error
Apr 19 08:41:31 xx weewx[6099]:     ****  'usUnits'
Apr 19 08:41:31 xx weewx[6099]:     ****  Traceback (most recent call last):
Apr 19 08:41:31 xx weewx[6099]:     ****    File "/usr/share/weewx/weewx/engine.py", line 859, in main
Apr 19 08:41:31 xx weewx[6099]:     ****      engine.run()
Apr 19 08:41:31 xx weewx[6099]:     ****    File "/usr/share/weewx/weewx/engine.py", line 185, in run
Apr 19 08:41:31 xx weewx[6099]:     ****      self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Apr 19 08:41:31 xx weewx[6099]:     ****    File "/usr/share/weewx/weewx/engine.py", line 218, in dispatchEvent
Apr 19 08:41:31 xx weewx[6099]:     ****      callback(event)
Apr 19 08:41:31 xx weewx[6099]:     ****    File "/usr/share/weewx/weewx/engine.py", line 313, in new_loop_packet
Apr 19 08:41:31 xx weewx[6099]:     ****      if event.packet['usUnits'] == self.target_unit: return
Apr 19 08:41:31 xx weewx[6099]:     ****  KeyError: 'usUnits'
Apr 19 08:41:31 xx weewx[6099]:     ****  Exiting.

ok

mwall

unread,
Apr 19, 2016, 3:45:09 AM4/19/16
to weewx-user
On Tuesday, April 19, 2016 at 2:43:26 AM UTC-4, kaiman wrote:
Apr 19 08:41:31 xx weewx[6099]:     ****  KeyError: 'usUnits'
Apr 19 08:41:31 xx weewx[6099]:     ****  Exiting.

what messages do you see in the log just before this exception?  there should be a message about 'parse failed for ...'

m

kaiman

unread,
Apr 19, 2016, 3:55:47 AM4/19/16
to weewx-user
oh sry i forgot this part...

Apr 19 09:54:03 xx weewx[7594]: interceptor: MainThread: unrecognized parameter weeklyrain=10.5
Apr 19 09:54:03 xx weewx[7594]: interceptor: MainThread: parse failed for ID=xxxxx&PASSWORD=yyyyy&intemp=23.2&outtemp=10.1&dewpoint=2.0&windchill=10.1&inhumi=32&outhumi=57&windspeed=0.0&windgust=0.0&winddir=212&absbaro=1010.1&relbaro=1034.0&rainrate=0.0&dailyrain=0.0&weeklyrain=10.5&monthlyrain=10.5&yearlyrain=10.5&light=31892.0&UV=919&dateutc=2016-4-19%207:54:4&softwaretype=HP1001%20V2.2.2&action=updateraw&realtime=1&rtfreq=5: invalid literal for int() with base 10: '10.1'
Apr 19 09:54:03 xx weewx[7594]: interceptor: MainThread: raw packet: {'dateTime': 1461052444}
Apr 19 09:54:03 xx weewx[7594]: interceptor: MainThread: mapped packet: {'dateTime': 1461052444}
Apr 19 09:54:03 xx weewx[7594]: engine: Main loop exiting. Shutting engine down.
Apr 19 09:54:03 xx weewx[7594]: interceptor: MainThread: shutting down server thread
Apr 19 09:54:04 xx weewx[7594]: engine: Caught unrecoverable exception in engine:
Apr 19 09:54:04 xx weewx[7594]:     ****  'usUnits'
Apr 19 09:54:04 xx weewx[7594]:     ****  Traceback (most recent call last):
Apr 19 09:54:04 xx weewx[7594]:     ****    File "/usr/share/weewx/weewx/engine.py", line 859, in main
Apr 19 09:54:04 xx weewx[7594]:     ****      engine.run()
Apr 19 09:54:04 xx weewx[7594]:     ****    File "/usr/share/weewx/weewx/engine.py", line 185, in run
Apr 19 09:54:04 xx weewx[7594]:     ****      self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Apr 19 09:54:04 xx weewx[7594]:     ****    File "/usr/share/weewx/weewx/engine.py", line 218, in dispatchEvent
Apr 19 09:54:04 xx weewx[7594]:     ****      callback(event)
Apr 19 09:54:04 xx weewx[7594]:     ****    File "/usr/share/weewx/weewx/engine.py", line 313, in new_loop_packet
Apr 19 09:54:04 xx weewx[7594]:     ****      if event.packet['usUnits'] == self.target_unit: return
Apr 19 09:54:04 xx weewx[7594]:     ****  KeyError: 'usUnits'
Apr 19 09:54:04 xx weewx[7594]:     ****  Exiting.


mwall

unread,
Apr 19, 2016, 4:01:21 AM4/19/16
to weewx-user
On Tuesday, April 19, 2016 at 3:55:47 AM UTC-4, kaiman wrote:
Apr 19 09:54:04 xx weewx[7594]:     ****  KeyError: 'usUnits'
Apr 19 09:54:04 xx weewx[7594]:     ****  Exiting.

fixed at commit 665a38f
 

kaiman

unread,
Apr 19, 2016, 4:25:50 AM4/19/16
to weewx-user
got another error:

Apr 19 10:24:27 xx weewx[8271]: interceptor: MainThread: raw data: ID=xxxxxxx&PASSWORD=xxxxxx&intemp=23.4&outtemp=12.0&dewpoint=3.3&windchill=12.0&inhumi=32&outhumi=55&windspeed=0.4&windgust=1.1&winddir=197&absbaro=1010.2&relbaro=1034.1&rainrate=0.0&dailyrain=0.0&weeklyrain=10.5&monthlyrain=10.5&yearlyrain=10.5&light=40866.0&UV=869&dateutc=2016-4-19%208:24:28&softwaretype=HP1001%20V2.2.2&action=updateraw&realtime=1&rtfreq=5
Apr 19 10:24:27 xx weewx[8271]: interceptor: MainThread: unrecognized parameter weeklyrain=10.5
Apr 19 10:24:27 xx weewx[8271]: engine: Main loop exiting. Shutting engine down.
Apr 19 10:24:27 xx weewx[8271]: interceptor: MainThread: shutting down server thread
Apr 19 10:24:28 xx weewx[8271]: engine: Caught unrecoverable exception in engine:
Apr 19 10:24:28 xx weewx[8271]:     ****  global name 'LABEL_MAP' is not defined
Apr 19 10:24:28 xx weewx[8271]:     ****  Traceback (most recent call last):
Apr 19 10:24:28 xx weewx[8271]:     ****    File "/usr/share/weewx/weewx/engine.py", line 859, in main
Apr 19 10:24:28 xx weewx[8271]:     ****      engine.run()
Apr 19 10:24:28 xx weewx[8271]:     ****    File "/usr/share/weewx/weewx/engine.py", line 182, in run
Apr 19 10:24:28 xx weewx[8271]:     ****      for packet in self.console.genLoopPackets():
Apr 19 10:24:28 xx weewx[8271]:     ****    File "/usr/share/weewx/user/interceptor.py", line 853, in genLoopPackets
Apr 19 10:24:28 xx weewx[8271]:     ****      pkt = self._device.parser.parse(data)
Apr 19 10:24:28 xx weewx[8271]:     ****    File "/usr/share/weewx/user/interceptor.py", line 453, in parse
Apr 19 10:24:28 xx weewx[8271]:     ****      pkt[LABEL_MAP[n]] = self.decode_float(data[n])
Apr 19 10:24:28 xx weewx[8271]:     ****  NameError: global name 'LABEL_MAP' is not defined
Apr 19 10:24:28 xx weewx[8271]:     ****  Exiting.

mwall

unread,
Apr 19, 2016, 4:45:00 AM4/19/16
to weewx-user
On Tuesday, April 19, 2016 at 4:25:50 AM UTC-4, kaiman wrote:
got another error:

Apr 19 10:24:28 xx weewx[8271]:     ****  NameError: global name 'LABEL_MAP' is not defined
Apr 19 10:24:28 xx weewx[8271]:     ****  Exiting.

fixed at commit dd309a4

 

kaiman

unread,
Apr 19, 2016, 5:24:43 AM4/19/16
to weewx-user
hey it seems to work now ...

Thx for the excellent support!!

no errors occurred during startup and the first webpage was created.

i will post you the units for the mentioned values this evening ...
Message has been deleted

kaiman

unread,
Apr 20, 2016, 1:02:13 AM4/20/16
to weewx-user
hi

here the units:

Windspeed is km/h
dailyrain/weeklyrain/
monthlyrain/yearlyrain is mm
light is W/m^2
UV is uW/cm^2

the station is about 10ft above ground / ground is about 395ft

mwall

unread,
Apr 20, 2016, 1:33:41 AM4/20/16
to weewx-user
On Wednesday, April 20, 2016 at 1:02:13 AM UTC-4, kaiman wrote:
hi

here the units:

Windspeed is km/h
dailyrain/weeklyrain/
monthlyrain/yearlyrain is mm
light is W/m^2
UV is uW/cm^2

the station is about 10ft above ground / ground is about 395ft

thank you kaiman.  units fixed at commit e5832b2.  rain, wind, temperature, pressure, radiation (light) should all be correct now.

are you certain about the uv measurement?  normally uv is simply an index - no units.  for example, the uk met uses a scale from 0-11.

m

kaiman

unread,
Apr 20, 2016, 3:32:18 AM4/20/16
to weewx-user
Hi

yes, the station shows UV (uW/cm^2) and UV-Index as a unitless scale 0-11

kaiman

unread,
Apr 20, 2016, 3:49:28 AM4/20/16
to weewx-user
hi,

there is a invalid if in code:

Apr 20 09:45:36 xx weewx[12436]: engine: Initializing engine
Apr 20 09:45:36 xx weewx[12436]: engine: Loading station type Interceptor (user.interceptor)
Apr 20 09:45:36 xx weewx[12436]: engine: Caught unrecoverable exception in engine:
Apr 20 09:45:36 xx weewx[12436]:     ****  invalid syntax (interceptor.py, line 465)
Apr 20 09:45:36 xx weewx[12436]:     ****  Traceback (most recent call last):
Apr 20 09:45:36 xx weewx[12436]:     ****    File "/usr/share/weewx/weewx/engine.py", line 853, in main
Apr 20 09:45:36 xx weewx[12436]:     ****      engine = EngineClass(config_dict)
Apr 20 09:45:36 xx weewx[12436]:     ****    File "/usr/share/weewx/weewx/engine.py", line 69, in __init__
Apr 20 09:45:36 xx weewx[12436]:     ****      self.setupStation(config_dict)
Apr 20 09:45:36 xx weewx[12436]:     ****    File "/usr/share/weewx/weewx/engine.py", line 92, in setupStation
Apr 20 09:45:36 xx weewx[12436]:     ****      __import__(driver)
Apr 20 09:45:36 xx weewx[12436]:     ****    File "/usr/share/weewx/user/interceptor.py", line 465
Apr 20 09:45:36 xx weewx[12436]:     ****      if
Apr 20 09:45:36 xx weewx[12436]:     ****        ^
Apr 20 09:45:36 xx weewx[12436]:     ****  SyntaxError: invalid syntax
Apr 20 09:45:36 xx weewx[12436]:     ****  Exiting.


after i removed it, the engine starts again;
i noticed this:

is this correct: unrecognized parameter  ?

Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter weeklyrain=10.5
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter monthlyrain=10.5
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter realtime=1
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter rtfreq=5
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter action=updateraw
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter dailyrain=0.0
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter PASSWORD=xxxxxxx
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter ID=yyyyyyy
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter dateutc=2016-4-20%207:46:55
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter softwaretype=HP1001%20V2.2.2
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter relbaro=1039.0
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: raw packet: {'windchill': 9.1, 'dewpoint': 2.2, 'pressure': 1015.1, 'outHumidity': 62.0, 'UV': 857.0, 'radiation': 27612.0, 'rain': 0.0, 'dateTime': 1461138415, 'windDir': 170.0, 'outTemp': 9.1, 'windSpeed': 0.1, 'inHumidity': 35.0, 'inTemp': 22.8, 'windGust': 1.1, 'rainRate': 0.0, 'usUnits': 16}
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: mapped packet: {'windchill': 9.1, 'dewpoint': 2.2, 'pressure': 1015.1, 'outHumidity': 62.0, 'UV': 857.0, 'radiation': 27612.0, 'rain': 0.0, 'dateTime': 1461138415, 'windDir': 170.0, 'outTemp': 9.1, 'windSpeed': 0.1, 'inHumidity': 35.0, 'inTemp': 22.8, 'windGust': 1.1, 'rainRate': 0.0, 'usUnits': 16}

mwall

unread,
Apr 20, 2016, 4:26:55 AM4/20/16
to weewx-user
On Wednesday, April 20, 2016 at 3:49:28 AM UTC-4, kaiman wrote:
i noticed this:

is this correct: unrecognized parameter  ?

Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter weeklyrain=10.5
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter monthlyrain=10.5
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter realtime=1
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter rtfreq=5
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter action=updateraw
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter dailyrain=0.0
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter PASSWORD=xxxxxxx
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter ID=yyyyyyy
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter dateutc=2016-4-20%207:46:55
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter softwaretype=HP1001%20V2.2.2
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: unrecognized parameter relbaro=1039.0
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: raw packet: {'windchill': 9.1, 'dewpoint': 2.2, 'pressure': 1015.1, 'outHumidity': 62.0, 'UV': 857.0, 'radiation': 27612.0, 'rain': 0.0, 'dateTime': 1461138415, 'windDir': 170.0, 'outTemp': 9.1, 'windSpeed': 0.1, 'inHumidity': 35.0, 'inTemp': 22.8, 'windGust': 1.1, 'rainRate': 0.0, 'usUnits': 16}
Apr 20 09:46:55 xx weewx[12468]: interceptor: MainThread: mapped packet: {'windchill': 9.1, 'dewpoint': 2.2, 'pressure': 1015.1, 'outHumidity': 62.0, 'UV': 857.0, 'radiation': 27612.0, 'rain': 0.0, 'dateTime': 1461138415, 'windDir': 170.0, 'outTemp': 9.1, 'windSpeed': 0.1, 'inHumidity': 35.0, 'inTemp': 22.8, 'windGust': 1.1, 'rainRate': 0.0, 'usUnits': 16}

there is still a lot we do not know about the fine offset wh2600/hp1000/hp1003 stations.  there are quite a few different firmware versions out there, the european version seems to be different than the us version, and there are differences between the bridge and the console.  my intent is to make the driver future-proof.  it will spit out information about parameters we do not yet know about, and confirm information about those we think we know about.

fixed at commit cf8ee2d841225d4df24f38827ff17cca6524845c

m

mwall

unread,
Apr 20, 2016, 4:34:38 AM4/20/16
to weewx-user
the interceptor extension uses three different stages of packets:

raw data - the bytes/querystring/whatever as received by the driver
raw packet - a python dict with data translated from the raw data
mapped packet - a python dict with data mapped to the database schema

in the case of the observer, raw packet and mapped packet are the same thing.

in the case of acurite bridge, lw300, and gw1000u, the raw packet and mapped packet are not the same.  those devices can report data from more than just the basic weather observations, so they need a mechanism for mapping observations from multiple sensors to the database schema.

we might need to do this for the observer as well.  do you know if the observer can receive data from more than just a single t/h sensor and the instrument cluster?  does it work with more than one t/h sensor?

m

kaiman

unread,
Apr 20, 2016, 5:04:44 AM4/20/16
to weewx-user
ok i understand;


oh i see.

as far as i know, there is no possibility to add more than the build in t/h sensors to the observer.
i can not connect add. sensor to mine.

i analyzed the data, which the station pushed again and found something wired:

when i look at the display on the station i get for example: UV (uW/cm^2) 404  ... UV-Index 1

the station broadcasts UV 404.

I think there have to be a recalculation to get the correct index shown in weewx?

Ashley Hinton

unread,
Apr 30, 2016, 5:39:47 PM4/30/16
to weewx-user
Hello

I wasn't sure whether to start a new thread or add to this one, please feel free to suggest starting a new one if needed.

My trusty FineOffset (Gadget/Maplin etc) 1081 finally died last week, it was connected via USB to my Ubuntu server. As a replacement I purchased this:
https://www.amazon.co.uk/Wireless-Weather-Station-WeatherSleuth®-Professional/dp/B00ZVFZUS6/ref=sr_1_1?ie=UTF8&qid=1462048608&sr=8-1&keywords=weathersleuth

Having checked first that it outputs something that can be read, or that its internal web page is accessible, and there is a developing WeeWX driver I decided to go for it!

The unit itself is distributed by Aercus Instruments: http://www.aercusinstruments.com

WeeWx is the Python version, running on Ubuntu Server 14.04.4 LTS 64 Bit.

The Interceptor settings from my weewx.conf:


[Interceptor]

 

   
# This section is for the network traffic interceptor driver.



 

   
# Specify the hardware device to capture.  Options include:

   
#   acurite-bridge - acurite internet bridge

   
#   observer - fine offset WH2600/HP1000/HP1003, aka 'observer'

   
#   lw30x - oregon scientific LW301/LW302

   
#   lacross-bridge - lacross GW1000U/C84612 internet bridge

   
#   netatmo - netatmo weather stations

    device_type
= observer

    port
= 55

 

   
# The driver to use:

    driver
= user.interceptor


observer seems to be the device_type to use, as any others instantly crash weewx, and it does start to try and get data. Hopefully If we can manage to get it working we can add Aercus WeatherSleuth to the list of supported stations.

The WeatherSleuth allows you to configure its units, but it seems these only affect the displayed units on its own live data page. If I change the temperature to degrees F, the unit still outputs metric data when it pushes:

nc -l 55

GET
/weatherstation/updateweatherstation.asp?ID=EASTHAGBOURNE&PASSWORD=password&outtemp=6.3&outhumi=80&dewpoint=3.1&windchill=6.3&winddir=197&windspeed=0.0&windgust=0.0&rainrate=0.0&dailyrain=0.0&weeklyrain=0.0&monthlyrain=0.0&yearlyrain=0.0&light=0.00&UV=1&intemp=19.8&inhumi=46&absbaro=1018.30&relbaro=1018.30&lowbatt=0&dateutc=2016-4-30%2021:5:1&softwaretype=Weather%20logger%20V2.1.9&action=updateraw&realtime=1&rtfreq=5 HTTP/1.0

Accept: */*

Host: 192.168.45.100

Connection: Close
 

However, WeeWx crashes with:

Apr 30 21:20:33 supertoni weewx[18837]: interceptor: MainThread: shutting down server thread

Apr 30 21:20:33 supertoni weewx[18837]: engine: Caught unrecoverable exception in engine:

Apr 30 21:20:33 supertoni weewx[18837]:     ****  'usUnits'

Apr 30 21:20:33 supertoni weewx[18837]:     ****  Traceback (most recent call last):

Apr 30 21:20:33 supertoni weewx[18837]:     ****    File "/home/weewx/bin/weewx/engine.py", line 859, in main

Apr 30 21:20:33 supertoni weewx[18837]:     ****      engine.run()

Apr 30 21:20:33 supertoni weewx[18837]:     ****    File "/home/weewx/bin/weewx/engine.py", line 196, in run

Apr 30 21:20:33 supertoni weewx[18837]:     ****      self.dispatchEvent(weewx.Event(weewx.POST_LOOP))

Apr 30 21:20:33 supertoni weewx[18837]:     ****    File "/home/weewx/bin/weewx/engine.py", line 218, in dispatchEvent

Apr 30 21:20:33 supertoni weewx[18837]:     ****      callback(event)

Apr 30 21:20:33 supertoni weewx[18837]:     ****    File "/home/weewx/bin/weewx/engine.py", line 584, in post_loop

Apr 30 21:20:33 supertoni weewx[18837]:     ****      self._software_catchup()

Apr 30 21:20:33 supertoni weewx[18837]:     ****    File "/home/weewx/bin/weewx/engine.py", line 635, in _software_catchup

Apr 30 21:20:33 supertoni weewx[18837]:     ****      self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, record=record, origin='software'))

Apr 30 21:20:33 supertoni weewx[18837]:     ****    File "/home/weewx/bin/weewx/engine.py", line 218, in dispatchEvent

Apr 30 21:20:33 supertoni weewx[18837]:     ****      callback(event)

Apr 30 21:20:33 supertoni weewx[18837]:     ****    File "/home/weewx/bin/user/owfs.py", line 504, in handle_new_archive

Apr 30 21:20:33 supertoni weewx[18837]:     ****      data = self.getData(event.record)

Apr 30 21:20:33 supertoni weewx[18837]:     ****    File "/home/weewx/bin/user/owfs.py", line 533, in getData

Apr 30 21:20:33 supertoni weewx[18837]:     ****      del p['usUnits']

Apr 30 21:20:33 supertoni weewx[18837]:     ****  KeyError: 'usUnits'

Apr 30 21:20:33 supertoni weewx[18837]:     ****  Exiting.

Apr 30 21:20:43 supertoni zmc[26606]: INF [Front_Drive: 10996000 - Capturing at 14.93 fps]

Apr 30 21:20:46 supertoni zma[26488]: INF [Front_Door: 9713000 - Analysing at 10.00 fps]

Apr 30 21:20:47 supertoni zmc[15597]: INF [Rear_Drive: 7596000 - Capturing at 15.15 fps]

Apr 30 21:20:33 supertoni weewx[18837]: engine: Caught unrecoverable exception in engine:

Apr 30 21:20:33 supertoni weewx[18837]:     ****  'usUnits'

Apr 30 21:20:33 supertoni weewx[18837]:     ****  Traceback (most recent call last):


The only deviation in my weewx.conf is that I'm also using the owfs driver to grab temperature from my greenhouse & garage, theres a RPI in the garage running a one wire server (in RAM to save wear on the SD card) and weewx polls the data adding the values to extratemp1 & extratemp2:


[OWFS]



   
interface = 192.168.45.251:4304

    driver
= user.owfs

   
[[sensor_map]]

        extraTemp1
= /28.CCBF4A050000/temperature

        extraTemp2
= /28.5A134A050000/temperature

   
[[sensor_type]]


When WeeWx starts:


Apr 30 21:22:08 supertoni weewx[18911]: interceptor: MainThread: server will listen on :55



Apr 30 21:22:08 supertoni weewx[18911]: interceptor: MainThread: sensor map: None

Apr 30 21:22:08 supertoni weewx[18911]: owfs: service version is 0.16

Apr 30 21:22:08 supertoni weewx[18911]: owfs: binding is archive

Apr 30 21:22:08 supertoni weewx[18911]: owfs: interface is 192.168.45.251:4304

Apr 30 21:22:08 supertoni weewx[18911]: owfs: sensor map is {'extraTemp1': '/28.CCBF4A050000/temperature', 'extraTemp2': '/28.5A134A050000/temperature'}

Apr 30 21:22:08 supertoni weewx[18911]: owfs: sensor type map is {}

Apr 30 21:22:08 supertoni weewx[18911]: owfs: sensor unit system is metric

Apr 30 21:22:08 supertoni weewx[18911]: engine: StdConvert target unit is 0x1

Apr 30 21:22:08 supertoni weewx[18911]: wxcalculate: The following values will be calculated: barometer=prefer_hardware,windchill=prefer_hardware,dewpoint=prefer_hardware,appTemp=prefer_hardware,rainRate=prefer_hardware,windrun=prefer_hardware,heatindex=prefer_hardware,maxSolarRad=prefer_hardware,humidex=prefer_hardware,pressure=prefer_hardware,inDewpoint=prefer_hardware,ET=prefer_hardware,altimeter=prefer_hardware,cloudbase=prefer_hardware

Apr 30 21:22:08 supertoni weewx[18911]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA,maxSolarRad=RS

Apr 30 21:22:08 supertoni weewx[18911]: engine: Archive will use data binding wx_binding

Apr 30 21:22:08 supertoni weewx[18911]: engine: Record generation will be attempted in 'hardware'

Apr 30 21:22:08 supertoni weewx[18911]: engine: Using archive interval of 300 seconds

Apr 30 21:22:08 supertoni weewx[18911]: engine: Using binding 'wx_binding' to database 'weewx.sdb'

Apr 30 21:22:08 supertoni weewx[18911]: manager: Starting backfill of daily summaries

Apr 30 21:22:08 supertoni weewx[18911]: manager: Daily summaries up to date

Apr 30 21:22:08 supertoni weewx[18911]: engine: Starting up weewx version 3.5.0

 

Apr 30 21:22:08 supertoni weewx[18911]: engine: Starting main packet loop.


Let me know if there is anything else needed? I suspect this is yet another version of the WH2600/HP1000/HP1003 bridge with slightly different software.

The firmware itself is the latest available from Aercus: v2.1.9


Ashley


Ashley Hinton

unread,
Apr 30, 2016, 5:52:03 PM4/30/16
to weewx-user
Apologies I had posted some more output but it appears to be cut off.

Let me know if you need any more info, I mentioned in the bit that was cut off that I'm also using owfs to grab two extra sensors (extratemp1 & 2) from my greenhouse and garage, these are plugged into an RPI running a one-wire file server (in RAM to save the SD card) which is then polled by WeeWx.

Happy to test, try, post outputs etc.

Thanks again,

Ashley
Apr 30 21:20:33 supertoni weewx<span style="color: #660;

mwall

unread,
Apr 30, 2016, 8:22:43 PM4/30/16
to weewx-user
On Saturday, April 30, 2016 at 5:39:47 PM UTC-4, Ashley Hinton wrote:
I wasn't sure whether to start a new thread or add to this one, please feel free to suggest starting a new one if needed.

hi ashley,

the error you posted:

KeyError: 'usUnits'

is coming from the owfs service.  it happens when owfs is used with drivers that send empty or partial packets.  that bug was fixed in 0.18 (21jan2016).  you are running owfs 0.16.

m

Ashley Hinton

unread,
May 1, 2016, 2:30:33 PM5/1/16
to weewx-user
Hi

Thanks for that, I've installed owfs 0.18 and all is well.

The Aercus unit has three modes for sending data: PHP, JSP, ASP

Quick testing shows that the most reliable is PHP, and if this is the case and all looks well with the data I'm happy to write some instructions on how to set up the weather station to work with weewx. 

The others (ASP & JSP) seem to be wildly inaccurate with UV, ET & solar radiation. Setting the station to send its data in PHP appears to be the most accurate. In southern UK at the moment with PHP its showing (in weewx) as 0 UV, 1.5mm ET & 28 W/m2. The time is 19:30, overcast.

The above sounds much more realistic than 2279 UV, 1337.3 ET & 89704 W/m2 that ASP/JSP was sending earlier.

PHP:

sudo nc -l 55

 

GET
/weatherstation/updateweatherstation.php?ID=weather&PASSWORD=password&tempf=53.1&humidity=73&dewptf=44.6&windchillf=53.1&winddir=198&windspeedmph=4.47&windgustmph=9.84&rainin=0.00&dailyrainin=0.00&weeklyrainin=0.00&monthlyrainin=0.00&yearlyrainin=0.00&solarradiation=23.80&UV=0&indoortempf=68.7&indoorhumidity=45&baromin=30.04&lowbatt=0&dateutc=2016-5-1%2018:17:35&softwaretype=Weather%20logger%20V2.1.9&action=updateraw&realtime=1&rtfreq=5 HTTP/1.0

Accept: */*

Host: 192.168.45.100

Connection: Close


JSP:

GET /weatherstation/updateweatherstation.jsp?ID=weather&PASSWORD=password&outtemp=11.7&outhumi=73&dewpoint=7.0&windchill=11.7&winddir=186&windspeed=4.4&windgust=6.7&rainrate=0.0&dailyrain=0.0&weeklyrain=0.0&monthlyrain=0.0&yearlyrain=0.0&light=2965.70&UV=60&intemp=20.4&inhumi=45&absbaro=1017.20&relbaro=1017.20&lowbatt=0&dateutc=2016-5-1%2018:18:39&softwaretype=Weather%20logger%20V2.1.9&action=updateraw&realtime=1&rtfreq=5 HTTP/1.0




Accept: */*

Host: 192.168.45.100

 

Connection: Close


ASP:
sudo nc -l 55

 

GET
/weatherstation/updateweatherstation.asp?ID=weather&PASSWORD=password&outtemp=11.7&outhumi=73&dewpoint=7.0&windchill=11.7&winddir=269&windspeed=2.5&windgust=3.3&rainrate=0.0&dailyrain=0.0&weeklyrain=0.0&monthlyrain=0.0&yearlyrain=0.0&light=2968.60&UV=58&intemp=20.4&inhumi=45&absbaro=1017.20&relbaro=1017.20&lowbatt=0&dateutc=2016-5-1%2018:19:59&softwaretype=Weather%20logger%20V2.1.9&action=updateraw&realtime=1&rtfreq=5 HTTP/1.0

Accept: */*

Host: 192.168.45.100


Thanks again for your help.

The weather site is at: http://www.achinton.co.uk


Ashley


Reply all
Reply to author
Forward
0 new messages