set_occupied
WooyoungJung0115 opened this issue · 2 comments
Hi, thanks a lot for this awesome package.
What I'm trying to build is
- get occupancy data from the thermostat and its remote sensors every 5 minutes
- If occupancy becomes true, then use either set_hold or set_occupied to change setpoints (let's say heating setpoint during heating hvacMode)
- if occupancy becomes false, then get rid of the event from the thermostat.
- Before turning off the app, save occupancy, setpoints data as a csv file.
This seems doable with your package, and I succeeded to do a simple request (the thermostat_summary_response) once. But the issue is my programming skill. I do programming but I am more of a level that I gotta google many things to build something.
I don't even know whether writing this here is appropriate haha.
Is there any tips or guides that you can give me? It would be very helpful.
Thanks a lot.
Best,
Wooyoung
Hey
My advice to you is to break down the problem into small units which you have done to an extent and then prototype each small unit separately and make sure it works correctly. Then you can start integrating these units together to build the logic you want.
Regarding the polling every 5 minutes, my suggestion is that you use a scheduler to do that (e.g. cron) instead of building an app that loops forever/sleeps for 5 minutes.
Finally, I see no issues at all with googling things. I often do google things as well and I'm pretty sure even the most seasoned programmer do too from time to time, so don't let that discourage you. Having said that what you want to be doing is not just copy/paste from sites like Stack Overflow. You will only improve is you fully understand the code you find online.
Good luck with your app
Thanks a lot.