Closed ObiWanCanOweMe closed 2 years ago
Could you attach your latest add-on logs please? Based on the logs provided in tlskinneriv/awnet_local#6, it seems like the station is only sending its MAC address and no other data. This would lead to the condition that you are describing. The sensors will stay unavailable until the integration has successfully parsed data for a sensor from an incoming call. The netcat output from https://github.com/tlskinneriv/awnet_local/issues/6#issuecomment-1200342311 appears to be in the right format though. Is it still sending that through when you netcat?
Also, it may be worth in the custom configuration adding a "/" before the "?" in the path in case that's causing any issues.
So, by playing a little bit, I was able to reproduce your issue by sending the raw HTTP request from the netcat that you had provided previously. It looks like because there is a line break in the raw request, the web server in the add-on is only processing the MAC address on the same line as the GET request. I don't know if this is a bug in the Ambient Weather firmware for the WS-5000 or a bug in the webserver used in the add-on. I'm going to look into it and see what I can do to adapt it to work with this format of request:
GET ?MAC=E8:68:E7:XX:XX:XX <- line break here causing trouble
&stationtype=WH2682B_V2.1.7&dateutc=2022-07-31+03:49:33&tempf=72.50&humidity=99&windspeedmph=0.00&windgustmph=2.01&maxdailygust=7.38&winddir=164&winddir_avg10m=97&uv=0&solarradiation=0.00&hourlyrainin=0.898&dailyrainin=1.535&weeklyrainin=1.752&monthlyrainin=4.236&yearlyrainin=4.236&totalrainin=4.236&battout=1&battrain=1&tempinf=71.42&humidityin=54&baromrelin=30.156&baromabsin=29.226&battin=1&temp1f=68.54&humidity1=53&batt1=1&temp2f=74.12&humidity2=43&batt2=1&soilhum1=81&battsm1=1&pm25_in=23.0&pm25_in_24h=15.5&aqi_pm25_in=74&aqi_pm25_in_24h=58&batt_25in=1 HTTP/1.1
Host: homeassistant.local
Connection: close
User-Agent: WH2682B
The logs shown here are demonstrative of everything it has logged since. Also I passed it to netcat
and the output was the same as earlier.
As for the line break, I did notice that but didn't really think too much of it. I'm leaning towards bug in the WS-5000 as HTTP requests are supposed to be one line.
Transferring issue here since the work to fix is in the add-on.
Communication with the weather station (WS-5000) appears to be working properly but the entities are all showing
Unavailable
. I've checked the logs and there are no errors pertaining to AWNET to HASS.