naofireblade / homebridge-weather-plus

A comprehensive weather plugin for homebridge.
MIT License
311 stars 61 forks source link

No wind sensor with 3.3.4 Beta 1 #291

Closed threeonparfive closed 1 month ago

threeonparfive commented 2 months ago

I recently had a problem where the UI bug in 3.3.3 fails to show the wind speed threshold and apparently also causes it's removal from the JSON config if you modify a setting after initial setup, like the polling interval. This is with Weatherbug and a PWS. Because I wasn't sure where the wind speed setting was supposed to go in the JSON config, I opted to try the 3.3.4 Beta 1 since it's specifically documented to fix this UI bug. It did do that but no wind speed occupancy sensor is created at all when running the beta, though the wind speed threshold is in the config. As soon as I roll back to 3.3.3, the wind speed sensor shows up.

dacarson commented 2 months ago

Can you share a copy of your configuration?

threeonparfive commented 2 months ago

[ { "_bridge": { "username": "00000000", "port": 59142 }, "platform": "WeatherPlus", "units": "us", "stations": [ { "language": "en", "nameNow": "KPTPeppertree", "thresholdWindSpeed": 6, "conditionCategory": "simple", "key": “xxxxxxxxx", "extraHumidity": false, "now": true, "compatibility": "home", "hidden": [ "Air Pressure", "Cloud Cover", "Condition", "Condition Category", "Dew Point", "Forecast Day", "Humidity", "Observation Station", "Observation Time", "Ozone", "Rain", "Rain 1h", "Rain Day", "Rain Chance", "Snow", "Solar Radiation", "Sunrise Time", "Sunset Time", "Temperature Min", "Temperature Apparent", "UV Index", "Visibility", "Wind Direction", "Wind Speed Max" ], "stationId": "KTNKINGS343", "service": "weatherunderground" } ], "interval": 1 } ]

dacarson commented 2 months ago

Thanks. In the code, I see it setting the value. But you are right, it doesn't appear in the app.

threeonparfive commented 2 months ago

I noticed 3.3.4 code is now released. Does it include a fix for this issue seen in beta or still a work in progress? Wasn't sure if I should be upgrading yet or not. Thanks!

naofireblade commented 2 months ago

I missed this ticket. I released the 3.3.4 beta as final because it solved a lot of bugs. This issue is not fixed in 3.3.4.

naofireblade commented 2 months ago

I removed the 3.3.4 release from npm for now.

dacarson commented 2 months ago

I am testing your stationId with my API key, and my API key has just started returning 401, Not Authorized. Though WUnderground site still says that my API key is valid. I have reached out to their support department to understand more.

threeonparfive commented 2 months ago

Other than the UI bug for the threshold value, 3.3.3 is still working fine for me. The wind accessory is there and is updating.

dacarson commented 2 months ago

I have found the issue, but I don't understand why it's an issue.

Diff
dacarson commented 2 months ago

I understand why my code doesn't work. I need to have: this.services = this.services.concat(compatibility.getServices(this)); as concat() doesn't modify the original array., it returns a new array with both sets of elements.

I was confused by this original code, that did work: return [this.informationService, this.CurrentConditionsService, this.historyService].concat(compatibility.getServices(this)); but I changed it because of the way FakeGatoHistoryService needed to work to support LUX (Light Level) history.

threeonparfive commented 2 months ago

Great!! I’ll be on the lookout for an update. Thanks for the quick fix!

threeonparfive commented 1 month ago

When should this code release appear in Homebridge? Thanks!

dacarson commented 1 month ago

I can't publish this repo. I need @naofireblade to publish it. If you could add me as an owner, npm owner add dacarson homebridge-weather-plus I can then also publish :-)