HP1000 driver with WS-1001 clone - "HP1000: Timed out too many times"

148 views
Skip to first unread message

Tomasz Lewicki

unread,
Jul 19, 2023, 11:11:16 AM7/19/23
to weewx-user
Hi Weewx users.

Recently I bought WS-1001 clone - HP1001 made by Conrad (Germany). Two or three years ago I've installed Weewx for my DIY weather station so I'm familiar with this software. I'm also long time Linux user so I'm not afraid of CLI.

So. I have working Weewx installation. I see logs (debug = 1 in weewx.conf). I've downloaded and successfully installed HP1000 driver (https://github.com/AussieSusan/HP1000). Weewx is reconfigured to use HP1000 driver. I know IP of my weather station, it has static address, like many devices in my LAN. When I start Weewx, I see in log:

weewx[13810] INFO __main__: Initializing weewx version 4.10.2
weewx[13810] INFO __main__: Using Python 3.7.3 (default, Jun 29 2023, 18:03:57) [GCC 8.3.0]
weewx[13810] INFO __main__: Located at /usr/bin/python3
weewx[13810] INFO __main__: Platform Linux-5.10.103-v7+-armv7l-with-debian-10.13
weewx[13810] INFO __main__: Locale is 'pl_PL.UTF-8'
weewx[13810] INFO __main__: Using configuration file /etc/weewx/weewx.conf
weewx[13810] INFO __main__: Debug is 1
weewx[13810] INFO __main__: PID file is /var/run/weewx.pid
weewx[13814] DEBUG __main__: Initializing engine
weewx[13814] INFO weewx.engine: Loading station type HP1000 (user.HP1000)
weewx[13814] INFO root: HP1000: HP1000 Starting
weewx[13814] INFO root: HP1000: Using "netifaces" to determine broadcast mask
weewx[13814] INFO root: HP1000: Address Mask = 192.168.0.255
weewx[13814] INFO root: HP1000: Retry count = 5.000000
weewx[13814] INFO root: HP1000: Socket timeout = 5.000000
weewx[13814] INFO root: HP1000: Loop delay = 15.000000
weewx[13814] INFO root: HP1000: Retry Wait = 5.000000
weewx[13814] INFO root: HP1000: Max Retry = 3.000000

But after some time a message appears:

weewx[13814] INFO root: HP1000: Timed out too many times

repeated dozens of times.

I started Wireshark to sniff the network traffic on my laptop in the same LAN as Weewx and weather station and got this:

60 4.225791451 192.168.0.106 192.168.0.255 UDP 82 48576 → 6000 Len=40
282 24.194043968 192.168.0.106 192.168.0.255 UDP 82 50680 → 6000 Len=40
511 44.162213176 192.168.0.106 192.168.0.255 UDP 82 37338 → 6000 Len=40

First column is packet number. Second - time of sniffing. Third - IP of my Raspberry with Weewx (192.168.0.106). Fifth - 192.168.0.255 is broadcast address, equal to Address Mask in Weewx log. UDP is network protocol. Sixth - packet length in bytes. Seventh - five digits number is port number of Weewx sending the packet; 6000 is destination port of weather station. Len=40 is packet size in bytes (8+8+24, see below).

According to description in HP1000 driver:

Communication starts with a UDP IP broadcast on the local subnet to port 6000 to
see if the weather station responds. The broadcast packet is structured as:

Offset  Value           Structure       Comment
0x00    PC2000          8 byte string   Identifies the calling station
0x08    SEARCH          8 byte string   Command
0x10    nulls           24 null bytes   I think there could be structure here but
                                        sending nulls works!
                                       
Inspecting the packets I see hex dump:

0000   ff ff ff ff ff ff b8 27 eb dd 86 34 08 00 45 00   .......'...4..E.
0010   00 44 28 e0 40 00 40 11 8f 0f c0 a8 00 6a c0 a8   .D(.@.@......j..
0020   00 ff bd c0 17 70 00 30 1d 20 50 43 32 30 30 30   .....p.0. PC2000
0030   00 00 53 45 41 52 43 48 00 00 00 00 00 00 00 00   ..SEARCH........
0040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0050   00 00                                             ..

So it seems Weewx that "asking" for weather station - so far, so good.

And here comes the question: why the Weewx and weather station can't talk to each other. Or maybe - why weather station is not responding to Weewx invitation?
 

Susan Mackay

unread,
Jul 19, 2023, 10:29:31 PM7/19/23
to weewx-user
As the author of that driver, all I can suggest is that the weather station is not interpreting the request correctly and therefore it is being ignored. Perhaps a different post is being used, or a different protocol??? The HP1001 manual that I found ( Microsoft Word - HP1000 HP2000 User Manual_rev.11,3.1.19wunderground注册内容更新_.doc (conrad.com)) does seem to be a bit more sophisticated than the HP1000 so there may well be a different protocol etc.
The way I 'reverse engineered' the protocol was to use another piece of software (EasyWeather IIRC) that talked to the weather console. Perhaps if you have something like that you can see how it is trying to communicate with the console.
As a side note - if you have something like the RTL-SDR dongle then you might be able to tap into the data from the weather station to the console and use the RTL_433 to get it into WeeWx.
Not a satisfactory answer I know but without having one of the consoles to 'play' with it is hard to diagnose the problem from the console side.
Susan

Rainer Lang

unread,
Jul 20, 2023, 3:55:37 AM7/20/23
to weewx-user
Another option I could suggest for this antiquarian piece of a weather station (it's imho a shame that such old hardware is still being sold - but probably the sellers want to empty their stock - when technology has made already big leaps ahead for 5+ years) would be to get yourself a modern Ecowitt GW1100 gateway (~35 USD) which can still receive the WH24 outdoor array (the "boat") and have weewx read from the GW1100 via the Ecowitt Gateway driver which Gary has written.

https://github.com/gjr80/weewx-gw1000/wiki
The GW1100 offers an option for the legacy WH24 to be received - wind readings are different from the newer arrays)
(watch for the matching reception frequency, in your case probably 868 MHz or 433 MHz).

This would also leave you open for adding other modern sensors from Ecowitt (provided you are interested) as it supports all recent available Ecowitt (clone) sensors.
An overview of the Ecowitt universe you find at https://www.wxforum.net/index.php?topic=40730.0

--
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/7a711302-ca3e-4fbb-8098-7a39fa454157n%40googlegroups.com.

Tomasz Lewicki

unread,
Jul 20, 2023, 10:53:08 AM7/20/23
to weewx-user
Thank you both for reply.

In the meantime, after about 8 hours of heavy fight - success. I tried many ways and finally got it. IP, port and protocol were correct. Reading other posts I suspected router settings as the most likely cause. I have also PiHole (https://pi-hole.net) in my LAN, serving as advanced adblocker, DHCP, DNS and VPN in one Raspberry Pi Zero W box so it was another *big* potential point of failure. After trying many settings I returned to the very beginning.

So I started to play with the console's online weather services settings. First, I wanted to establish connection to Weewx - entered IP, port (the same as in HP1000 part of weewx.conf of course) but no luck.

Then I decided to register my station on WU - because I did not consider this option before; I wanted Weewx be only place to gather data. Next I digged on the web and found "interceptor" for Weewx (https://github.com/matthewwall/weewx-interceptor). It took next two hours of frustration. Configuration seems simple at first glance. After some Wireshark sniffing and reading documentation for interceptor I've cheated the console by changing DNS record for WU - instead of letting rtupdate.wunderground.com go to WU, I set it to 192.168.0.106 - Weewx installation (thank you PiHole for easy way to do it!). And then... something was happening, logs were filling with reasonable messages. Weewx started getting data from my HP1001 station :)

As the experiment I changed driver from interceptor to HP1000 from Susan and it also works. It's great because configuration is much more friendly then with interceptor. But it's good to know for the future that I have alternatives.

Summary: I should start with registering to WU, I would save myself a headache and few hours of life. I would also achieve success earlier if port number in drivers' configuration will be default (TCP 80) from the very beginning. With port 8000 which I've set, Weewx and console couldn't talk with each other. It's strange but that's exactly how it is. Before that change I had working webserver instance on port 80 so there was conflict between WWW and Weewx. I disabled WWW server and then everything worked as expected. Maybe someone can explain why? And how can I set the port to other than 80? I suppose it should be some rule in router or Raspbian with Weewx.

Answering to Rainer Lang question about old equipment: it is not "brand new" (in the sense of "straight from the store") thing. I bought it from my friend which has bought this HP-1001 about 7-8 years ago and never mounted it. Reasons are not important but whole set was in the closet for a long time. So I bought it for very good price. Reading the Weewx wiki and other sources I knew that this model should work. It was only matter of time when I'll find a way to force it to do so :)
Reply all
Reply to author
Forward
0 new messages