raspberry pi to indigo communication

Discussion of the extending and hacking of the various Indigo components.
User avatar
kw123
Posts: 8465
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

raspberry pi to indigo communication

Post 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
User avatar
jay (support)
Site Admin
Posts: 18503
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: raspberry pi to indigo communication

Post by jay (support) »

Seems like the MQTT Gateway plugin was designed for this exact type of thing.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
afulki
Posts: 15
Joined: Mon Jun 01, 2015 5:36 am

Re: raspberry pi to indigo communication

Post by afulki »

As above MQTT, with RaspPi running Node-Red.
Post Reply

Return to “Hacking”