Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Local sensor (no radio)

Local sensor (no radio)

Scheduled Pinned Locked Moved Development
6 Posts 4 Posters 4.3k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shabba
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tbowmo
      Admin
      wrote on last edited by
      #2

      @shabba

      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.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shabba
        wrote on last edited by
        #3

        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!

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hek
          Admin
          wrote on last edited by hek
          #4

          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);
          }
          
          
          M 1 Reply Last reply
          0
          • H hek

            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);
            }
            
            
            M Offline
            M Offline
            MarkV
            wrote on last edited by
            #5

            @hek
            And what or how do you register this sensor in domoticz?

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hek
              Admin
              wrote on last edited by
              #6

              Sorry, haven't used Domoticz myself.

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              12

              Online

              11.9k

              Users

              11.2k

              Topics

              113.4k

              Posts


              Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular