Monitor activity in real time

  • 272 Views
  • Last Post 26 June 2014
sirtwist posted this 24 June 2014

So ... I'm building a client app that uses the JSON API to query status and change state, etc. I've got that working pretty well so far.

However, I'd like to be able to show a notification to the user when activities happen ... for instance, a notification when the front door is unlocked.

Is there any way to create a plugin or something that could get a handle on when device state has changed?

Ryan-Scott posted this 26 June 2014

So ... I'm building a client app that uses the JSON API to query status and change state, etc. I've got that working pretty well so far.

However, I'd like to be able to show a notification to the user when activities happen ... for instance, a notification when the front door is unlocked.

Is there any way to create a plugin or something that could get a handle on when device state has changed?


Right now you'd need to reply on polling. We do have a Websocket that has real-time data coming down it, but we haven't documented anything yet on how it functions.

As far as a plugin.. in theory you could create one that runs as a "controller" only and then simply subscribes to the onChanged event. You could monitor that and then do 'whatever' when a change happens. There's some source code example of a controller out on Github, but if you are interested in this route, let me know and I'll get you some more info on how to accomplish it.

Close