Can't get mysensors Items to work

Hello :wink:

I’m not shure, if this is binding related or anopenhab problem.

I am using the mysensors binding: https://github.com/tobof/openhab2-addons/tree/MySensors/addons/binding/org.openhab.binding.mysensors

But i don*t see any values in openhab.

This is what i have:

Startup of 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!

This suggest me, that the binding itself is working. The links from my .things file are added also.

my.things:

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" ]
}

And here my items:

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" }

This are changes reported by the mysensors network:

2016-06-06 19:51:03.336 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;1
2016-06-06 19:51:03.338 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!
2016-06-06 19:51:08.350 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 1;3;1;1;1;0
2016-06-06 19:51:08.352 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - ACK received!

but i don’t see any changes to the items in the logfile and in the frontend there are simple no values behind the strings.

Any idea whats wrong here?

Greetings
Dakky

No idea anyone? Or a hint what I might try to debug any further?

Thanks
Dakky

In OH1 I would have tried to add a unit to the item, no idea if that is also true for OH2:

Number n1c2 "PFLANZENNAME1 Bodenfeuchtigkeit max [%d %%]" <water> (gGF_irrigation01) { channel="mysensors:humidity:gateway:n1c2:hum" }

That does not help: the result ist “-%”. It seems there is something broken in the “chain” up receiving values (which seems to work), an the update of the item through the thing. At least this is how I unterstand the thing/item abstraction layer.

:frowning:

when looking at the rest endpoints i can see things without linked items:
[ { "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": {} } ] } ]

(sry for that bad json formatting, but this board software is too strange for me :D)

Any ideas?

NARGLS!

It was an documentation fail. The bridge was creation was documented:

mysensors:bridge-eth:gateway [ ipAddress="127.0.0.1", tcpPort=5003, sendDelay=200 ] {
     /** define things connected to that bridge here */
} 

I MUST be

Bridge mysensors:bridge-eth:gateway [ ipAddress="127.0.0.1", tcpPort=5003, sendDelay=200 ] {
     /** define things connected to that bridge here */
  }

Unfortunately the bridge seems to work and is online but can’t be used by any items. I’ll report this

1 Like

I’m also getting this using the serial gateway as well. (OH2)

The auto discovery correctly picked up the sensors however the values never get updated.

This helped me as well. I have been struggling a lot with the Mysensors items/things but now I saw that I did not have the Bridge infront of the bridge definition.
When I added that it started to happen things. Thanks!