Hi Gents
Thanks in advance for any suggestions!
The problem is a Sonoff switch. Works fine using MQTT. OH2 appears to be bound to MQTT.
Then it gets messy! : (
mqtt.cfg looks like this:
mqtt-loc.url=tcp://192.168.1.201:1883
mqtt-loc.clientId=openhab2
Sitemap:
sitemap demo label="Demo House"
{
Switch item=FrontLoungeMedia { mqtt=">[mqtt-loc:cmnd/FrontLoungeMedia/power:command:*:default], mqtt="<[mqtt-loc:stat/FrontLoungeMedia/POWER:state:default]" }
}
Items file:
Group All
/* active groups */
Group:Switch:OR(ON, OFF)
Switch FrontLoungeMedia "Front Lounge Media" <light> (LR,gLight) { mqtt=">[mqtt-loc:cmnd/FrontLoungeMedia/power:command:*:default], <[mqtt-loc:stat/FrontLoungeMedia/POWER:state:default]" }
Switch LivingRoom_Light "Living Room Light" <light> (LR,gLight) { mqtt=">[mqtt-loc:cmnd/FrontLoungeMedia/power:command:*:default], <[mqtt-loc:stat/FrontLoungeMedia/POWER:state:default]" }
/* Locations */
Location DemoLocation "Perth, Western Australia"
Habmin shows two sitemaps: Demo House and Home.
- Demo House shows “FrontLoungeMedia” but not “LivingRoom_Light”
- Home shows “FrontLoungeMedia” but only as a network binding item
OpenHAB log shows:
2017-04-30 14:15:48.344 [DEBUG] [t.mqtt.internal.MqttBrokerConnection] - Starting message consumer for broker 'mqtt-loc' on topic 'stat/FrontLoungeMedia/POWER'
2017-04-30 14:15:48.494 [DEBUG] [ng.mqtt.internal.MqttEventBusBinding] - MQTT: Activating event bus binding.
2017-04-30 14:15:48.517 [DEBUG] [org.openhab.binding.mqtt ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={event.topics=openhab/*, service.pid=org.openhab.mqtt-eventbus, component.name=org.openhab.binding.mqtt.eventbus, component.id=159, service.id=303, service.bundleid=197, service.scope=bundle} - org.openhab.binding.mqtt
2017-04-30 14:15:48.521 [DEBUG] [org.openhab.io.transport.mqtt ] - ServiceEvent REGISTERED - {org.openhab.io.transport.mqtt.MqttService, org.osgi.service.cm.ManagedService}={service.pid=org.openhab.mqtt, component.name=MQTT Connection Service, component.id=169, service.id=299, service.bundleid=199, service.scope=bundle} - org.openhab.io.transport.mqtt
2017-04-30 14:15:48.527 [DEBUG] [org.openhab.io.transport.mqtt ] - BundleEvent STARTED - org.openhab.io.transport.mqtt
2017-04-30 14:15:49.429 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2017-04-30 14:15:53.853 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.thing.link.ThingLinkManager@284ef5' takes more than 5000ms.
2017-04-30 14:15:54.135 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.thing.link.ThingLinkManager@284ef5' takes more than 5000ms.
2017-04-30 14:15:59.082 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.thing.link.ThingLinkManager@284ef5' takes more than 5000ms.
2017-04-30 14:15:59.137 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.io.rest.sse.internal.listeners.SseEventSubscriber@e2dbac' takes more than 5000ms.
mqtt-eventbus.cfg has all lines commented out
So . . .questions:
- Why isn’t the switch in the Demo Home sitemap working?
- Why is the MQTT event bus starting? Is that a problem? How do I stop it?
- Why do I have two sitemaps in Habmin even though there is only one *.sitemap file
- Why isn’t “LivingRoom_Light” showing up even though it is in the demo.items file?
- Why doesn’t flicking the switch using either Habmin or the iOS app result in any result?
Again, any assistance / education appreciated.