I found a plugin called Twilight, it calculates several dusk/dawn settings... Twilight does not set global variables itself, but I've created some simple macros that do, using Twlight - I'm sure Twlight could be easily modified by a decent Python coder, like yourself to have them natively.
It would be cool if you could add to your plugin, the ability to check global variables before triggering the Vera command.
Specifically trigger vera actions based on dawn/dusk plus the ability to have a time offset, for each individual Action.
Example:
Macro: WATCH MOVIE
-- Action: turn on tv
-- Action: turn on dvd player
-- Action: IF Dawn/Dusk Status >= astronomical.dawn + 30 minutes THEN continue macro, ELSE stop macro
-- Action: turn on light to 30%
Is this something you could add?
radengr wrote:As far as XBMC... I wrote this so that the VeraClient class is abstracted away from both the event loop code and the code that grabs http data. For someone that knows what they are doing it shouldn't be hard to get a XBMC plugin for Vera based on this.
the bold is the key... I'm a hack, at best... it might be a good idea to announce + post the code on the MiCasaVerde Vera forums and see if there are any daring souls who would attempt an XBMC integration.
I suspect what may be needed is to intercept XBMC's JSON API notifications and create a mapping between the JSON notifications and Vera triggers/scenes
Also, we might be able to get some assistance from Jonib, on this forum, since he is the guru behind the XBMC EG plugin. Possibly even directly integrating XBMC JSON API connections directly into your EG Vera plugin - what do you think?



