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. Controllers
  3. OpenHAB
  4. Serial Gateway connection to Openhab

Serial Gateway connection to Openhab

Scheduled Pinned Locked Moved OpenHAB
development ope
86 Posts 16 Posters 81.1k Views 10 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.
  • T TimO

    @CARSTEN I've compiled a modified version of the OpenHab Serial binding with a baud rate of 115200 as this is standard in mysensors.

    Download: org.openhab.binding.serial_1.6.0.201411271703.jar

    As @tboha suggested you currently have to manage all commands by yourself.

    I've attached my modified serial binding here. Please be aware, that all other configurations that depend on serial binding won't work with the modified version, because of the changed baud rate.

    I'm currently testing with this Serial Gateway:

    Serial Gateway

    Here is my OpenHab configuration for simple testing:

    demo.items: demo.items
    demo.rules: demo.rules
    demo.sitemap: demo.sitemap

    C Offline
    C Offline
    C.r.a.z.y.
    wrote on last edited by
    #11

    @TimO said:

    @CARSTEN I've compiled a modified version of the OpenHab Serial binding with a baud rate of 115200 as this is standard in mysensors.

    Download: org.openhab.binding.serial_1.6.0.201411271703.jar

    As @tboha suggested you currently have to manage all commands by yourself.

    I've attached my modified serial binding here. Please be aware, that all other configurations that depend on serial binding won't work with the modified version, because of the changed baud rate.

    I'm currently testing with this Serial Gateway:

    Serial Gateway

    And a litte sensor/relay combination (switch LED on/off and read DHT22):

    RelayActuator

    Here is my OpenHab configuration for simple testing:

    demo.items: demo.items
    demo.rules: demo.rules
    demo.sitemap: demo.sitemap

    Tim did you modify this jar file? Where can i follow updates?
    1.6.1.jar version have arduino update problems

    T 1 Reply Last reply
    0
    • C C.r.a.z.y.

      @TimO said:

      @CARSTEN I've compiled a modified version of the OpenHab Serial binding with a baud rate of 115200 as this is standard in mysensors.

      Download: org.openhab.binding.serial_1.6.0.201411271703.jar

      As @tboha suggested you currently have to manage all commands by yourself.

      I've attached my modified serial binding here. Please be aware, that all other configurations that depend on serial binding won't work with the modified version, because of the changed baud rate.

      I'm currently testing with this Serial Gateway:

      Serial Gateway

      And a litte sensor/relay combination (switch LED on/off and read DHT22):

      RelayActuator

      Here is my OpenHab configuration for simple testing:

      demo.items: demo.items
      demo.rules: demo.rules
      demo.sitemap: demo.sitemap

      Tim did you modify this jar file? Where can i follow updates?
      1.6.1.jar version have arduino update problems

      T Offline
      T Offline
      TimO
      Hero Member
      wrote on last edited by TimO
      #12

      @C.r.a.z.y. said:

      Tim did you modify this jar file? Where can i follow updates?
      1.6.1.jar version have arduino update problems

      Yes, I've modified the serial binding to work with mysensors.

      I've invested some work to solder a little serial mysensors gateway to test it's stability together with OpenHab. I've soldered two sockets (for an arduino nano and the nrf24l01+) on a perfboard. Currently there are only two sensors with dht22 connected, but everything works stable and smooth.

      Next step is to add two battery driven Atmega328p with dht22. I will build them from the scratch.

      I'm searching for a solution for the updates of the modified serial binding for OpenHab. My current idea is to commit a change to OpenHab, that allows to set the baudrate as a parameter, so I don't need to maintain updates by myself. Another solution could be a special mysensors binding. That would allow a few additional features, but needs to be maintained.

      Little Update:

      I've changed the Serial binding from OpenHab and commited a pull request. Let's see what the OpenHab developers think:

      https://github.com/openhab/openhab/pull/1897

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TimO
        Hero Member
        wrote on last edited by
        #13

        Problem solved, My pull request has been merged in the 1.7.0 branch.

        With the next version OpenHab supports the MySensors serial gateway with the serial binding out of the box.

        Baud rate parameter for example in demo.items:

        String Arduino "XXXXTemperature" { serial="/dev/ttyACM0@115200" }

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Matt Perry
          wrote on last edited by Matt Perry
          #14

          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!

          1 Reply Last reply
          0
          • T Offline
            T Offline
            TimO
            Hero Member
            wrote on last edited by
            #15

            @Matt-Perry
            I don't need to restart the serial gateway when I restart OpenHab.

            Do you use a static or auto node ids? I'm using static node ids. Maybe that is the reason you have to restart everything?

            When restarting OpenHab it outputs something like: "Removing stale Lockfile on "/dev/ttyACM0 .." and that's it.

            M 1 Reply Last reply
            0
            • T TimO

              @Matt-Perry
              I don't need to restart the serial gateway when I restart OpenHab.

              Do you use a static or auto node ids? I'm using static node ids. Maybe that is the reason you have to restart everything?

              When restarting OpenHab it outputs something like: "Removing stale Lockfile on "/dev/ttyACM0 .." and that's it.

              M Offline
              M Offline
              Matt Perry
              wrote on last edited by
              #16

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

              1 Reply Last reply
              0
              • T Offline
                T Offline
                TimO
                Hero Member
                wrote on last edited by
                #17

                What did the OpenHab debug messages say?

                Did you check the permissions? Which user starts OpenHab with the startup script and which user do you use when you call "start.sh". Maybe there is a block because of the lock file? Kill the lock file (something like: "/var/lock/LCK..ttyUSB0") after killing OpenHab and before restarting with "start.sh".

                I'm currently not using a startup script, I'm using "start.sh" within a screen session, which I'm able to resume for debugging or to kill OpenHab.

                My network of MySensors nodes keeps working and reporting (temperature for example) and as soon as there is a controller running, the information is received.

                M 1 Reply Last reply
                0
                • T TimO

                  What did the OpenHab debug messages say?

                  Did you check the permissions? Which user starts OpenHab with the startup script and which user do you use when you call "start.sh". Maybe there is a block because of the lock file? Kill the lock file (something like: "/var/lock/LCK..ttyUSB0") after killing OpenHab and before restarting with "start.sh".

                  I'm currently not using a startup script, I'm using "start.sh" within a screen session, which I'm able to resume for debugging or to kill OpenHab.

                  My network of MySensors nodes keeps working and reporting (temperature for example) and as soon as there is a controller running, the information is received.

                  M Offline
                  M Offline
                  Matt Perry
                  wrote on last edited by
                  #18

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

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    Jan Gatzke
                    wrote on last edited by
                    #19

                    @TimO I tested your openHAB configuration and it is working fine most of the time. There is still one problem I was not able to fix. Some payloads have a dynamic length. Your example rules base on fixed length of the transmitted values, right?
                    I tried to split the incoming strings with string.split("\n"), but the \n seems to be removed by openHAB or the serial gateway. Any ide how we can resolve this? Without this issue openHAB would work perfectly together with the serial gateway.

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      C.r.a.z.y.
                      wrote on last edited by C.r.a.z.y.
                      #20

                      Hi

                      I have the same problem with Matt and tried USB01 but didn't work.
                      When i unplug the usb, server error : Write action failed! Input/output error2015-03-03 19:25:23.682 [ERROR] [b.serial.internal.SerialDevice] - Error writing '100;3;1;0;0;1
                      ' to serial port /dev/ttyUSB0: Input/output error in writeArray

                      Only solution for me stop server, unplug serial usb and plug it. I think ---Kill the lock file (something like: "/var/lock/LCK..ttyUSB0")--- will give the same solution like unplug the usb?

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        C.r.a.z.y.
                        wrote on last edited by
                        #21

                        When i unplug and plug again the serial USB from raspberry :

                        2015-03-04 20:27:56.413 [INFO ] [runtime.busevents ] - AP4 received command ON
                        2015-03-04 20:27:56.564 [INFO ] [runtime.busevents ] - Arduino received command 100;1;1;0;0;1

                        Write action failed! Input/output error2015-03-04 20:27:56.610 [ERROR] [b.serial.internal.SerialDevice] - Error writing '100;1;1;0;0;1
                        ' to serial port /dev/ttyUSB0: Input/output error in writeArray

                        How can fix this?

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          Jan Gatzke
                          wrote on last edited by
                          #22

                          Why are you using a usb to serial adapter to connect the arduino to the raspberry? The raspberry hat an onboard uart at /dev/ttyAMA0. I am using the internal uart and cannot reproduce this kind of error.

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            Jan Gatzke
                            wrote on last edited by
                            #23

                            Why are you using a usb to serial adapter to connect the arduino to the raspberry? The raspberry has an onboard uart at /dev/ttyAMA0. I am using the internal uart and cannot reproduce this kind of error.

                            C 1 Reply Last reply
                            3
                            • J Jan Gatzke

                              Why are you using a usb to serial adapter to connect the arduino to the raspberry? The raspberry has an onboard uart at /dev/ttyAMA0. I am using the internal uart and cannot reproduce this kind of error.

                              C Offline
                              C Offline
                              C.r.a.z.y.
                              wrote on last edited by C.r.a.z.y.
                              #24

                              @Jan-Gatzke said:

                              ttyAMA0
                              :+1:

                              What version openhab runtime and add ons do you use?
                              How many nodes do you have and how long time they are working fine without restart rpi?
                              Please can you upload your config files?

                              1.6.2 or 1.7.0 didn't switch on-off my relays but logs seems ok:

                              I connected nano pins VIN+GND+TX+RX to RPI 5V+GND+TX+RX , (TX->TX , RX->RX)

                              osgi> 2015-03-07 15:49:24.409 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.7.0).
                              2015-03-07 15:49:50.387 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
                              2015-03-07 15:49:51.200 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
                              2015-03-07 15:50:01.540 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.items'
                              2015-03-07 15:50:15.506 [WARN ] [cpr.DefaultAnnotationProcessor] - Unable to detect annotations. Application may fail to deploy.
                              2015-03-07 15:50:17.567 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.sitemap'
                              2015-03-07 15:50:32.786 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
                              2015-03-07 15:50:38.947 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /openhab.app
                              2015-03-07 15:50:51.918 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.rules'
                              RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyAMA0
                              2015-03-07 15:51:01.398 [INFO ] [.service.AbstractActiveService] - NTP Refresh Service has been started

                              2015-03-07 15:51:57.516 [INFO ] [runtime.busevents ] - S2 received command ON
                              2015-03-07 15:52:08.006 [INFO ] [runtime.busevents ] - S2 received command OFF
                              2015-03-07 15:52:11.408 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

                              2015-03-07 15:52:11.722 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

                              2015-03-07 15:52:19.544 [INFO ] [runtime.busevents ] - S1 received command ON
                              2015-03-07 15:52:21.200 [INFO ] [runtime.busevents ] - Arduino received command 51;1;1;0;2;0

                              2015-03-07 15:52:22.143 [INFO ] [runtime.busevents ] - S2 received command ON
                              2015-03-07 15:52:22.259 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

                              2015-03-07 15:52:23.131 [INFO ] [runtime.busevents ] - AP3 received command ON
                              2015-03-07 15:52:24.142 [INFO ] [runtime.busevents ] - Arduino received command 100;3;1;0;0;1

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                TimO
                                Hero Member
                                wrote on last edited by
                                #25

                                I've upgraded to the nightly of OpenHab 1.7.0 to see if I'm able to reproduce your problem.
                                My modified OpenHab 1.6.2 did ran for a few weeks without problems. I'm using an Arduino Nano connected to an old laptop, so no RPi and the FTDI from the Nano.

                                1 Reply Last reply
                                0
                                • C Offline
                                  C Offline
                                  C.r.a.z.y.
                                  wrote on last edited by
                                  #26

                                  @TimO please can you share Openhab files?
                                  +My relay powered from nano icp headers maybe this makes trouble for wifi , i will change this and give update.

                                  1 Reply Last reply
                                  0
                                  • C Offline
                                    C Offline
                                    C.r.a.z.y.
                                    wrote on last edited by C.r.a.z.y.
                                    #27

                                    @TimO

                                    I installed this https://github.com/lurch/rpi-serial-console
                                    pi@raspberrypi ~ $ rpi-serial-console status
                                    Serial console on /dev/ttyAMA0 is disabled

                                    Now my nodes are working perfect when i use manual button or ui but my logs are not correct

                                    My config:

                                    add on : org.openhab.binding.serial_1.6.0.201411271703.jar
                                    String Arduino "Arduino" { serial="/dev/ttyUSB0" }

                                    As you see there are "fails" but nodes are working.

                                    015-03-09 12:37:51.725 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

                                    2015-03-09 12:37:56.726 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 52-52-0 s=255,c=0,t=18,pt=0,l=5:1.4.1
                                    52;255;0;0;18;1.4.1
                                    0;0;3;0;9;read: 52-52-0 s=255,c=3,t=6,pt=1,l=1:0
                                    52;255;3;0;6;0

                                    2015-03-09 12:37:58.768 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 52-52-0 s=255,c=3,t=11,pt=0,l=14:Relay & Button
                                    52;255;3;0;11;Relay & Button
                                    0;0;3;0;9;read: 52-52-0 s=255,c=3,t=12,pt=0,l=3:1.0
                                    52;255;3;0;12;1.0
                                    0;0;3;0;9;read: 52-52-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
                                    52;1;0;0;3;1.4.1
                                    0;0;3;0;9;read: 52-52-0 s=2,c=0,t=3,pt=0,l=5:1.4.1
                                    52;2;0;0;3;1.4.1

                                    2015-03-09 12:37:59.700 [INFO ] [runtime.busevents ] - S2 received command ON
                                    2015-03-09 12:37:59.822 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

                                    2015-03-09 12:38:00.106 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:0

                                    2015-03-09 12:38:00.546 [INFO ] [runtime.busevents ] - S2 received command OFF
                                    2015-03-09 12:38:00.661 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

                                    2015-03-09 12:38:00.967 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

                                    2015-03-09 12:38:01.161 [INFO ] [runtime.busevents ] - S2 received command ON
                                    2015-03-09 12:38:01.339 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

                                    2015-03-09 12:38:01.649 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:0

                                    2015-03-09 12:38:01.782 [INFO ] [runtime.busevents ] - S2 received command OFF
                                    2015-03-09 12:38:01.894 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

                                    2015-03-09 12:38:02.076 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

                                    T 1 Reply Last reply
                                    0
                                    • C C.r.a.z.y.

                                      @TimO

                                      I installed this https://github.com/lurch/rpi-serial-console
                                      pi@raspberrypi ~ $ rpi-serial-console status
                                      Serial console on /dev/ttyAMA0 is disabled

                                      Now my nodes are working perfect when i use manual button or ui but my logs are not correct

                                      My config:

                                      add on : org.openhab.binding.serial_1.6.0.201411271703.jar
                                      String Arduino "Arduino" { serial="/dev/ttyUSB0" }

                                      As you see there are "fails" but nodes are working.

                                      015-03-09 12:37:51.725 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

                                      2015-03-09 12:37:56.726 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 52-52-0 s=255,c=0,t=18,pt=0,l=5:1.4.1
                                      52;255;0;0;18;1.4.1
                                      0;0;3;0;9;read: 52-52-0 s=255,c=3,t=6,pt=1,l=1:0
                                      52;255;3;0;6;0

                                      2015-03-09 12:37:58.768 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;read: 52-52-0 s=255,c=3,t=11,pt=0,l=14:Relay & Button
                                      52;255;3;0;11;Relay & Button
                                      0;0;3;0;9;read: 52-52-0 s=255,c=3,t=12,pt=0,l=3:1.0
                                      52;255;3;0;12;1.0
                                      0;0;3;0;9;read: 52-52-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
                                      52;1;0;0;3;1.4.1
                                      0;0;3;0;9;read: 52-52-0 s=2,c=0,t=3,pt=0,l=5:1.4.1
                                      52;2;0;0;3;1.4.1

                                      2015-03-09 12:37:59.700 [INFO ] [runtime.busevents ] - S2 received command ON
                                      2015-03-09 12:37:59.822 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

                                      2015-03-09 12:38:00.106 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:0

                                      2015-03-09 12:38:00.546 [INFO ] [runtime.busevents ] - S2 received command OFF
                                      2015-03-09 12:38:00.661 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

                                      2015-03-09 12:38:00.967 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

                                      2015-03-09 12:38:01.161 [INFO ] [runtime.busevents ] - S2 received command ON
                                      2015-03-09 12:38:01.339 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;0

                                      2015-03-09 12:38:01.649 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:0

                                      2015-03-09 12:38:01.782 [INFO ] [runtime.busevents ] - S2 received command OFF
                                      2015-03-09 12:38:01.894 [INFO ] [runtime.busevents ] - Arduino received command 52;1;1;0;2;1

                                      2015-03-09 12:38:02.076 [INFO ] [runtime.busevents ] - Arduino state updated to 0;0;3;0;9;send: 0-0-52-52 s=1,c=1,t=2,pt=0,l=1,st=fail:1

                                      T Offline
                                      T Offline
                                      TimO
                                      Hero Member
                                      wrote on last edited by
                                      #28

                                      @C.r.a.z.y. : I don't think this problem is related to OpenHab.

                                      In my case the output looks like this:

                                      2015-03-09 11:50:45.780 [INFO ] [runtime.busevents             ] - Light_Corridor_First_Floor received command ON
                                      2015-03-09 11:50:45.782 [INFO ] [runtime.busevents             ] - Arduino received command 102;2;1;0;2;1
                                      
                                      ArduinoUpdate -> 102;2;1;0;2;1
                                      2015-03-09 11:50:45.990 [INFO ] [runtime.busevents             ] - Arduino state updated to 0;0;3;0;9;send: 0-0-102-102 s=2,c=1,t=2,pt=0,l=1,st=ok:1
                                      
                                      ArduinoUpdate -> 0;0;3;0;9;send: 0-0-102-102 s=2,c=1,t=2,pt=0,l=1,st=ok:1
                                      

                                      OpenHab does not interpret the response (fail/ok). It is something I need to work on.

                                      C 1 Reply Last reply
                                      0
                                      • T TimO

                                        @C.r.a.z.y. : I don't think this problem is related to OpenHab.

                                        In my case the output looks like this:

                                        2015-03-09 11:50:45.780 [INFO ] [runtime.busevents             ] - Light_Corridor_First_Floor received command ON
                                        2015-03-09 11:50:45.782 [INFO ] [runtime.busevents             ] - Arduino received command 102;2;1;0;2;1
                                        
                                        ArduinoUpdate -> 102;2;1;0;2;1
                                        2015-03-09 11:50:45.990 [INFO ] [runtime.busevents             ] - Arduino state updated to 0;0;3;0;9;send: 0-0-102-102 s=2,c=1,t=2,pt=0,l=1,st=ok:1
                                        
                                        ArduinoUpdate -> 0;0;3;0;9;send: 0-0-102-102 s=2,c=1,t=2,pt=0,l=1,st=ok:1
                                        

                                        OpenHab does not interpret the response (fail/ok). It is something I need to work on.

                                        C Offline
                                        C Offline
                                        C.r.a.z.y.
                                        wrote on last edited by
                                        #29

                                        @TimO I think so maybe rpi usb problem...

                                        Is there a newer file for org.openhab.binding.serial_1.6.0.201411271703

                                        T 1 Reply Last reply
                                        0
                                        • C C.r.a.z.y.

                                          @TimO I think so maybe rpi usb problem...

                                          Is there a newer file for org.openhab.binding.serial_1.6.0.201411271703

                                          T Offline
                                          T Offline
                                          TimO
                                          Hero Member
                                          wrote on last edited by
                                          #30

                                          @C.r.a.z.y.: Yes, I'm using the current NIGHTLY from cloudbees: https://openhab.ci.cloudbees.com/job/openHAB/

                                          You need to change:

                                          String Arduino "Arduino" { serial="/dev/ttyUSB0" }
                                          

                                          To:

                                          String Arduino "Arduino" { serial="/dev/ttyUSB0@115200" }
                                          

                                          The communication between the Gateway and the Controller/OpenHab seems to work fine, but the answer from the Gateway is the wrong one. So changing the binding won't solve this problem.

                                          What is the serial output of the receiving node?

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          21

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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