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. openHAB 2.0 binding

openHAB 2.0 binding

Scheduled Pinned Locked Moved OpenHAB
534 Posts 88 Posters 479.6k Views 99 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.
  • avinazA Offline
    avinazA Offline
    avinaz
    wrote on last edited by avinaz
    #215

    Is any bodoy having high CPU load with this binding? My setup is: Openhab 2.0, running on a Pi3, with Java SDK Oracle. Openhab is running +100% CPU all the time. Here is the output of top command:

    top - 19:54:33 up  9:19,  1 user,  load average: 0.98, 1.01, 1.03
    Tasks: 153 total,   1 running, 152 sleeping,   0 stopped,   0 zombie
    %Cpu(s): 21.4 us,  4.2 sy,  0.0 ni, 74.4 id,  0.0 wa,  0.0 hi,  0.1 si,  0.0 st
    KiB Mem :   948056 total,   112832 free,   325232 used,   509992 buff/cache
    KiB Swap:        0 total,        0 free,        0 used.   573692 avail Mem
    
      PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
     3919 root      20   0  455068 180668  14280 S 101.3 19.1 547:33.46 java
    28144 root      20   0    8436   2840   2280 R   0.7  0.3   0:06.30 top
      368 root      20   0    1448     88     16 S   0.3  0.0   0:31.75 rngd
    

    If I look all the threats with command

    ps -Lp 3919
    

    I can see one that is eating too much CPU:

     3919  4226 ?        08:25:13 java
    

    and looking at this one in the output of a thread dump: (4226 DEC = 1082 HEX)

    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: "pool-41-thread-1" #273 prio=5 os_prio=0 tid=0x62addc00 **nid=0x1082** runnable [0x5d6be000]
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]:    java.lang.Thread.State: RUNNABLE
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at gnu.io.RXTXPort.nativeavailable(Native Method)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1568)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011- locked <0x6afb81f8> (a gnu.io.RXTXPort$SerialInputStream)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at sun.nio.cs.StreamDecoder.inReady(StreamDecoder.java:363)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at sun.nio.cs.StreamDecoder.implReady(StreamDecoder.java:371)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at sun.nio.cs.StreamDecoder.ready(StreamDecoder.java:185)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011- locked <0x6b2a41e8> (a java.io.InputStreamReader)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at java.io.InputStreamReader.ready(InputStreamReader.java:195)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at java.io.BufferedReader.ready(BufferedReader.java:463)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011- locked <0x6b2a41e8> (a java.io.InputStreamReader)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at org.openhab.binding.mysensors.protocol.MySensorsReader.run(MySensorsReader.java:50)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    Jun  1 19:30:31 avinaz-pi3 start.sh[3822]: #011at java.lang.Thread.run(Thread.java:745)
    

    You can see that is related to org.openhab.binding.mysensors.protocol.MySensorsReader.run(MySensorsReader.java:50)

    Any ideas?

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

      @avinaz : After a second thought I now have an idea! :D

      With the last commit I changed line 50 in MySensorsReader.java due to an exception I got after upgrading ubuntu/java and OH2.
      The binding (old version) was still unchanged.

      I need to look into this. Maybe @andreacioni has an idea?

      avinazA G 2 Replies Last reply
      0
      • T TimO

        @avinaz : After a second thought I now have an idea! :D

        With the last commit I changed line 50 in MySensorsReader.java due to an exception I got after upgrading ubuntu/java and OH2.
        The binding (old version) was still unchanged.

        I need to look into this. Maybe @andreacioni has an idea?

        avinazA Offline
        avinazA Offline
        avinaz
        wrote on last edited by
        #217

        @TimO I would say at a glance, that the thread is continuously reading the Serial port, with out a break, so this must be very CPU consuming?

        1 Reply Last reply
        0
        • dakkyD Offline
          dakkyD Offline
          dakky
          wrote on last edited by dakky
          #218

          I think i need some help. I am not shure, if my problem lies on the openHab2 side or if there is a problem with the mysensors addon.

          This is what i I have:
          A working mysensors addon. I receive updates in OpenHab:

          2016-06-06 07:12:08.483 [DEBUG] [org.openhab.binding.mysensors       ] - BundleEvent STARTING - org.openhab.binding.mysensors
          2016-06-06 07:12:08.550 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.mysensors.internal.MySensorsHandlerFactory, component.id=7, service.id=102, service.bundleid=11, service.scope=bundle} - org.openhab.binding.mysensors
          2016-06-06 07:12:09.070 [DEBUG] [org.openhab.binding.mysensors       ] - BundleEvent STARTED - org.openhab.binding.mysensors
          2016-06-06 07:12:12.062 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
          2016-06-06 07:12:18.694 [ERROR] [org.openhab.ui.habmin               ] - [org.openhab.ui.habmin.designer(3)] bind method [setItemRegistry] not found; Component will fail
          2016-06-06 07:12:18.702 [ERROR] [org.openhab.ui.habmin               ] - [org.openhab.ui.habmin.designer(3)] bind method [setItemRegistry] not found
          2016-06-06 07:12:25.252 [ERROR] [org.eclipse.smarthome.core.transform] - [org.eclipse.smarthome.action.transformation.action(51)] Circular reference detected, getService returning null
          2016-06-06 07:12:39.288 [INFO ] [rthome.event.ItemThingLinkAddedEvent] - Link 'mysensors_light_gateway_Light_1_0-mysensors:light:gateway:Light_1_0' has been added.
          2016-06-06 07:12:39.315 [INFO ] [smarthome.event.ItemAddedEvent      ] - Item 'home_group_88a3d2a1' has been added.
          2016-06-06 07:12:42.030 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui
          2016-06-06 07:12:42.261 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
          2016-06-06 07:12:42.825 [WARN ] [sql.internal.MysqlPersistenceService] - The SQL user is missing - please configure the sql:user parameter in openhab.cfg
          2016-06-06 07:12:43.071 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
          2016-06-06 07:12:43.114 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
          2016-06-06 07:12:43.470 [INFO ] [.openhab.core.internal.CoreActivator] - openHAB runtime has been started (v2.0.0, build b2).
          2016-06-06 07:12:43.479 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.sitemap'
          2016-06-06 07:12:44.159 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.things'
          2016-06-06 07:12:44.397 [INFO ] [smarthome.event.ThingAddedEvent     ] - Thing 'mysensors:bridge-eth:gateway' has been added.
          2016-06-06 07:12:44.468 [INFO ] [nsors.handler.MySensorsBridgeHandler] - Using Metric measure unit
          2016-06-06 07:12:44.470 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Set skip check on startup to: false
          2016-06-06 07:12:44.489 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=278, service.bundleid=11, service.scope=singleton} - org.openhab.binding.mysensors
          2016-06-06 07:12:44.527 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors Bridge
          2016-06-06 07:12:44.531 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-eth:gateway' changed from UNINITIALIZED to INITIALIZING
          2016-06-06 07:12:44.540 [DEBUG] [rs.protocol.ip.MySensorsIpConnection] - Connecting to bridge ...
          2016-06-06 07:12:44.762 [DEBUG] [g.mysensors.protocol.MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
          2016-06-06 07:12:44.770 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;14;Gateway startup complete.
          2016-06-06 07:12:44.776 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;11;EthernetGateway
          2016-06-06 07:12:44.778 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;12;1.0
          2016-06-06 07:12:44.849 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;2;2.0.0-beta
          2016-06-06 07:12:44.852 [DEBUG] [s.internal.MySensorsBridgeConnection] - Good,Gateway is up and running! (Ver:2.0.0-beta)
          2016-06-06 07:12:44.858 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandler}={thing.type=mysensors:bridge-eth, thing.id=mysensors:bridge-eth:gateway, service.id=279, service.bundleid=11, service.scope=singleton} - org.openhab.binding.mysensors
          2016-06-06 07:12:44.859 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-eth:gateway' changed from INITIALIZING to ONLINE
          2016-06-06 07:12:44.900 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'logging.persist'
          2016-06-06 07:12:44.990 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
          2016-06-06 07:12:45.047 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.items'
          2016-06-06 07:12:45.168 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c0-mysensors:light:gateway:n1c0:status' has been added.
          2016-06-06 07:12:45.171 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c1-mysensors:light:gateway:n1c1:status' has been added.
          2016-06-06 07:12:45.174 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c2-mysensors:humidity:gateway:n1c2:hum' has been added.
          2016-06-06 07:12:45.178 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c3-mysensors:humidity:gateway:n1c3:hum' has been added.
          2016-06-06 07:12:45.182 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c4-mysensors:humidity:gateway:n1c4:hum' has been added.
          2016-06-06 07:14:50.818 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;1
          2016-06-06 07:14:50.820 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
          2016-06-06 07:14:55.831 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;0
          2016-06-06 07:14:55.832 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
          2016-06-06 07:28:01.373 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;1
          2016-06-06 07:28:01.375 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
          2016-06-06 07:28:06.385 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;0
          2016-06-06 07:28:06.387 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
          2016-06-06 07:32:21.567 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;1
          2016-06-06 07:32:21.568 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
          2016-06-06 07:32:26.578 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;0
          2016-06-06 07:32:26.582 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
          

          Seems ok.

          But I am not able to see the result in Openhab

          my.thing:

          mysensors:bridge-eth:gateway [ ipAddress="192.168.100.10", tcpPort=5003, sendDelay=200 ] {
                  /** define things connected to that bridge here */
                  light           n1c0   [ nodeId="1", childId="0", requestAck=true ]
                  light           n1c1   [ nodeId="1", childId="1", requestAck=true ]
                  humidity        n1c2   [ nodeId="1", childId="2" ]
                  humidity        n1c3   [ nodeId="1", childId="3" ]
                  humidity        n1c4   [ nodeId="1", childId="4" ]
          }
          

          my.item:

          Switch n1c0    "PFLANZENNAME1 Pumpe"                    <water> (gGF_irrigation01) { channel="mysensors:light:gateway:n1c0:status" }
          Switch n1c1    "PFLANZENNAME1 Pumpe Automatikmodus"     <water> (gGF_irrigation01) { channel="mysensors:light:gateway:n1c1:status" }
          Number n1c2    "PFLANZENNAME1 Bodenfeuchtigkeit max"    <water> (gGF_irrigation01) { channel="mysensors:humidity:gateway:n1c2:hum" }
          Number n1c3    "PFLANZENNAME1 Bodenfeuchtigkeit min"    <water> (gGF_irrigation01) { channel="mysensors:humidity:gateway:n1c3:hum" }
          Number n1c4    "PFLANZENNAME1 Bodenfeuchtigkeit"        <water> (gGF_irrigation01,gGF_eating) { channel="mysensors:humidity:gateway:n1c4:hum" }
          

          There are simply no values in openhab although I see the debug messages in the openhab log.
          Any idea how to fix it? I did not use the autodicovery of openhab paper UI. what confuses me is the name of the link used by openhab:

          2016-06-06 07:12:45.168 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c0-mysensors:light:gateway:n1c0:status' has been added.
          

          That does not match the channel. is that ok?

          Thank
          Dakky

          EDIT: updated openhab log to complete startup process and added question

          Controller: Raspberry Pi 2 :: Openhab2 :: with @TimO MySensors Binding
          Gateway: Arduino MEGA 2560 R3 :: W5100 :: Ethernet GW

          Software: MySensors 2.0development

          dakkyD 1 Reply Last reply
          0
          • T TimO

            Features

            • Serial Gateway supported (with variable baud rate)
            • Ethernet Gateway supported
            • Supported sensors: S_TEMP, S_HUM, S_VOLTAGE, S_LIGHT, S_POWER, S_BARO, S_DOOR, S_MOTION, S_SMOKE, S_DIMMER, S_COVER (Stop not implemented in OH2 yet), S_WIND, S_RAIN, S_UV, S_WEIGHT, S_DISTANCE, S_LIGHT_LEVEL
            • Request for an ID is answered (random free number is given)
            • Discovery of devices, to use it: start the scan for devices in OpenHAB 2.0 and restart your nodes

            Pictures
            Discovery:
            openhab2-mysensors-discovery-2015-07-27.png

            What is not working yet:

            • no reconnect after lost connection

            How to test:

            Visit the wiki on the GitHub Repo.

            TheekshanaT Offline
            TheekshanaT Offline
            Theekshana
            wrote on last edited by
            #219

            Hey man,
            This is awesome!
            You should add support for Relays.
            :)

            1 Reply Last reply
            1
            • T TimO

              @avinaz : After a second thought I now have an idea! :D

              With the last commit I changed line 50 in MySensorsReader.java due to an exception I got after upgrading ubuntu/java and OH2.
              The binding (old version) was still unchanged.

              I need to look into this. Maybe @andreacioni has an idea?

              G Offline
              G Offline
              gonzalonal
              wrote on last edited by
              #220

              Hi @TimO
              I am having the exact same simtoms. Huge CPU usage with latest binding version.
              Let me know if you need me to run some test to get this solved.

              1 Reply Last reply
              0
              • dakkyD dakky

                I think i need some help. I am not shure, if my problem lies on the openHab2 side or if there is a problem with the mysensors addon.

                This is what i I have:
                A working mysensors addon. I receive updates in OpenHab:

                2016-06-06 07:12:08.483 [DEBUG] [org.openhab.binding.mysensors       ] - BundleEvent STARTING - org.openhab.binding.mysensors
                2016-06-06 07:12:08.550 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.mysensors.internal.MySensorsHandlerFactory, component.id=7, service.id=102, service.bundleid=11, service.scope=bundle} - org.openhab.binding.mysensors
                2016-06-06 07:12:09.070 [DEBUG] [org.openhab.binding.mysensors       ] - BundleEvent STARTED - org.openhab.binding.mysensors
                2016-06-06 07:12:12.062 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
                2016-06-06 07:12:18.694 [ERROR] [org.openhab.ui.habmin               ] - [org.openhab.ui.habmin.designer(3)] bind method [setItemRegistry] not found; Component will fail
                2016-06-06 07:12:18.702 [ERROR] [org.openhab.ui.habmin               ] - [org.openhab.ui.habmin.designer(3)] bind method [setItemRegistry] not found
                2016-06-06 07:12:25.252 [ERROR] [org.eclipse.smarthome.core.transform] - [org.eclipse.smarthome.action.transformation.action(51)] Circular reference detected, getService returning null
                2016-06-06 07:12:39.288 [INFO ] [rthome.event.ItemThingLinkAddedEvent] - Link 'mysensors_light_gateway_Light_1_0-mysensors:light:gateway:Light_1_0' has been added.
                2016-06-06 07:12:39.315 [INFO ] [smarthome.event.ItemAddedEvent      ] - Item 'home_group_88a3d2a1' has been added.
                2016-06-06 07:12:42.030 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui
                2016-06-06 07:12:42.261 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
                2016-06-06 07:12:42.825 [WARN ] [sql.internal.MysqlPersistenceService] - The SQL user is missing - please configure the sql:user parameter in openhab.cfg
                2016-06-06 07:12:43.071 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
                2016-06-06 07:12:43.114 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
                2016-06-06 07:12:43.470 [INFO ] [.openhab.core.internal.CoreActivator] - openHAB runtime has been started (v2.0.0, build b2).
                2016-06-06 07:12:43.479 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.sitemap'
                2016-06-06 07:12:44.159 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.things'
                2016-06-06 07:12:44.397 [INFO ] [smarthome.event.ThingAddedEvent     ] - Thing 'mysensors:bridge-eth:gateway' has been added.
                2016-06-06 07:12:44.468 [INFO ] [nsors.handler.MySensorsBridgeHandler] - Using Metric measure unit
                2016-06-06 07:12:44.470 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Set skip check on startup to: false
                2016-06-06 07:12:44.489 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=278, service.bundleid=11, service.scope=singleton} - org.openhab.binding.mysensors
                2016-06-06 07:12:44.527 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors Bridge
                2016-06-06 07:12:44.531 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-eth:gateway' changed from UNINITIALIZED to INITIALIZING
                2016-06-06 07:12:44.540 [DEBUG] [rs.protocol.ip.MySensorsIpConnection] - Connecting to bridge ...
                2016-06-06 07:12:44.762 [DEBUG] [g.mysensors.protocol.MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
                2016-06-06 07:12:44.770 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;14;Gateway startup complete.
                2016-06-06 07:12:44.776 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;11;EthernetGateway
                2016-06-06 07:12:44.778 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;12;1.0
                2016-06-06 07:12:44.849 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;2;2.0.0-beta
                2016-06-06 07:12:44.852 [DEBUG] [s.internal.MySensorsBridgeConnection] - Good,Gateway is up and running! (Ver:2.0.0-beta)
                2016-06-06 07:12:44.858 [DEBUG] [org.openhab.binding.mysensors       ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandler}={thing.type=mysensors:bridge-eth, thing.id=mysensors:bridge-eth:gateway, service.id=279, service.bundleid=11, service.scope=singleton} - org.openhab.binding.mysensors
                2016-06-06 07:12:44.859 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-eth:gateway' changed from INITIALIZING to ONLINE
                2016-06-06 07:12:44.900 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'logging.persist'
                2016-06-06 07:12:44.990 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
                2016-06-06 07:12:45.047 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.items'
                2016-06-06 07:12:45.168 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c0-mysensors:light:gateway:n1c0:status' has been added.
                2016-06-06 07:12:45.171 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c1-mysensors:light:gateway:n1c1:status' has been added.
                2016-06-06 07:12:45.174 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c2-mysensors:humidity:gateway:n1c2:hum' has been added.
                2016-06-06 07:12:45.178 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c3-mysensors:humidity:gateway:n1c3:hum' has been added.
                2016-06-06 07:12:45.182 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c4-mysensors:humidity:gateway:n1c4:hum' has been added.
                2016-06-06 07:14:50.818 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;1
                2016-06-06 07:14:50.820 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
                2016-06-06 07:14:55.831 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;0
                2016-06-06 07:14:55.832 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
                2016-06-06 07:28:01.373 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;1
                2016-06-06 07:28:01.375 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
                2016-06-06 07:28:06.385 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;0
                2016-06-06 07:28:06.387 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
                2016-06-06 07:32:21.567 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;1
                2016-06-06 07:32:21.568 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
                2016-06-06 07:32:26.578 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;0
                2016-06-06 07:32:26.582 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
                

                Seems ok.

                But I am not able to see the result in Openhab

                my.thing:

                mysensors:bridge-eth:gateway [ ipAddress="192.168.100.10", tcpPort=5003, sendDelay=200 ] {
                        /** define things connected to that bridge here */
                        light           n1c0   [ nodeId="1", childId="0", requestAck=true ]
                        light           n1c1   [ nodeId="1", childId="1", requestAck=true ]
                        humidity        n1c2   [ nodeId="1", childId="2" ]
                        humidity        n1c3   [ nodeId="1", childId="3" ]
                        humidity        n1c4   [ nodeId="1", childId="4" ]
                }
                

                my.item:

                Switch n1c0    "PFLANZENNAME1 Pumpe"                    <water> (gGF_irrigation01) { channel="mysensors:light:gateway:n1c0:status" }
                Switch n1c1    "PFLANZENNAME1 Pumpe Automatikmodus"     <water> (gGF_irrigation01) { channel="mysensors:light:gateway:n1c1:status" }
                Number n1c2    "PFLANZENNAME1 Bodenfeuchtigkeit max"    <water> (gGF_irrigation01) { channel="mysensors:humidity:gateway:n1c2:hum" }
                Number n1c3    "PFLANZENNAME1 Bodenfeuchtigkeit min"    <water> (gGF_irrigation01) { channel="mysensors:humidity:gateway:n1c3:hum" }
                Number n1c4    "PFLANZENNAME1 Bodenfeuchtigkeit"        <water> (gGF_irrigation01,gGF_eating) { channel="mysensors:humidity:gateway:n1c4:hum" }
                

                There are simply no values in openhab although I see the debug messages in the openhab log.
                Any idea how to fix it? I did not use the autodicovery of openhab paper UI. what confuses me is the name of the link used by openhab:

                2016-06-06 07:12:45.168 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'n1c0-mysensors:light:gateway:n1c0:status' has been added.
                

                That does not match the channel. is that ok?

                Thank
                Dakky

                EDIT: updated openhab log to complete startup process and added question

                dakkyD Offline
                dakkyD Offline
                dakky
                wrote on last edited by dakky
                #221

                @dakky said:

                I think i need some help. I am not shure, if my problem lies on the openHab2 side or if there is a problem with the mysensors addon.

                No idea anyone? i'm stucked here and I'd really like to continue :(

                EDIT: MAybe this helps debugging: it seem there is no "link" between things and items. The rest endpoints reveals, that the thing has no item:

                [
                  {
                    "statusInfo": {
                      "status": "ONLINE",
                      "statusDetail": "NONE"
                    },
                    "link": "http://autohome:8080/rest/things/mysensors:bridge-eth:gateway",
                    "configuration": {
                      "tcpPort": 5003,
                      "ipAddress": "192.168.100.10",
                      "skipStartupCheck": false,
                      "imperial": false,
                      "sendDelay": 200
                    },
                    "properties": {},
                    "UID": "mysensors:bridge-eth:gateway",
                    "channels": [
                      {
                        "linkedItems": [],
                        "id": "n1c0",
                        "itemType": "light",
                        "properties": {}
                      },
                      {
                        "linkedItems": [],
                        "id": "n1c1",
                        "itemType": "light",
                        "properties": {}
                      },
                      {
                        "linkedItems": [],
                        "id": "n1c2",
                        "itemType": "humidity",
                        "properties": {}
                      },
                      {
                        "linkedItems": [],
                        "id": "n1c3",
                        "itemType": "humidity",
                        "properties": {}
                      },
                      {
                        "linkedItems": [],
                        "id": "n1c4",
                        "itemType": "humidity",
                        "properties": {}
                      }
                    ]
                  }
                ]
                

                Greetings

                Controller: Raspberry Pi 2 :: Openhab2 :: with @TimO MySensors Binding
                Gateway: Arduino MEGA 2560 R3 :: W5100 :: Ethernet GW

                Software: MySensors 2.0development

                1 Reply Last reply
                0
                • dakkyD Offline
                  dakkyD Offline
                  dakky
                  wrote on last edited by
                  #222

                  Dammit ... found the error ;)

                  created a pull request: https://github.com/tobof/openhab2-addons/pull/18

                  Greetings
                  Dakky

                  Controller: Raspberry Pi 2 :: Openhab2 :: with @TimO MySensors Binding
                  Gateway: Arduino MEGA 2560 R3 :: W5100 :: Ethernet GW

                  Software: MySensors 2.0development

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

                    Glad you found it! :+1:

                    I'm a little low in time at the moment, I will look at the PRs next weekend. Thank you for the contributions! :)

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

                      There is a new jar available that fixes the bug with the high CPU usage.

                      Additionally @meju25 added support for customSensor and an option to adjust the behavior in case no ACK could be received (see wiki). Thanks a lot!

                      avinazA 1 Reply Last reply
                      0
                      • T TimO

                        There is a new jar available that fixes the bug with the high CPU usage.

                        Additionally @meju25 added support for customSensor and an option to adjust the behavior in case no ACK could be received (see wiki). Thanks a lot!

                        avinazA Offline
                        avinazA Offline
                        avinaz
                        wrote on last edited by
                        #225

                        Thanks @TimO , seems is working fine. I updated my installation with the new jar and now CPU is around 4-6%. Thanks a lot. By the way, I did not see a commit in the code repository.

                        T 1 Reply Last reply
                        0
                        • avinazA avinaz

                          Thanks @TimO , seems is working fine. I updated my installation with the new jar and now CPU is around 4-6%. Thanks a lot. By the way, I did not see a commit in the code repository.

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

                          @avinaz: I'm glad, thanks for testing!
                          Did you look into the right branch? I've committed all changes to github.

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            Denke
                            Hardware Contributor
                            wrote on last edited by
                            #227

                            Hi all

                            Implemented a barometric sensor "pressure meter" that i sample in the sensor. Then i send the value Through "BARO". I can see in both the sensor output and the openhab debug that i receive a value for example "1.2".

                            I try to display this in the openhab and i dont get the Text item to update.

                            Anyone know how this can be as i have other values that i am able to display.

                            line in .items
                            String Pool_Pressure "Pressure (bar) [%s]" <pressure> (gPool)

                            line in .sitemap
                            Text item=Pool_Pressure

                            any help is appriciated as i have tried different options with Number and so on

                            RaspberryPi-Openhab

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              Denke
                              Hardware Contributor
                              wrote on last edited by
                              #228

                              Merging sensor to one

                              Hi
                              I have been thinking and i think it would be nice if there is a way to merge sensor data to one in the mysensors binding.

                              Background
                              I am trying to build a pool control based on mysensors and i have a lot of options that i wan it to handle. For example:

                              • on/off of my pool pumps (S_LIGHT)
                              • on/off of lights around the pool (S_LIGHT)
                              • thermostat function for heaters (S_HVAC)
                              • measuring pressure on pump (S_BARO)
                              • measuring consumed power on pump (S_POWER)

                              All this are using the same sensor ID and getting own child IDs. When they now are brought in to openhab they appear as single sensors

                              Is there a possibility to get an automatic merge for thes combined sensors?

                              And what do you think about the idea.
                              Or is there already a solution that exist that I am not aware about

                              example from paper UI
                              0_1465935938914_upload-2840e8d0-1b09-4aa8-965a-4193011e843b

                              with openhab poolcontrol view
                              0_1465936019282_upload-4ee31603-3e67-467c-86ff-d93a758d56d3

                              RaspberryPi-Openhab

                              meju25M 1 Reply Last reply
                              0
                              • D Denke

                                Merging sensor to one

                                Hi
                                I have been thinking and i think it would be nice if there is a way to merge sensor data to one in the mysensors binding.

                                Background
                                I am trying to build a pool control based on mysensors and i have a lot of options that i wan it to handle. For example:

                                • on/off of my pool pumps (S_LIGHT)
                                • on/off of lights around the pool (S_LIGHT)
                                • thermostat function for heaters (S_HVAC)
                                • measuring pressure on pump (S_BARO)
                                • measuring consumed power on pump (S_POWER)

                                All this are using the same sensor ID and getting own child IDs. When they now are brought in to openhab they appear as single sensors

                                Is there a possibility to get an automatic merge for thes combined sensors?

                                And what do you think about the idea.
                                Or is there already a solution that exist that I am not aware about

                                example from paper UI
                                0_1465935938914_upload-2840e8d0-1b09-4aa8-965a-4193011e843b

                                with openhab poolcontrol view
                                0_1465936019282_upload-4ee31603-3e67-467c-86ff-d93a758d56d3

                                meju25M Offline
                                meju25M Offline
                                meju25
                                wrote on last edited by
                                #229

                                @Denke
                                If I understand correctly, you are suggesting to combine different sensor types in one thing.
                                IMHO this would jeopardize the concept of the binding. The binding provides one thing per message type (see https://www.mysensors.org/download/serial_api_15). the thing has one channel per supported sub type.
                                I also do not see the advantage of combining different sensor/message types in one thing as you need one item per channel anyhow.
                                => this would not reduce the number of items needed.

                                Grouping the items in the site map - as you already did - is the best way here.

                                Does anybody see this differently?

                                D 1 Reply Last reply
                                0
                                • meju25M meju25

                                  @Denke
                                  If I understand correctly, you are suggesting to combine different sensor types in one thing.
                                  IMHO this would jeopardize the concept of the binding. The binding provides one thing per message type (see https://www.mysensors.org/download/serial_api_15). the thing has one channel per supported sub type.
                                  I also do not see the advantage of combining different sensor/message types in one thing as you need one item per channel anyhow.
                                  => this would not reduce the number of items needed.

                                  Grouping the items in the site map - as you already did - is the best way here.

                                  Does anybody see this differently?

                                  D Offline
                                  D Offline
                                  Denke
                                  Hardware Contributor
                                  wrote on last edited by
                                  #230

                                  @meju25 I saw this from a management perspective.
                                  I have one device, my pool controller, that has multiple sensors and also channels per sensor just as HVAC that has a sum of channels. In my case i implemented a number of sensors in different types of channels "S_HVAC, S_LIGHT,...." what i see that it gets messy when you try to see if the channels are active or the pool control is active it has multiple sensors.

                                  So maybe a suggestion is to maybe implement this in the mysensors instead of in the openhab binding.
                                  In that case i would like to add something that allows me to tell what channels are in a "sensor" by combining differnt channels and sensor types.

                                  I don't know if i got my message through.

                                  But all this is mainly for management of my devices so that this gets less messy

                                  RaspberryPi-Openhab

                                  1 Reply Last reply
                                  0
                                  • dakkyD Offline
                                    dakkyD Offline
                                    dakky
                                    wrote on last edited by
                                    #231

                                    @TimO do you plan to implement the reconnect thing? I often have to struggle with that and the only solution is the restart the openhab service :S Is there a problem with the reconnect or is it just "another task on the todo list"?

                                    Greetings
                                    Dakky

                                    Controller: Raspberry Pi 2 :: Openhab2 :: with @TimO MySensors Binding
                                    Gateway: Arduino MEGA 2560 R3 :: W5100 :: Ethernet GW

                                    Software: MySensors 2.0development

                                    1 Reply Last reply
                                    0
                                    • D Offline
                                      D Offline
                                      Denke
                                      Hardware Contributor
                                      wrote on last edited by
                                      #232

                                      Hi
                                      Is there anybody that have had a problem with the S_BARO and the V_PRESSURE channel?

                                      I try to send a value on this channel as 1.2 I can see that the serial gateway receives it

                                      23:10:51.808 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;0;3;0;9;read: 163-163-0 s=10,c=1,t=4,pt=7,l=5,sg=0:1.2

                                      I set up the channel as i have done for alot of other channels through the paper ui. where i link the channel to an item.

                                      The item file looks like this
                                      String Pool_Pressure "Pressure [%s]" <pressure> (gPool)

                                      the sitemap file looks like this
                                      Text item=Pool_Pressure

                                      result is this
                                      0_1466111768156_upload-9d8b8d90-c258-4979-b27f-0162a9ffcdc5

                                      The field never gets updated.
                                      any suggestions?

                                      RaspberryPi-Openhab

                                      D 1 Reply Last reply
                                      0
                                      • D Denke

                                        Hi
                                        Is there anybody that have had a problem with the S_BARO and the V_PRESSURE channel?

                                        I try to send a value on this channel as 1.2 I can see that the serial gateway receives it

                                        23:10:51.808 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;0;3;0;9;read: 163-163-0 s=10,c=1,t=4,pt=7,l=5,sg=0:1.2

                                        I set up the channel as i have done for alot of other channels through the paper ui. where i link the channel to an item.

                                        The item file looks like this
                                        String Pool_Pressure "Pressure [%s]" <pressure> (gPool)

                                        the sitemap file looks like this
                                        Text item=Pool_Pressure

                                        result is this
                                        0_1466111768156_upload-9d8b8d90-c258-4979-b27f-0162a9ffcdc5

                                        The field never gets updated.
                                        any suggestions?

                                        D Offline
                                        D Offline
                                        Denke
                                        Hardware Contributor
                                        wrote on last edited by
                                        #233

                                        @Denke
                                        I cant find V_PRESSURE connected to CHANNEL_BARO below, can that be the reason?

                                        0_1466112268981_upload-f457bebe-d1b9-41d0-9f82-a7c55307e5d5

                                        RaspberryPi-Openhab

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

                                          @Denke : You're right, the pressure channel was missing in the thing definition. This is fixed in the current version!

                                          @dakky : Which gateway type keeps disconnecting and why? I've a serial and ethernet gateway running side by side in OH2 and both didn't get disconnected so far. The hardest part is to recognize if the connection gets down.

                                          G dakkyD 2 Replies Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          17

                                          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