Closed lfliess closed 5 years ago
We already have some weather implementation in the pipeline with Michael. It's likely it will do what you expect but the development is pretty slow, sorry for that.
in that case, I'd like to offer my help since I already have some code done. @MichaelB2018 - do you want to sync on this?
sure - have not had much time to look into this recently, but feel free to merge it.
Is there any partial code you want me to look at? or just go ahead with what I started and we can see where we want to take it from there?
no partial code, I'm afraid. The only thing 2 things I was thinking off are: 1.) use https://github.com/csparpa/pyowm 2.) add a timeType of "weather" (currently it has clock & astro) in the scheduler
Also a small hint.. watch out of oscillating values in OpenWeatherMap... eg. the below is a graph of wind speeds... If I had set a trigger to for the awning to lower/raise at a wind speed of 6 m/s, my awning would have been non-stop busy today: So maybe add some threshold or similar.
In that case, I think the easiest thing is to use hysteresis. You' close the awning if the wind exceeds 6 m/s and open it if it drops below 2 (or don't open it at all)
which you can do easily with 2 different "schedules", so you don't even need to cater for hysteresis in the code.
Absolutely
I gave up on this. will use the new MQTT support to have Home Assistant do this. it already has good weather integration that's being maintained. I actually think this is a better solution to everyone. you can even run hass.io on the same RPi that you use this for. then you don't need MQTT, you can just call the command line commands....
an interesting project might be to implement Pi-Somfy as a HA plug-in
Make sure you use MQTT discovery for Home Assistant (https://www.home-assistant.io/docs/mqtt/discovery/) which makes it easier. Probably need to do a bit more documentation when I get to it. But let me know if you get it to work. Keen to get some more testers in case of any issues
I tried it yesterday with my newly installed hass.io with Mosquitto I installed it in a docker on the same rpi
but I'm getting trouble with discovery. from the logs so far it seems your code does the job and sends a message that looks like a legitimate discovery message, but hass.io doesn't discover a new device.
I also tried manually adding the topics but I think I now have the problem where the MQTT broker starts up too late and hass.io gives up on it on startup.
will try to resolve my issues and tell you if it works for me
I didn't configure my broker correctly. now it works. the cover was discovered and I'm able to control it correctly through HA
great job! I can now use the openweathermap hass.io integration to create any automation I'd like. this is just what I needed
glad t worked. Given that it;s all fresh in your mind, do you want to help with documenting how to set it up? (as you can see, documentation is never my favorite part).
Sure I did just what the documentation said and it worked (-m flag) The trouble I had was setting up Hass.io with mqtt I can put in paragraph about it...
On Wed, Oct 30, 2019, 00:16 MichaelB2018 notifications@github.com wrote:
glad t worked. Given that it;s all fresh in your mind, do you want to help with documenting how to set it up? (as you can see, documentation is never my favorite part).
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Nickduino/Pi-Somfy/issues/32?email_source=notifications&email_token=AANJPR7WGP2YFT5ZXXA2F3LQRCY4XA5CNFSM4HHNVZ52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECSIRCY#issuecomment-547653771, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANJPR7BFK3LIU6UKKUGQDTQRCY4XANCNFSM4HHNVZ5Q .
The trouble I had was setting up Hass.io with mqtt I can put in paragraph about it...
Definitely.
I'm starting work on a weather module - integrates with Yahoo weather, and allowing user to register for closing the awning in case of rain/strong wind (wind speed configurable). I will add this to work together with the CLI shcedule, but would need help to integrate it into the GUI.