WS-1001 connection to Raspberry PI for Weewx

124 views
Skip to first unread message

Bill Volz

unread,
Jul 29, 2019, 2:55:44 PM7/29/19
to weewx-user
I had this working for 2 years but it stopped Saturday. I got it working 2 years ago and don't quite recall what I did. I think I used EasyWeatherIP to change web page in the setup page from "www.wunderground.com' to 'www.***.com". Now when I try to change it with EWIP, it doesn't make the change - it has made other changes. Not sure if there is a trick. I've tried to install HP1001 but it times out and can't find the WS-1001. Is there a way to tell HP1001 what the IP address of the WS_1001 is - I have it on a static address using the MAC address on my router. I tried to install ObserverIP and that's not working either. Current WS-1001 firmware is 2.4.3 and would prefer to not have to upgrade that since it's a pain in a$$ to get everything update again.

Any hints on how to get it connected again would be appreciated. Thanks

Susan Mackay

unread,
Jul 29, 2019, 10:47:49 PM7/29/19
to weewx-user
In the weewx.conf file, you can uncomment the 'ip_address_mask' line and set it to whatever is the correct address mask for your network.
The HP1000 code must be running on a computer that is on the same network sub-net as the weather console. Setting the 'ip_address_mask' overrides the automatic selection of the computers IP address as the default.
Failing that,if you know Python, then go into the HP1000.py code and remove the stat of the 'connectToWeatherStation' function and set 'self.ws_socket' to be an open connection to the remote IP address.
Susan

Bill Volz

unread,
Jul 31, 2019, 12:13:22 PM7/31/19
to weewx-user
I uninstalled and reinstalled weewx, along with interceptor, crt and HP1000. Here's the section in the weewx.conf file with comments removed.
[HP1000]
    ip_address_mask = "192.168.0.255"

    retry_count = 5

    socket_timeout = 5

    loop_delay = 15

    max_retry = 3

    retry_wait = 5

    driver = user.HP1000

The section from user.log: The ws-1001 is at static IP addr 192.168.0.197. Pinging that addr shows something is there.
Jul 31 12:01:02 raspberrypi weewx[24848]: engine: Using configuration file /etc/weewx/weewx.conf
Jul 31 12:01:02 raspberrypi weewx[24848]: engine: Loading station type HP1000 (user.HP1000)
Jul 31 12:01:02 raspberrypi weewx[24848]: HP1000: HP1000 Starting
Jul 31 12:01:02 raspberrypi weewx[24848]: HP1000: Using user-defined broadcast mask - 192.168.0.255
Jul 31 12:01:02 raspberrypi weewx[24848]: HP1000: Address Mask = 192.168.0.255
Jul 31 12:01:02 raspberrypi weewx[24848]: HP1000: Retry count = 5.000000
Jul 31 12:01:02 raspberrypi weewx[24848]: HP1000: Socket timeout = 5.000000
Jul 31 12:01:02 raspberrypi weewx[24848]: HP1000: Loop delay = 15.000000
Jul 31 12:01:02 raspberrypi weewx[24848]: HP1000: Retry Wait = 5.000000
Jul 31 12:01:02 raspberrypi weewx[24848]: HP1000: Max Retry = 3.000000
Jul 31 12:01:02 raspberrypi weewx[24848]: engine: StdConvert target unit is 0x1

Later I get this in the user.log file:
Jul 31 12:01:27 raspberrypi weewx[24848]: HP1000: Timed out too many times

That repeats. what to fix now? Thanks
Message has been deleted

Susan Mackay

unread,
Jul 31, 2019, 11:01:59 PM7/31/19
to weewx-user
Have you changed any settings on the router? What I'm thinking is that it is not letting through the broadcast packets.
If that is the case, then all I can suggest in the short term is to do what I suggested in my first post and edit the Python code to simply try to connect directly to the IP address.
(I'll add that to the "wishlist' for the next version of the driver, just after making sure that it works with Python 3 and the latest WeeWx code! Of course that is all after 'getting some time for all this playing'!)
Susan

Bill Volz

unread,
Aug 1, 2019, 12:38:54 AM8/1/19
to weewx-user
I did change the network mask from 255.255.255.0 to 255.255.0.0. Should I use a broadcast mask of 192.168.255.255 for HP1000?

Bill Volz

unread,
Aug 1, 2019, 12:45:54 AM8/1/19
to weewx-user
That appears the be the problem. Using 192.168.255.255 and it found the correct address for the station. Now it's updating the database. Should take awhile. Thanks

Susan Mackay

unread,
Aug 1, 2019, 11:20:16 PM8/1/19
to weewx-user
The broadcast mask needs to match the way your subnet is defined. You originally had the subnet responding to the bottom octet of the IP address only but then expanded it to the bottom 2 octets. Therefore the broadcast message would have only gone to a small part of your expanded network.
Having said that, you also said the WS-1001 was at 192.168.0.197 and that should have responded to the original broadcast address, but I readily admit that I only have a rudimentary understanding of these things and there could well be some 'magic' that is applied in the router to block broadcast messages that don't fly match the network mask.
Anyway - I'm glad it is all back and working for you.
Susan
Reply all
Reply to author
Forward
0 new messages