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
M

Matt Perry

@Matt Perry
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Serial Gateway connection to Openhab
    M Matt Perry

    @TimO

    Thanks again for the reply. Everything is working now. I believe the issue was with the serial connection moving to ttyUSB1. I'm not sure of why, or how, but I did create a SYMLINK and everything works just fine now, no matter what USB port the device is plugged into.

    Thanks again!

    OpenHAB development ope

  • Serial Gateway connection to Openhab
    M Matt Perry

    @TimO

    I am giving the nodes static IDs. Here is an example of how I initialize an IR receiver/transmitter that I'm testing...

    #include <MySensor.h>
    #include <SPI.h>
    #include <IRLib.h>
    
    int RECV_PIN = 8;
    
    #define CHILD_1  3  // childId
    #define NODE_ID 101
    
    IRsend irsend;
    IRrecv irrecv(RECV_PIN);
    IRdecode decoder;
    //decode_results results;
    unsigned int Buffer[RAWBUF];
    MySensor gw;
    MyMessage msg(CHILD_1, V_VAR1);
     
    void setup()  
    {   
      irrecv.enableIRIn(); // Start the ir receiver
      decoder.UseExtnBuf(Buffer);
      //gw.begin(incomingMessage);
      gw.begin(incomingMessage, NODE_ID, true);
      // Send the sketch version information to the gateway and Controller
      gw.sendSketchInfo("IR Sensor", "1.0");
     
     // Register a sensors to gw. Use binary light for test purposes.
     gw.present(CHILD_1, S_LIGHT);
    }
    

    Again, if I fully reboot my raspberry pi, it works (I am running Openhab as a startup script). But, if I want to troubleshoot a little bit, and "kill" the Openhab process and then call "start.sh" on the command line, the serial gateway does't reinitialize. Maybe I'm missing a step somewhere?

    If this problem only relates to me, I don't want to waste too much forum space. I could very possibly have something set up wrong on my end and I'll figure it out!

    Thanks!

    OpenHAB development ope

  • Serial Gateway connection to Openhab
    M Matt Perry

    Thank you for this great information. I have been setting up Openhab for the past month, and I've been trying different types of nodes using Moteino (Arduino clone) and RFM69 radios. I have also started building some scripts for Openhab to help streamline the receipt of serial messages. All of this is due to the great information I have found here and in other places on the forums.

    The one issue that has me frustrated is when I reboot OpenHab (I am currently using a headless raspberry pi). In order to get the sensors to work I have to unplug and re-plug in my gateway, and then run around the house and cycle power off and on to all my other nodes. Sometimes this works, and sometimes this doesn't work. Is there a reliable way to restart the serial gateway via software?

    I just did some more troubleshooting and noticed that when I fully reboot the entire raspberry pi, that it comes up correctly. However, sometimes I just want to exit and reboot openhab while I'm doing development.

    Once I find out how to make this part more reliable, the whole system will be working great! Thank you again for all of your very knowledgeable advice!

    OpenHAB development ope
  • Login

  • Don't have an account? Register

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