- Posted on
Tue Jun 19, 2012 5:17 pm
-
bcall
offline
-
- Posts: 59
- Joined: May 17, 2012
It would be great if you could add something to the SQL logger. Anything I can use as a hook, even if I need to do some evaluation on the data (ie, I would handle figuring out what type of error).
For the longer term, I would be happy to work on some type of plugin to do this. In my ISY plugin (which adds an extra layer of control - indigo talks to isy to send insteon commands and receive insteon device updates), I have included hooks for triggers when isy reports a communication error on a particular insteon device. So the process works as follows:
1. indigo standard ui sends my plugin an action (user turned a relay on, for example) for an indigo device (custom relay based on indigo relay)
2. my plugin handles that (thanks to the meta plugin and your custom thermostat for example code) by sending the appropriate command to ISY which in turn sends the insteon command
3. ISY then notifies my plugin of the new device state, or a communication error if the insteon command was not successful.
4. my plugin updates the indigo device state on the server, or in the case of a communication error, marks the device as "in error" and triggers an event
This give me the error checking I need, but only when I go through ISY (which I'd prefer to only do for my remote location insteon devices). For local insteon devices, I'd prefer to stay with the native indigo insteon. Is there a way a plugin could get in between the indigo ui action calls and the insteon execution methods (in a similar way as I've outlined above)? The front end doesn't seem like a problem (receiving indigo standard ui actions for my custom relays, dimmer and thermostats - as I've done with the ISY plugin). I can see from the docs and example plugins that I can also send insteon commands (indigo.device.turnOn(123) for example) to indigo devices on the back end. But the only success/failure feedback I see is through the sendRawCommand methods of the Insteon Commands plugin, which would require me to format the actions into raw insteon. Is there a way to get success failure info from the higher level commands?