Extract Variable Data Within SerialGateway



  • I am pretty new at this so please bare with me. I am not doing a full all-out home automation just yet. All I want to do is send data from one Pro Mini to another to sync RGB LED effects from both systems. So far, I have been able to send data from a modified MockSensors sketch to a modified SerialGateway sketch, but I want to know how I can retrieve variable information from the payload within my modified SerialGateway sketch. The serial output through my serial FTDI interface shows the desired variable data with amazing stability. Now I need to access that variable data so I may act on it in my modified SerialGateway sketch.

    For anyone reading this that has not discovered it yet, the FastLED library will not work with the WS2812B if you choose pin 3 for your data stream. After reading posts here, changing the pin to 5 seems to work nicely. This was a relief for me since I thought that the FastLED library conflicted with the MySensors libraries.

    Also, I am not using a controller. I'm not even sure if I NEED to use SerialGateway to talk to a sensor node. In this case, the node isn't even a sensor. Just another Pro Mini running WS2812B LED effects. Just to include all info... the two Pro Mini's are running LED effects for two driveway wreaths. I want them SYNCED because I want the color schemes to change together.

    So ALL I really need is for one to be the master, sending a number when the effects transition to another scheme. The number will probably be something like 0-15. The slave Pro Mini would get this number to set its effects to the same scheme.

    I know this may seem simple to most of you. I can't WAIT to dive into sensor networks and controllers using the Raspberry Pi or BeagleBone Black. But for now, I just need these two wreaths to be on the same effects page so to speak.

    So a point in the right direction, maybe examples of how two Pro Mini's can transfer data back and forth using the NRF24L01 and these libraries here. I already successfully tested them talking to each other, but I need to know how to access the transferred data and use it.

    Thank you SO MUCH for your time and newbie consideration.


  • Hardware Contributor

    If Hek o Co doesnt have anything new in the dev branch, currently working without a controller is not the way MySensors work. Either you need a controller or you need to rewrite the liberary. The gateway just servers as a reciever and doesnt do anyting logic work. This is done by the controller.


  • Admin

    Well, with static node ids you really don't need a controller. Also make sure to handle Imperial/Metric units yourself.

    Your receiving node does not have to be a "gateway".. you could just setup a repeater node with incoming-data-function defined where you handle the data.



  • Thank you both for the reply. I will look at both solutions because time is running out and I don't want to complicate things any further. I am actually looking at adding the door wreath to the project though, and that is going to have a BeagleBone Black or single core RPi in it. I see there are open-source controllers out there that run on Linux so I am optimistic about that. I would imagine that I need to have a Pro Mini attached to whichever I use that functions as a gateway? Maybe a ESP8266 but that would probably be overkill considering a BBB or RPi can use a wifi dongle.

    hek - do you have any links to info about how to set that repeater up?

    Thanks again! I appreciate the replies!


Log in to reply
 

Suggested Topics

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts