Page 1 of 1

raspberry pi to indigo communication

PostPosted: Mon Dec 07, 2015 8:29 am
by kw123
I would like to start a discussion on how to integrate RPI and similar devices into indigo.

I have chose the following route which seem to be stable and offers fast performance, and puts only a small performance burden on the MAC. But there might be an easier way:

RPI sends HTTP message to the INDIGO MAC, a small python webserver receives the message, does some error checking and then writes to stdout.

The web server was launched by a plugin and the std out is captured as a pipe with no blocking (does not wait for communication)

Then the plugin loops and checks the std out pipe of the web server every 0.5 seconds, if no msg: sleep for 0.5 seconds, if MSG received take the message parse it and use the contents.

Is there an easier way to get the data from an PIR or similar into indigo, that supports buffering of messages?

If anyone wants to see the code, let me know (all included in the piBeacon plugin)

thanks

Karl

Re: raspberry pi to indigo communication

PostPosted: Mon Dec 07, 2015 12:58 pm
by jay (support)
Seems like the MQTT Gateway plugin was designed for this exact type of thing.

Re: raspberry pi to indigo communication

PostPosted: Mon Dec 07, 2015 1:23 pm
by afulki
As above MQTT, with RaspPi running Node-Red.