Hi, i’ve started a new project for intercept the updates sent from any weather station to Weather Underground and publish the data trough mqtt on Home Assistant, so the device become “local” and near real-time (updates every 30 sec, depend from the device).
Here the link, feel free to help as i’m really newby on coding.
Hi, Yes i know that software. Mine Is Just a script in python of few line of code for a very specific porpuse (serve home assistant), so less stuffs to run over home assistant!
You have successuffully redirect http traffic coming from the station to the hass ip? Check in the log of the plugin if you see the packet coming, let me know.
Exception occurred during processing of request from (‘192.168.0.99’, 32676)
Traceback (most recent call last):
File “/usr/lib/python3.11/socketserver.py”, line 317, in handle_request_noblock
self.process_request(request, client_address)
File “/usr/lib/python3.11/socketserver.py”, line 348, in process_request
self.finish_request(request, client_address)
File “/usr/lib/python3.11/socketserver.py”, line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File “/usr/lib/python3.11/http/server.py”, line 667, in init
super().init(*args, **kwargs)
File “/usr/lib/python3.11/socketserver.py”, line 755, in init
self.handle()
File “/usr/lib/python3.11/http/server.py”, line 432, in handle
self.handle_one_request()
File “/usr/lib/python3.11/http/server.py”, line 420, in handle_one_request
method()
File “/pws_server.py”, line 143, in do_GET
publish(client, MQTT_TOPIC + “/low_battery”, (MyHttpRequestHandler.parse_wu_data(query_components)['Low_battery[]’]) )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: ‘Low_battery_[]’
Found the problem, the script expect also the filed “lowbatt” while it’s not present in your string, it should be after “baromin”.
You have two option:
1- manually enter the addon folder and change the pws_server.py and remove the reference to lowbatt publishing, line 142
2- fork my project and do the same
Wow, I really like this addon solution. Used it for a Bresser WSX3001. Had to make some small changes in pws_server.py (disable rain_weekly, rain_monthly, rain_yearly, temperature_in, humidity_in, low_battery). But further It works great.
In the AP mode of the Bresser you could add the URL and port of your addon.
Maybe it could be improved to have MQTT discovery and the MQTT credentials via the addon configuration.
Thank for your message, I added the config for ip,port,user,pwd for now…
for update you have to stop the addon, save your personal config for bakup and uninstall.
Then proceed with a new installation with the new folder on github.
I’m not a coder, so someone else can do a better job for sure forking the project