python plugin: sunset/sunrise times
Posted: Monday 29 May 2017 19:05
Is it possible to get sunrise/sunset times from Domoticz within a python plugin?
Or the user variables?
Or the user variables?
Open source Home Automation System
https://forum.domoticz.com/
Yes its possible, I thought of it. But is doesn't make sense to call the domoticz API from a plugin.Hesmink wrote:How about using: https://www.domoticz.com/wiki/Domoticz_ ... nset_times
Did anyone find a solution for this so to obtain sunrise and sunset from within a plugin ?elgringo wrote: ↑Wednesday 31 May 2017 11:45Yes its possible, I thought of it. But is doesn't make sense to call the domoticz API from a plugin.Hesmink wrote:How about using: https://www.domoticz.com/wiki/Domoticz_ ... nset_times
I assume it is available within the plugin context since all settings also can be retrieved.
Code: Select all
cmd = '/json.htm?type=command¶m=getSunRiseSet'
dJson = self.request(self.url(cmd))
Domoticz.Debug("result:" + str(dJson))