Logging all state changes
Posted: 18 Feb 2015 01:26
Greetings,
We are trying to write a plugin which logs all sensor state changes. Light goes on, we log it. Temperature goes up, we log it. Motion sensor trips, we log it. You get the picture. In order to accomplish this, we want the plugin to forward notifications of sensor state changes to a separate api we have running on localhost. The code for communicating with the api is easy. Boilerplate JS stuff.
However, we are having difficulty understanding how to tell zway to push all sensor state changes this way. We understand the principle of binding a single explicit sensor state change to a function call, but we want something more dynamic and preferably less verbose. Is anyone aware of how to get it to, for example, log all sensor state changes in a text file? The principle would be the same, we would just be redirecting it to an api instead of a file.
We're pretty stuck on this, so I'd really appreciate the help. If someone is interested in actually writing the plugin we could probably come to an agreement on some sort of compensation as well.
We are trying to write a plugin which logs all sensor state changes. Light goes on, we log it. Temperature goes up, we log it. Motion sensor trips, we log it. You get the picture. In order to accomplish this, we want the plugin to forward notifications of sensor state changes to a separate api we have running on localhost. The code for communicating with the api is easy. Boilerplate JS stuff.
However, we are having difficulty understanding how to tell zway to push all sensor state changes this way. We understand the principle of binding a single explicit sensor state change to a function call, but we want something more dynamic and preferably less verbose. Is anyone aware of how to get it to, for example, log all sensor state changes in a text file? The principle would be the same, we would just be redirecting it to an api instead of a file.
We're pretty stuck on this, so I'd really appreciate the help. If someone is interested in actually writing the plugin we could probably come to an agreement on some sort of compensation as well.