Problems connecting with GW1000 driver

231 views
Skip to first unread message

Auchtermuchty Weather

unread,
Nov 26, 2021, 11:11:34 AM11/26/21
to weewx-user
I'm moving my WeeWx back to the right Pi, but with up-to-date Pi OS, WeeWx and GW1000 driver.  Versions are:

WeeWX 4.5.1
GW1000 0.4.1
Raspbian 5.10.63-v7+

I have another Pi working quite happily picking up data via the GW1000 driver, so I don't think there's a problem there.

I've following the instructions at GIT to install it using wee_extension but when I try to test it I get:

$ PYTHONPATH=/home/weewx/bin python -m user.gw1000 --test-driver
Using configuration file /home/weewx/weewx.conf

Unable to connect to device: Failed to detect device IP address and/or port after 3 attempts

So I've run this:
$ PYTHONPATH=/home/weewx/bin python -m user.gw1000 --sensors --debug=3

And this is in /var/log/debug:
Nov 26 15:57:22 LiveWeeWx weewx[6200] DEBUG __main__: Sending broadcast packet 'FF FF 12 03 15' to '255.255.255.255:46000'
Nov 26 15:57:22 LiveWeeWx weewx[6200] DEBUG __main__: Received broadcast response 'FF FF 12 00 21 48 3F DA 54 59 59 C0 A8 01 A2 AF C8 10 57 48 32 36 35 30 41 2D 57 49 46 49 35 39 35 39 F0'
Nov 26 15:57:22 LiveWeeWx weewx[6200] DEBUG __main__: Invalid response to command 'CMD_BROADCAST': Invalid checksum in API response. Expected '17' (0x11), received '240' (0xF0).
Nov 26 15:57:27 LiveWeeWx weewx[6200] DEBUG __main__: Failed attempt 1 to detect device IP address and/or port
Nov 26 15:57:37 LiveWeeWx weewx[6200] DEBUG __main__: Sending broadcast packet 'FF FF 12 03 15' to '255.255.255.255:46000'
Nov 26 15:57:37 LiveWeeWx weewx[6200] DEBUG __main__: Received broadcast response 'FF FF 12 00 21 48 3F DA 54 59 59 C0 A8 01 A2 AF C8 10 57 48 32 36 35 30 41 2D 57 49 46 49 35 39 35 39 F0'
Nov 26 15:57:37 LiveWeeWx weewx[6200] DEBUG __main__: Invalid response to command 'CMD_BROADCAST': Invalid checksum in API response. Expected '17' (0x11), received '240' (0xF0).
Nov 26 15:57:42 LiveWeeWx weewx[6200] DEBUG __main__: Failed attempt 2 to detect device IP address and/or port
Nov 26 15:57:52 LiveWeeWx weewx[6200] DEBUG __main__: Sending broadcast packet 'FF FF 12 03 15' to '255.255.255.255:46000'
Nov 26 15:57:52 LiveWeeWx weewx[6200] DEBUG __main__: Received broadcast response 'FF FF 12 00 21 48 3F DA 54 59 59 C0 A8 01 A2 AF C8 10 57 48 32 36 35 30 41 2D 57 49 46 49 35 39 35 39 F0'
Nov 26 15:57:52 LiveWeeWx weewx[6200] DEBUG __main__: Invalid response to command 'CMD_BROADCAST': Invalid checksum in API response. Expected '17' (0x11), received '240' (0xF0).
Nov 26 15:57:57 LiveWeeWx weewx[6200] DEBUG __main__: Failed attempt 3 to detect device IP address and/or port

No idea what the problem is.  I have a feeling I might have had this problem previously and documented it, but I've managed to lose that document - if it ever existed.  :(

Rainer Lang

unread,
Nov 26, 2021, 11:48:19 AM11/26/21
to Auchtermuchty Weather, weewx-user

does your router allow the server (RPi) to connect to other devices, especially to the GW1000, resp. the GW1000 to connect to the RPi ?
Routers often restrict the access by default.

Ports 45000, 46000 TCP/UDP need to be open for weewx to communicate with the GW1000 and vice versa.

--
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/f3a02509-adf7-4fb8-a23a-5eeec262ef45n%40googlegroups.com.

Auchtermuchty Weather

unread,
Nov 26, 2021, 2:16:31 PM11/26/21
to weewx-user
The other Pi has no problems communicating with the GW1000, and I can't find any relevant settings in the router.   The only reference to ports are passing 80 & 443 from the outside to the Pi where WeeWx is working.

No problem using rcp to copy files between the two RPis.

They all have ssh turned on, and I access the command line via putty - none of them have a GUI.

There is another Pi on the network running Pi-Hole and setting that up last week didn't stop the other WeeWx Pi from accessing the GW1000.  Again, I've looked through the setup and can't see anything that might be relevant.  (there are 4 RPis - Pi-Hole, WeeWx live & test, & a WWW server for the WeeWx data.  The generated files are FTP's to it by WeeWx).

What is the best way to check what ports the problem Pi has open and/or if that's the problem?  

If the default RPi OS setup has them all open by default then that's what I have.

vince

unread,
Nov 26, 2021, 3:37:45 PM11/26/21
to weewx-user
Try adding the ip address of the pi and see if that helps.  From Gary's readme...

"If necessary you can specify the GW1000 IP address and port using the --ip-address and --portcommand line options. Refer to the GW1000 driver help using --help for further information."

gjr80

unread,
Nov 26, 2021, 3:44:16 PM11/26/21
to weewx-user
I don’t have time to sit down and manually decode the debug response just now, but I can tell this is not an issue with port 45000/46000 tcp/udp being open; it is very clear from the broadcast response that a GW1x00 is replying. If there was a port/protocol issue you would not see any (recognisable) response. Can’t say I’ve seen a checksum error before. Will be interesting to see how it goes using —ip-address. Will look at this closer later this morning.

Gary
Message has been deleted

gjr80

unread,
Nov 26, 2021, 6:13:09 PM11/26/21
to weewx-user
I've now been able to manually decode the response received and other than the checksum and the device SSID it all decodes correctly or with plausible values. Am I correct in understanding the device concerned is not a GW1000 but actually a WH2650?

Manually decoding the response I get the following results for the device:

MAC: 48:3F:DA:54:59:59
IP address: 192.168.1.162
Port: 45000
SSID: ?WH2650A-WIFI5959 (note the ? is actually hexadecimal 10 which is an ASCII control character and not printable on screen as such)

It sounds odd that one RPi works fine whereas the other doesn't. The fact that the response decodes means the network side of things is likely OK and it suggests an issue within WeeWX/GW1000 driver. Could I get you to try/confirm a couple of things for me:

1. use the WS View or WS View Plus app to confirm the device IP address, MAC address, SSID and firmware version. These should be available from the Device List screen on then WS View Plus app or the Device List and Live Data screens on the WS View app.

2. the [GW1000] stanza from each RPi

3. confirm your device is actually on IP address 192.168.1.162

4. try the following commands on each RPi and post the response for each from the log (note if the IP address is incorrect use the actual IP address):

$ PYTHONPATH=/home/weewx/bin python -m user.gw1000 --discover --debug=3
$ PYTHONPATH=/home/weewx/bin python -m user.gw1000 --ip-address=192.168.1.162 --mac-address --debug=3


Gary

Auchtermuchty Weather

unread,
Nov 27, 2021, 4:40:25 AM11/27/21
to weewx-user
Hi Gary

Thanks for looking at this so quickly.

When I used WS View it wanted to update the firmware, so I did that last thing last night and Lo!  When I tried the test again this morning it connected and got data!

$ PYTHONPATH=/home/weewx/bin python -m user.gw1000 --test-driver
Using configuration file /home/weewx/weewx.conf

Interrogating None at 192.168.1.162:45000

2021-11-27 09:29:17 GMT (1638005357): UV: 0, dateTime: 1638005357, dayRain: 0.0, daymaxwind: 8.2, inHumidity: 49, inTemp: 18.2, luminosity: 3239.0, monthRain: 28.0, outHumidity: 67, outTemp: 2.0, pressure: 1004.9, rain: None, rainRate: 0.0, relbarometer: 1091.7, stormRain: 0.0, usUnits: 17, uvradiation: 2.8, weekRain: 5.9, wh25_batt: 0, wh25_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 31, windGust: 1.5, windSpeed: 0.8, yearRain: 585.0
...

Sorry I don't know what the previous firmware was but I brought and set this station up in late March this year, so it would have had whatever was current then and so is the GW1000 driver on the other Pi.

So I can only conclude that the older driver is OK with both firmware versions, but the newer driver doesn't work with the older firmware.

Current firmware is WH2650A_V1.6.8

You got the correct IP, 

Auchtermuchty Weather

unread,
Nov 27, 2021, 4:46:33 AM11/27/21
to weewx-user
PS from the other PI:

Version: 0.3.0                                      Date: 20 March 2021

And from the PI that now works:

Version: 0.4.1                                      Date: 14 October 2021

Revision History
    14 October 2021         v0.4.1
        -   no change, version increment only
    27 September 2021       v0.4.0


Auchtermuchty Weather

unread,
Nov 27, 2021, 10:38:18 AM11/27/21
to weewx-user
Reply all
Reply to author
Forward
0 new messages