If anyone has been having issues with the WS-5000 devices, I just put out an update for the add-on that should take care of that problem. Seems that they send through a malformed HTTP request.
Also, @sfatula your log issue should be taken care of in the latest release of the integration.
If there are any further issues, please create GitHub issues, as they are easier for me to track (working on getting notifications setup for this thread, too).
@Anwen@tankdeer can you point me in the right direction to set this up without the Supervisor? I tried ambientweather2mqtt but the sensors aren’t populating via that program. I’m not sure why as the logs only say connected to mqtt… no errors.
I haven’t tried ambientweather2mqtt, I just have a Python program running as a service on my Ubuntu host as linked in my post above, and an MQTT docker container running connected to HA with the MQTT integration. Can you see the weather data MQTT messages if you look with either the MQTT integration in HA, or with something like MQTT Explorer? How are you running HA?
I have the python script, that you linked above, running in a ubuntu LXC, currently. I can see the data from my weather station. I can see it connected to my local EMQX which is in another container. It is not publishing MQTT topics to the server though for some reason. I don’t see any errors. The only thing I can see on MQTT explorer a topic from weather/ that says offline but it’s obviously connected to my EMQX.
I’m running HA Operation System in a Proxmox VM at the moment. I use the addon AWnet to local at the moment but want to move my HA to an LXC so no more addons. This is one of two I still need to find a solution for. I’d rather not use the cloud version if I don’t have to.
I can see all my weather station data in MQTT Explorer. It seems odd that you can see the offline topic but not the others - maybe something is not quite right with your Python script? (I actually ended up commenting out the lines of code that generate that topic in the Python script because it doesn’t seem to serve any purpose.)
I defined all my sensors in HA using MQTT discovery. This post was really helpful in figuring out how to make them:
I have a big script that I ran to define them, the beginning of it looks like this:
This is truncated - the full script has an mqtt_publish entry for every weather station sensor. The device section creates a device in HA, which is nice to have. You don’t have to do it this way, but when HA deprecated the old style MQTT sensors I decided to redo mine like this.
I am still learning python so it’s a bit beyond my skill set lol. I copied the script from the above link and followed those directions. I changed the MQTT variables to point at my MQTT. The script says it connects and sends that “offline” message. The only other thing I changed was the listening port. Even checking topics in the EMQX GUI I see nothing for weather…that doesn’t even show the offline message. So IDK. Because of my limited skill I tried to keep the script as simple as possible and figure once I got it working could move to other steps. I just can’t figure out why it won’t publish. My Zigbee2mqtt publishes fine. My AgentDVR publishes fine. HA publishes fine…so there’s something in the MQTT part of the code that’s causing it to not publish.
I am also still learning Python, so I totally understand I think I tweaked a bit to get it to work for me. I can send you a copy of my version via private message if you like (not sure if I should post it here since it isn’t my original work).
Yes please if you don’t mind. I would be extremely greatful. This is the toughest of the two to get switched over. My other is an FTP server and figure that might be a bit easier to figure out.
I switched to ambientweather2mqtt and haven’t looked back, as it works perfectly for my needs. He did a lot of work to it semi recently so I don’t know if you’ve tried it since then
Yes I’ve been trying to get it to work for a few days with no luck. It connects but isn’t parsing from my WS for some reason. What Anwen just sent me is working on my Ubuntu LXC and sending to MQTT.
No. I abandoned trying to use this and switched to ambientweather2mqtt, which works better for me. However I can tell you that most of the sensors I had issues with are not provided by the local API. The official integration and/or the cloud API calculates them vs being sent from the station itself.
It is strange that I have another automation device called Hubitat. The Ambient Weather integration provides MANY MORE value from that integration. I wonder if any developers out there can compare the two integrations and describe why one provides many more entity values.
Almost certainly calculated fields You can see the full list of fields that the device might provide, here.
Note at the bottom there is a section for server calculated fields. Those are ones that Ambient calculates on their cloud servers and returns to the integration. Anything not on that list is likely calculated by the integration itself
I created my own versions of the calculated sensors in Home Assistant. I use the Thermal Comfort integration (available in HACS) to get the dewpoint and the heat index, by providing it the outdoor temperature and humidity from my weather station.
Then I made two template sensors - one calculates the wind chill:
and the other calculates the feels like temperature:
platform: template
sensors:
ws_feels_like_calc:
friendly_name: WS Feels Like
value_template: >
{% set temp = float(states('sensor.ws_temperature_outdoor'), -99) %}
{% set chill = float(states('sensor.ws_wind_chill_calc'), -99) %}
{% set heatindex = float(states('sensor.weather_station_heatindex'), -99) %}
{% if temp <= 50 %}
{% set feelslike = chill %}
{% elif temp >= 80 %}
{% set feelslike = heatindex %}
{% else %}
{% set feelslike = temp %}
{% endif %}
{{ feelslike }}
unit_of_measurement: "°F"
I did some research online to figure these out; there may be more accurate formulas somewhere, but these seem to correlate fine with the data given by my local weather providers.