Local sensor (no radio)
-
I have a RPi 2 controller connected to a uno that has the radio (serial GW). I also have a arduino mega that controls all my heating zones in the house (11). Right now the mega is just spewing out debug on the serial port but I would love to connect it to the RPi and integrate it into my mysensors network. Is there any libraries for doing this or has anyone done similar? I don't want to add a radio to the mega as it is sitting right beside the controller.
Thanks!
-
Depending on how curious you are, and how advanced a setup you want, You could make a mockup that emulates the serialport protocol, it should be pretty easy to do. Or you could make a nodered flow, that picks up data from your mega, and remaps it to mysensor protocol, and then inject that into the data stream in to you controller of choice.
-
Yeah - I guess I was hoping someone else had pioneered it
It is interesting though. I'll try and send the wife and kids away for a week!
-
You should have a look at the "gateway-refactoring" branch. Over there it is possible to create a node without radio.
A serially attached gateway motion sensor would look like this:
// Enable debug prints to serial monitor #define MY_DEBUG // Enable serial gateway #define MY_GATEWAY_SERIAL #include <MySensor.h> #define CHILD_ID 1 MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { sendSketchInfo("Motion Sensor", "1.0"); pinMode(DIGITAL_INPUT_SENSOR, INPUT); present(CHILD_ID, S_MOTION); } void loop() { boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; send(msg.set(tripped?"1":"0")); // Send tripped value to gw sleep(INTERRUPT,CHANGE, SLEEP_TIME); }
-
@hek
And what or how do you register this sensor in domoticz?
-
Sorry, haven't used Domoticz myself.
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33 -
Home Assistant/MySensors quirks
Development • 28 days ago • OldSurferDude 28 days ago -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26 -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14