Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Matt Perry
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Matt Perry

    @Matt Perry

    0
    Reputation
    3
    Posts
    473
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Matt Perry Follow

    Best posts made by Matt Perry

    This user hasn't posted anything yet.

    Latest posts made by Matt Perry

    • RE: Serial Gateway connection to Openhab

      @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!

      posted in OpenHAB
      Matt Perry
      Matt Perry
    • RE: Serial Gateway connection to Openhab

      @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!

      posted in OpenHAB
      Matt Perry
      Matt Perry
    • RE: Serial Gateway connection to Openhab

      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!

      posted in OpenHAB
      Matt Perry
      Matt Perry