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?