Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)
-
Here are step by step instructions for taking a vanilla OpenHabian 2.2 and adding MQTT Gateway and MySensors to it. This may change, but at the date of this post and with the versions / snapshots below, this currently works:
Pre-requisites / configuation:
- Raspberry-Pi 3 Model B (the only one I'm using, others may work)
- GatewayW1500MQTTClient.ino with nrf24L01+ https://github.com/mysensors/MySensors/blob/master/examples/GatewayW5100MQTTClient/GatewayW5100MQTTClient.ino
(note: If using encryption or many of the features, a 328p will be too small, I'm using a 2560) We call this the MySensors MQTT Gateway - OpenHABian Rasperry Pi Image V1.4.1: https://bintray.com/openhab/bin/download_file?file_path=openhabianpi-raspbian-201804031720-gitdba76f6-crc9e93c3eb.img.xz
- A working SD Card (I was using a Lexar 300X Class 10 that was randomly corrupting files on reboot)
- This works with OpenHAB 2.2 Stable (at the current date)
- openhabianpi-raspbian-201804031720-gitdba76f6-crc9e93c3eb.img written to an SD Card (recommend 8GB or larger)
GatewayW1500MQTTClient I have setup as follows:
#define MY_RADIO_NRF24
#define MY_RF24_PA_LEVEL RF24_PA_MIN // ONLY FOR nrf24L01+ Enhanced, it reduces the output of the nrf24L01 otherwise rfaxis power amp overloads and starts corrupting messages
#define MY_RF24_CHANNEL (109) // 0-126: Note specifying a channel >= 108 clears most of the wifi interference.// Security (Signing)
#define MY_SIGNING_SOFT
//For the software backed signing backend, an unconnected analog pin is required on boards that does not provide a hardware based random generator unit to set a
//random seed for the pseudo-random generator. It is important that the pin is floating, or the output of the pseudo-random generator will be predictable, and thus compromise the signatures.
#define MY_SIGNING_SOFT_RANDOMSEED_PIN A12
#define MY_SIGNING_REQUEST_SIGNATURES#define MY_DEFAULT_ERR_LED_PIN 7 // Error led pin
#define MY_DEFAULT_RX_LED_PIN 8 // Receive led pin
#define MY_DEFAULT_TX_LED_PIN 9 // the PCB, on board L#define MY_GATEWAY_MQTT_CLIENT
// W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
//#define MY_W5100_SPI_EN 4// Enable Soft SPI for NRF radio (note different radio wiring is required)
// The W5100 ethernet module seems to have a hard time co-operate with
// radio on the same spi bus.
#if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
#define MY_SOFTSPI
#define MY_SOFT_SPI_SCK_PIN A0
#define MY_SOFT_SPI_MISO_PIN A2
#define MY_SOFT_SPI_MOSI_PIN A1
#endif// When W5100 is connected we have to move CE/CSN pins for NRF radio
#ifndef MY_RF24_CE_PIN
#define MY_RF24_CE_PIN 5
#endif
#ifndef MY_RF24_CS_PIN
#define MY_RF24_CS_PIN 6
#endif#define MY_MAC_ADDRESS 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX <--- CHANGE TO YOUR MAC ADDRESS
// Static ip setup, otherwise if not defined, dhcp is used
//#define MY_IP_ADDRESS 192,168,178,87
//#define MY_IP_SUBNET_ADDRESS 255,255,255,0
//#define MY_IP_GATEWAY_ADDRESS 192,168,178,1// MQTT broker ip address or url. Define one or the other.
//#define MY_CONTROLLER_URL_ADDRESS "m20.cloudmqtt.com"
#define MY_CONTROLLER_IP_ADDRESS 192, 168, XXX, XXX <--- SET THIS TO THE ADDRESS OF YOUR RASPBERRY PI// The MQTT broker port to to open
#define MY_PORT 1883// Enable these if your MQTT broker requires usenrame/password
#define MY_MQTT_USER "openhabian" <--- MUST MATCH THE USERNAME FOR MOSQUITTO ON THE PI
#define MY_MQTT_PASSWORD "XXXXX" <--- SET THIS TO YOUR A PASSWORD - MUST MATCH THE ONE FOR MOSQUITTO ON THE PI"// Set MQTT client id
#define MY_MQTT_CLIENT_ID "mysensors-1"// Set this node's subscribe and publish topic prefix
#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
Steps:
-
Boot Raspberry pi from SD Card connected to ethernet (if you have any wifi connectivity problems, parts of the installation fail, and you get an incomplete install, that doesn't necessarily fail to complete, hence use ethernet till built)
-
After about 2-3 mins, connect to the Pi with: ssh openhabian@IP_ADDRESS (password: openhabian) and you will see the install in progress
-
Watch until installation has finished (approx 25mins depending on connection speed), the last entry will be "First time setup successfully finished". There should be no errors (except: sed: -e expression #1, char 5: unterminated address regex), if you're getting other errors, retry it (you need to make up the SD Card with the image again), if errors are randomly happening, suspect the SD Card.
-
Ctrl-C and type sudo reboot
-
Verify Installation: After about 5 mins you should be able to connect to: http://IP_ADDRESS:8080, select Standard Setup and wait until PaperUI and HABPanel have appeared
Also: http://IP_ADDRESS:9001 should show no errors -
ssh openhabian@IP_ADDRESS
sudo openhabian-config
Change openhab-cli password:System Settings / Change Passwords / openHAB Console: and set to something, we'll need this when logging into openhab-cli, we'll call this password_openhab-cli
Add Mosquitto:
Optional Components / Mosquitto, set password to something (we'll call this password_mosquitto), needs to match the one in your MySensors gateway and the one in the next step.
Exit
-
Configuring MQTT:
IMPORTANT: DO NOT INSTALL THE MQTT BINDING IN THE PAPER UI, IT CONFLICTS WITH MYSENSORS
cd /srv/openhab2-conf/services nano org.eclipse.smarthome.mqtt.cfg (or use your favorite editor)
add:
mosquitto.url=tcp://localhost:1883 mosquitto.user=openhabian mosquitto.pwd=YOUR_PASSWORD_GOES_HERE (This is password_mosquitto referenced previously) mosquitto.qos=1 mosquitto.retain=true mosquitto.async=false (NOTE: We don't add clientId here, it causes problems and prevents both OpenHab and MySensors connecting due to multiple id's (persistance in use errors). Allowing the id's to be auto and uniquely assigned, will prevent this clash)
save the file and exit
nano mqtt-eventbus.cfg
Add:
broker=mosquitto
save the file and exit
sudo chown openhab:openhabian org.eclipse.smarthome.mqtt.cfg mqtt-eventbus.cfg
Remove the backup files:
cd /var/lib/openhab2/config/org/openhab rm mqtt-eventbus.config cd ../eclipse/smarthome rm mqtt.config sudo reboot
Power cycle or switch on your already configured MySensors MQTT Gateway
-
ssh openhabian@IP_ADDRESS
After a few minutes, visit: http://IP_ADDRESS:9001
You should have no errors. -
Installing MySensors:
openhab-cli console
(if password prompt doesn’t appear after a while, ctrl-c and try again, it can take a while or timeout the first few times after installation, this is password_openhab-cli)
feature:install openhab-transport-serial feature:install esh-io-transport-mqtt CTRL-D cd /srv/openhab2-addons wget http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.3.0-SNAPSHOT.jar sudo chown openhab:openhabian org.openhab.binding.mysensors-2.3.0-SNAPSHOT.jar openhab-cli console
Check the features and services we need are active:
feature:list | grep openhab-transport-serial (Should say Started) feature:list | grep esh-io-transport-mqtt (Should say Started) bundle:list | grep MySensors (Should say Active) bundle:list | grep nrjavaserial (Should say Active) CTRL-D sudo reboot
- ssh openhabian@IP_ADDRESS
After a few minutes, visit: http://IP_ADDRESS:9001
You should have no errors.
Check mosquitto is running and gateway is connected:
cd /var/log/mosquitto tail -f mosquitto.log 526088756: mosquitto version 1.4.10 (build date Fri, 22 Dec 2017 08:19:25 +0000) starting 1526088756: Config loaded from /etc/mosquitto/mosquitto.conf. 1526088756: Opening ipv4 listen socket on port 1883. 1526088756: Opening ipv6 listen socket on port 1883. 1526088764: New connection from 192.168.20.143 on port 1883. 1526088764: New client connected from 192.168.20.143 as mysensors-1 (c1, k15, u'openhabian'). <-- This is the MySensors MQTT Gateway connecting) 1526088783: New connection from 127.0.0.1 on port 1883. <-- This is the MQTT Service on the Raspberry Pi Connecting (If you're not seeing the above, power cycle the MySensors MQTT Gateway) CTRL-C
- Adding MySensors Binding in PaperUI:
Visit: http://IP_ADDRESS:8080 and click on PaperUI
Choose Inbox / + / MySensors Binding / MySensors MQTT Gateway Enable: "Enabled the startup check" Enable: "Enabled network sanity check" (all other settings remain at the default, but you might want to change Imperial/Metric for your preference) Click the "Blue" Checkmark at the top to save.
Choose Configuration / Things (you may have to reload the page) MySensors MQTT Gateway should be ONLINE, if not, check your Gateway is configured correctly. sudo reboot
-
After a few minutes, visit: http://IP_ADDRESS:9001
You should have no errors.
Visit: http://IP_ADDRESS:8080 and click on PaperUI
Visit Configuration / Things, MySensors MQTT Gateway should still be ONLINEssh openhabian@IP_ADDRESS
Check mosquitto is running and gateway is connected:
cd /var/log/mosquitto
tail mosquitto.logIt should look like this:
1526089285: mosquitto version 1.4.10 (build date Fri, 22 Dec 2017 08:19:25 +0000) starting 1526089285: Config loaded from /etc/mosquitto/mosquitto.conf. 1526089285: Opening ipv4 listen socket on port 1883. 1526089285: Opening ipv6 listen socket on port 1883. 1526089294: New connection from 192.168.20.143 on port 1883. 1526089294: New client connected from 192.168.20.143 as mysensors-1 (c1, k15, u'openhabian'). 1526089312: New connection from 127.0.0.1 on port 1883.
CONGRATULATIONS, gateway and mysensors are now setup
-
Now you want to add some mysensors things into PaperUI. Easiest way is to power cycle the sensor, this should result in the sensor appear in the Inbox in PaperUI. For example, I built an RGB Light, when I power cycle it, I see in the Inbox:
MySensors Device (1;1) RGB Light Sensor: mysensors:rgbLight:a6e1bcda:rgblight_1_1Click on the Blue checkmark, and click "Add As Thing"
Go to Configuration / Things, and you should see the MySensors Device(1;1) show up
Click the bolded title of the sensor (MySensors Device (1;1) and check the blue circles you want to see the data for one by one. Each one pops up a "Link Channel" message, change item to "Create new item" and select "Link"That newly added item will now show up in Configuration / Items and also in "Control" so you can change it's status
-
If you're new to this, checkout HABPanel, use PaperUI to setup items, but HABPanel to present a UI for use.
-
Great instructions, thanks!
My problems started yesterday with my OpenHab2 updating to 2.3.0.I'm using Rpi Zero W / DietPi - conf to MQTT gw. Mosquitto and mysgw service work OK. Everything else doesn't.
My problems briefly from the logs:1527624943: New client connected from 127.0.0.1 as mygateway1 (c1, k15, u'masi'). 1527626485: New connection from 127.0.0.1 on port 1883. 1527626485: New client connected from 127.0.0.1 as mosqsub/3760-DietPi (c1, k60, u'masi'). 1527626499: Socket error on client mosqsub/3760-DietPi, disconnecting.
OpenHab (edited):
2018-05-29 23:17:17.655 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTING - org.openhab.binding.mysensors 2018-05-29 23:17:17.880 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTED - org.openhab.binding.mysensors 2018-05-29 23:17:18.019 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=116, service.bundleid=13, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=15} - org.openhab.binding.mysensors 2018-05-29 23:19:24.908 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Tiedostoa tai hakemistoa ei ole) 2018-05-29 23:19:25.184 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online 2018-05-29 23:19:25.985 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge 2018-05-29 23:19:26.257 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist. 2018-05-29 23:19:26.315 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 1, 99, 4, 5] 2018-05-29 23:19:26.594 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog 2018-05-29 23:19:26.795 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto 2018-05-29 23:19:26.834 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=280, service.bundleid=13, service.scope=singleton} - org.openhab.binding.mysensors 2018-05-29 23:19:26.925 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan 2018-05-29 23:19:27.032 [INFO ] [ateway.MySensorsNetworkSanityChecker] - Network Sanity Checker thread stopped 2018-05-29 23:19:27.191 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,1,99,4,5] 2018-05-29 23:19:27.242 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE! 2018-05-29 23:19:27.250 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
I've gone through your steps, Mysensors MQTT gateway remain offline.
What I'm wondering (since the directory structure is different), what is the total content of file: mqtt-eventbus.cfg? Can you post?Ideas?
-
Hey,
same Problem here. After upgrading to OpenHAB 2.3 i receive the same errors in my
/var/log/openhab2/openhab.log
2018-05-31 16:28:42.776 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto 2018-05-31 16:28:42.918 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
-
@andre_m87 & @MasMat : I have the same problem here. Looks like a change in the OpenHAB MQTT implementation.
I'm working on it.
-
@andre_m87 & @MasMat : I found a solution and indeed the MQTT implementation in OH2 (ESH) changed. This was a hard nut to crack, so it took me a while.
Here are the steps you need to do:
- Rename: org.eclipse.smarthome.mqtt.cfg to org.eclipse.smarthome.mqttbroker.cfg
- Change the content to:
name=mosquitto host=192.168.2.3 secure=false port=1883 username=USERNAME password=PASSWORD retain=false
If you're using a secure connection (SSL): change secure to true and use the correct port.
Another intersting feature in OpenHAB 2.3 is the embedded broker, so there is no need to have a separate MQTT server up and running.
-
@timo unfortunately this solution doesn't work for me.
After update oh to version 2.3 I don't get mqtt to work. Prior I used mqtt for mysensors and for eventbus. I configured two broker connections and set up a mysensors-mqtt-bridge via things-file. In the broker all events from openhab arrived and all mysensors-messages arrived in openhab.
After update mysensors doesn't work at all, allthough I followed your instructions. If I setup mqtt1 binding I can see eventbus messages in mqtt broker but my mysensors-mqtt-gateway remains initializing.What I'm doing wrong?
-
@jogant Yeah. There are still some problems with 2.3 to fix. The binding works fine within the development IDE, but only there. I'm still looking into it.
-
Did that, MQTT bridge stuck at "initializing". Not the full answer yet, but thanks @timo for your effort!
Openhab.log when I checked the Services - MQTT in Paper UI
2018-06-08 00:59:19.162 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - Reason unknown 2018-06-08 00:59:19.221 [WARN ] [me.config.core.internal.ConfigMapper] - Could not set field value for field 'port': For input string: "1883.0" java.lang.NumberFormatException: For input string: "1883.0" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?] at java.lang.Integer.parseInt(Integer.java:580) [?:?] at java.lang.Integer.valueOf(Integer.java:766) [?:?] at org.eclipse.smarthome.config.core.internal.ConfigMapper.objectConvert(ConfigMapper.java:159) [98:org.eclipse.smarthome.config.core:0.10.0.oh230] at org.eclipse.smarthome.config.core.internal.ConfigMapper.as(ConfigMapper.java:98) [98:org.eclipse.smarthome.config.core:0.10.0.oh230] at org.eclipse.smarthome.config.core.Configuration.as(Configuration.java:54) [98:org.eclipse.smarthome.config.core:0.10.0.oh230] at org.eclipse.smarthome.io.transport.mqtt.internal.MqttBrokerConnectionServiceInstance.modified(MqttBrokerConnectionServiceInstance.java:77) [207:org.eclipse.smarthome.io.transport.mqtt:0.10.0.oh230] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?] at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:650) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:506) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:307) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:299) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:772) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:727) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:645) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) [41:org.apache.felix.scr:2.0.12] at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2090) [8:org.apache.felix.configadmin:1.8.16] at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2058) [8:org.apache.felix.configadmin:1.8.16] at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16] at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16] at java.lang.Thread.run(Thread.java:748) [?:?] 2018-06-08 00:59:19.340 [WARN ] [.MqttBrokerConnectionServiceInstance] - Ignore existing broker connection configuration for: mosquitto```
-
@masmat please check your MQTT configuration. You're receiving an exception because it's trying to set "1883.0" for the value port.
-
@timo I did. I can't figure out where it's finding that .0 it adds to the 1883 port I have in the cfg-file
-
How close is this for 2.3? Worth a try? or should I hold? Thanks for the work so far on it!
-
@crankycoder Unfortunately there are still issues with the mqtt implementation. I reverted back to 2.2 yesterday as all my fiddling didn't help.
-
my setup is still just using the direct mqtt subscription so i will hold off.
is there any discovery working (in 2.2 that is) how about once you configure the things. do you get all the properties of that item from when it presents?
-
@crankycoder in 2.2 with appropriate binding mysensors is working pretty well. All variables are presented with mysensors lib 2.2.
I only updated openhab to 2.3 as this release was presented on my debian system. But I didn't get 2.3 working with mysensors mqtt.
-
I did an upgrade the other week from 1.8 to 2.2. Then right about the time I had some stuff working 2.3 came out. So I figured since I have to do all the learning curve anyways I might as well stick with 2.3. The variables being presented in mysensors would be HUGE for me. But hopefully it's not too far out.
-
@TimO : are there any news concerning compatibility to version 2.3?
Thanks for your work!
-
@jogant There already is a working version (2.4 SNAPSHOT) available on the marketplace and on my server. Please let me know if you expierence any problems.
-
@timo unfortunately this also does not work for me. I followed your manual very well but I always get errors. It starts after installing feature:install esh-io-transport-mqtt and mysensors binding:
16:59:57.772 [ERROR] [protocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - Reason unknown 16:59:57.806 [INFO ] [o.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.96.8' with clientid paho1135997459230242 and file store '/var/lib/openhab2/mqtt/192.168.96.8' 16:59:57.867 [ERROR] [protocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - {} org.eclipse.paho.client.mqttv3.MqttException: MqttException at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:38) [229:org.eclipse.paho.client.mqttv3:1.0.2] at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:604) [229:org.eclipse.paho.client.mqttv3:1.0.2] at java.lang.Thread.run(Thread.java:748) [?:?] Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[?:?] at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:?] at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) ~[?:?] at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:?] at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) ~[?:?] at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) ~[?:?] at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) ~[?:?] at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) ~[?:?] at org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule.start(SSLNetworkModule.java:89) ~[?:?] at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:590) ~[?:?] ... 1 more
and reconection starts every 10 seconds.
It must be interference with mqtt1 bindung that I use for eventbus.
The mqtt-bridge remains Offline.
What is wrong?
-
@jogant Indeed this looks like an error in your configuration. I suspect the MQTT configuration. Did you change the MQTT configuration according my posting above? I've also added a text to the Wiki. The name and content of the MQTT configuration differs between OpenHAB 2.2 and 2.3.
-
@timo with 2.2 I had two configurations which were very similar.
I have one mosquitto mqtt broker on localhost, version 1.5.
The mqtt1 binding is for my mqtt-eventbus connection is called mosquitto and the config file (mqtt.cfg) is as follows:mosquitto.url=tcp://192.168.96.8:1883 mosquitto.retain=false mosquitto.clientId=openhab mosquitto.user=user mosquitto.pwd=pwd
With OH2.2 this configuration works. It also works with 2.3 as I can see all openhab events on my mosquitto.
My mysonsors binding is configured by org.eclipse.smarthome.mqttbroker.cfg config file which looks as follows:name=mosquittomys host=192.168.96.8 port=1883 retain=false username=username password=password clientId=openhabMys
I also tried without authentication and also without clientId, all to no succuess.
I cleaned /var/lib/openhab2/cache/ folder and /var/lib/openhab2/tmp/ folder.
I looked at /var/lib/openhab2/config folder for resulting runtime configuration, but all looks fine. Do you have any further idea?
-
@timo I found the fault in my configuration: it was the missing secure=false config flag in the org.eclipse.smarthome.mqttbroker.cfg config file. I have no idea what happens when the flag is missing but without it one doesn't achieve a valid connection.
name=mosquittomys host=192.168.96.8 port=1883 secure=false <-- important !
So now I have a working 2.3 installation! Thanks alot for your support.
-
@jogant Good catch! I'm glad it's working now!
-
I'm still unsuccesful.
Do I need to reinstall all the files as well? I didn't find a new set of instructions.In my /etc/openhab2/services-folder I have:
mqtt-eventbus.cfg containing justbroker=mosquitto
and org.eclipse.smarthome.mqttbroker.cfg:
name=mosquitto host=127.0.0.1 secure=false port=1883 secure=false username=XXXX password=YYYYY retain=false clientId=openhabMys
openhab.log everything mysensors related:
2018-07-09 06:40:36.782 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '127.0.0.1' with clientid paho175068223000 and file store '/var/lib/openhab2/mqtt/127.0.0.1' 2018-07-09 06:40:37.050 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTING - org.openhab.binding.mysensors 2018-07-09 06:40:37.075 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTED - org.openhab.binding.mysensors 2018-07-09 06:40:37.206 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=119, service.bundleid=13, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=17} - org.openhab.binding.mysensors 2018-07-09 06:42:36.466 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Tiedostoa tai hakemistoa ei ole) 2018-07-09 06:42:36.685 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online 2018-07-09 06:42:37.484 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge 2018-07-09 06:42:38.136 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist. 2018-07-09 06:42:38.178 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 1, 99, 4, 5] 2018-07-09 06:42:38.608 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog 2018-07-09 06:42:38.830 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=281, service.bundleid=13, service.scope=singleton} - org.openhab.binding.mysensors 2018-07-09 06:42:38.897 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan 2018-07-09 06:42:38.926 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!
Anyone spot what's still wrong?
P.S. I remember seeing someone got MyS gateway to log to a different file. Does anyone know how to implement that in the ./configure -command? Or how can I do that?
-
@masmat two things come to my mind: I have two different broker-names for eventbus connection and mysensors connection. For eventbus binding you need classic mqtt1 binding with its own configuration like this:
mosquitto.url=tcp://127.0.0.1:1883 mosquitto.retain=false mosquitto.clientId=openhab mosquitto.user=user mosquitto.pwd=pwd
And second: can you show your mysensors bridge configuration? Not shure but debug log looks like an ethernet bridge and not a mqtt bridge.
-
Not sure how to answer some of your questions...but here goes.
configuration:sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-signing-password=XXXXXXXX --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=YYYY --my-mqtt-password=ZZZZZ --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
I'm not sure what "eventbus"-binding is. Something I need to install in Paper UI?
Is the configuration file mqtt-eventbus.cfg or something else? Should I try to install it? I have not installed the MQTT binding in OpenHab because at least originally the instructions said not to.
-
@masmat I just wanted to understand your configuration. So I read through whole thread and saw your problems began with upgrade to OH2.3.
I mentioned eventbus as you wrote something about eventbus.cfg.
You need eventbus only if you want to send all oh events to mqtt broker.
I wanted to see your mqtt bridge configuration. You can either configure dynamicly via paper ui or you set it up via things file. The later is what I did. So here is my things file with bridge configuration.Bridge mysensors:bridge-mqtt:gateway [ brokerName="mosquittomys", topicPublish="mysensors1/in", topicSubscribe="mysensors1/out", startupCheckEnabled=true ] { }
Here the brokername has to be the same as in mqttbroker.cfg. Fix topic names to match your mysensors gateway.
Hope this is of any help.
-
This post is deleted!
-
@jogant Finally had time to double check this:
Paper UI:Broker Name mosquitto Subscription Topic mygateway1-out Publish Topic mygateway1-in Send Delay 100 Startup check enabled Metric answer enabled Network sanity check enabled Interval to launch network sanity check 3 Attempts before disconnecting the bridge 3 Heartbeat disabled Attempts before disconnecting nodes 10
EDIT: I noticed I have different topics in MQTT, corrected AND I did:
cd /usr/share/openhab2/addons/ wget http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.4.0-SNAPSHOT.jar <== THIS probably fixed it! chown for the same file rm org.openhab.binding.mysensors-2.3.0-SNAPSHOT.jar
Now my MQTT Gw is ONLINE, in Paper UI I just selected the bridge for every individual Thing and now it works.
Hope this helps people strugling with this.
-
Hi
I want to set this up, but have openHAB already setup and running MQTT using the binding installed in paperui, whereas you say dont use that?
Suggestions? With devices already working well on MQTT currently i want to follow this great, but dont wish to break what i have already working?
Thanks
-
@TimO Thanks for the excellent work with the binding.
I have just got this all running on OH2.3 using mosquito and mqtt mysensors using a Mega 2560. I am migration from a Vera to openHab and have around 20+ mysensors nodes from 1 to 8 devices on each. So this is a significant task. Anyway I am also newish to OH so have a few questions if I may.
- Is it better to go via MQTT or Ethernet Bridge - on Vera I am using Ethernet my new Gateway using the Mega (as pro mini not enough ram to run security) can be either so is there a preference for either of these?
- Is it worth using PaperUI vs Items files for configuration. I am leaning to items files as I am working with Persistance and some complex rules for device control. I have the binding learning nodes during a reboot in PaperUI these are working but I am confused how to build everything outside of the json DB files or even if I should?
- Can MYSController be used somehow in this configuration either MQTT or Ethernet for OTA. At the moment I run this on a PC and connect to the Ethernet gateway do my updates and then let Vera have the gateway back. Is there a better way to link this using openHab?
Sorry for the questions but if you never ask you never learn - thanks.
David
-
@itbeyond As always your mileage will vary depending on experience and goals.
Disclaimer: I only have a couple of MYS-sensors and a small OpenHAB installation for sensing and remote light control. OpenHAB is a complex system so it takes time to master. Fortunately it also has great support and I really like it for its flexiblity, power and structure.-
MQTT or ethernet bridge? I've tried both but never got MQTT to work. Based on the questions in the MYS forums I believe it is easier to use the ethernet connection. I find it easier to troubleshoot. You can start with the ethernet bridge to ensure everything works. Then you can easily switch to the MQTT setup if there are advantages for you. But unless you have other applications that also listen to the MYS messages, I can't really see any obvious reasons to use MQTT. (Of course, it may give you a warm, fuzzy feeling of having an all-MQTT sensor network.)
-
Definitely go for config files. Autodiscovery is neat but there are many things you can't do in PaperUI or that are very difficult to do there. In config files you can also add comments to explain to your future self why you did something.
You can try autodiscovery and PaperUI first if you like and then move to config files. Then you may want to check out the OpenHAB forums on how to manually clear the cache. Sometimes the OH cache is a bit too clever for itself. -
As I understand it, OTA is not supported by any MQTT controller. It is also not supported by OpenHAB. If you use the ethernet bridge you can keep your current ways of working - sensing and control in OpenHAB and update OTA via MYSController. If I'm not mistaken you only have to configure the MYS gw to accept at least two connections.
You seem to know your way around OH already, but I will add a few general comments for beginners, based on my own experience with OpenHAB (as a non-developer):
- First step is to set up backup and restore. Then test that it really works the way you intended.
- Use the production release of OpenHAB unless you really need the bleeding edge. It can be very time consuming to revert from a beta/snapshot release to the production release.
- Spend some time setting up OpenHAB and software around it so you can easily edit the config files. I use Openhabian which automatically shares all interesting files using Samba. It is then trivial to connect from my desktop and edit with my favourite editor. (MS Code has great support for OpenHAB config files.)
- Spend some time on how to properly backup and restore OpenHAB so you can experiment freely and still easily revert if it crashes.
- The OH forum is your friend. It is even more true than for MYS.
E.g. check out the advice on how to name (and not name) your config files, things and items.
and the OH patterns that provides beatiful solutions for many "impossible" problems. - Did I mention backup and restore? At least archive your config directory regularely.
/Fredrik
-
-
@fredswed thanks for your comments. I have gone with Ethernet gateway as it works well and at this stage I do not need MQTT - maybe if I play with node-red or something down the track but for the moment happy with Ethernet - it just works. I did have MQTT working but the MYSController connection is a possible problem.
I have also gone to the config files directly and have worked out the bridge setup in the things file and have a few test items running.
Yes backups - done that and have my system backing up to a local NAS box.
Cheers David
-
I need a fresh set of eyes on my problem.
Gateway is online, but things are not discovered. I have tried adding them manually (my syntax could be wrong), but it doesn't help.There are no errors in mysgw.log-file.
Mosquitto mysensors-out:mysensors-out/1/14/1/0/23 35 mysensors-out/1/15/1/0/0 49 mysensors-out/1/14/1/0/23 35 mysensors-out/1/15/1/0/0 49 mysensors-out/1/14/1/0/23 35 mysensors-out/1/15/1/0/0 49 mysensors-out/1/14/1/0/23 35 mysensors-out/1/15/1/0/0 49
mysgw.things:
Bridge mysensors:bridge-mqtt:mygateway1 [brokerName="mosquitto", topicPublish="mysensors-in", topicSubscribe="mysensors-out", startupCheckEnabled=true ] { /** define things connected to that bridge here */ temperature BoilerTemp [nodeID=1, childId=15] motion PukuhLiike [nodeID=1, childId=3] }
default.items:
Number BoilerTemp "Lämminvesivaraaja [%.1f °C]" <heating> {channel="mysensors:temperature:mygateway1:temperature_1_15:temp"} Contact PukuhLiike "Pukuhuone Liike" <motion> {channel="mysensors:motion:mygateway1:motion_1_3:tripped"}
OpenHab2 frontail:
2018-08-13 22:34:03.284 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '127.0.0.1' with clientid paho111686078117 and file store '/var/lib/openhab2/mqtt/127.0.0.1' 2018-08-13 22:34:05.499 [INFO ] [er.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder 2018-08-13 22:34:11.928 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Helsinki'. 2018-08-13 22:34:11.999 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'fi'. 2018-08-13 22:34:20.211 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.51:8080 2018-08-13 22:34:20.317 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.51:8443 2018-08-13 22:35:16.502 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.items' 2018-08-13 22:35:34.984 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007 2018-08-13 22:35:38.657 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mys.things' 2018-08-13 22:35:39.245 [.ItemChannelLinkAddedEvent] - Link 'PukuhLiike-mysensors:motion:mygateway1:motion_1_3:tripped' has been added. 2018-08-13 22:35:39.309 [.ItemChannelLinkAddedEvent] - Link 'BoilerTemp-mysensors:temperature:mygateway1:temperature_1_15:temp' has been added. 2018-08-13 22:36:14.848 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app 2018-08-13 22:36:18.741 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui 2018-08-13 22:36:22.407 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel 2018-08-13 22:36:25.610 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:mygateway1' changed from UNINITIALIZED to INITIALIZING 2018-08-13 22:36:26.660 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED) 2018-08-13 22:36:26.861 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED) 2018-08-13 22:36:27.453 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:mygateway1' changed from INITIALIZING to ONLINE 2018-08-13 22:36:27.546 [INFO ] [rotocol.mqtt.MySensorsMqttConnection] - Successfully connected to MySensors Bridge. 2018-08-13 22:36:28.075 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING) 2018-08-13 22:36:28.120 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)
In my addons I have the 2.4.0 Snapshot.
org.eclipse.smarthome.mqttbroker.cfg:name=mosquitto host=127.0.0.1 secure=false port=1883 username=XXXX password=YYYYY retain=false clientId=openhabian
EDIT: After a week of trying things. This worked: https://forum.mysensors.org/post/73600
No autodiscovery, but this switches my sensors ONLINE (even ones that are not powered up ), but it's not updating the values.
-
@masmat said in Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable):
No autodiscovery, but this switches my sensors ONLINE (even ones that are not powered up ), but it's not updating the values.
Autodiscovery should work.
Does the temperature thing in OH2 get updates? Is it working?The sensors will show up ONLINE if the connection to the broker is established, because the sensors are just a topic. There is at the moment no implementation to check if the sensors/things are really available. This could be done, but it is not implemented yet.
-
@timo Before I did the re-install of everything autodiscovery was working, but now it isn't. Current sys: RpiZeroW, Openhabian 2.3.0-1release, mosquitto.
The temperature is not updating in OH2. But the mysensors-out topic does show the gateway sending the values out. OH2 is not listening for some reason...Re-install some (which?) parts or bindings? Openhab2 mqtt-binding?
Permissions?
-
@masmat said in Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable):
Number BoilerTemp "Lämminvesivaraaja [%.1f °C]" <heating> {channel="mysensors:temperature:mygateway1:temperature_1_15:temp"}
Needs to be changed to:
Number BoilerTemp "Lämminvesivaraaja [%.1f °C]" <heating> {channel="mysensors:temperature:mygateway1:BoilerTemp:temp"}
But there is something additionally amiss, because discovery is not working.
Please enable debug in the OH2 console and post the output of the initialization.
Don't spend time reinstalling, this looks like a configuration issue.
-
@timo Firstly, I am very thankful for your help.
I changed that item and it started receiving values! I think there's something wrong with my light-level sensor's syntax too.In console I did: log:set DEBUG.
That prints out hundreds and hundreds of lines....should I narrow the search somehow?
-
@masmat I'm glad the first sensor is updating now. Please post the the thing and item definition of the light sensor and I'll look at it.
I only need the debug output from the binding so please use:log:set DEBUG org.openhab.binding.mysensors
-
@timo OK, here's the output:
2018-08-15 23:55:44.092 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '127.0.0.1' with clientid paho79389486520739 and file store '/var/lib/openhab2/mqtt/127.0.0.1' 2018-08-15 23:55:47.333 [INFO ] [er.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder 2018-08-15 23:55:53.357 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Helsinki'. 2018-08-15 23:55:53.406 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '60.172424790463936,25.020736667463083'. 2018-08-15 23:55:53.427 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'fi'. 2018-08-15 23:56:01.971 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.51:8080 2018-08-15 23:56:02.082 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.51:8443 2018-08-15 23:57:01.390 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.items' 2018-08-15 23:57:21.507 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007 2018-08-15 23:57:24.448 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.sitemap' 2018-08-15 23:57:26.351 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mys.things' ==> /var/log/openhab2/events.log <== 2018-08-15 23:57:27.306 [.ItemChannelLinkAddedEvent] - Link 'PukuhLiike-mysensors:motion:mygateway1:PukuhLiike:tripped' has been added. 2018-08-15 23:57:27.346 [.ItemChannelLinkAddedEvent] - Link 'PukuhValoisuus-mysensors:light-level:mygateway1:PukuhValoisuus:light-level' has been added. 2018-08-15 23:57:27.424 [.ItemChannelLinkAddedEvent] - Link 'TalliSivuoviLukko-mysensors:lock:mygateway1:TalliSivuoviLukko:lock-status' has been added. 2018-08-15 23:57:27.487 [.ItemChannelLinkAddedEvent] - Link 'BoilerTemp-mysensors:temperature:mygateway1:BoilerTemp:temp' has been added. 2018-08-15 23:57:27.655 [.ItemChannelLinkAddedEvent] - Link 'TalliSivuovi-mysensors:door:mygateway1:TalliSivuovi:tripped' has been added. ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:57:44.601 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTING - org.openhab.binding.mysensors 2018-08-15 23:57:46.005 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=296, service.bundleid=197, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=176} - org.openhab.binding.mysensors 2018-08-15 23:57:47.811 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTED - org.openhab.binding.mysensors 2018-08-15 23:57:53.081 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app 2018-08-15 23:57:56.733 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui 2018-08-15 23:57:59.038 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel 2018-08-15 23:58:02.474 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:02.518 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:mygateway1' changed from UNINITIALIZED to INITIALIZING ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:02.740 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist. 2018-08-15 23:58:02.777 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [1] 2018-08-15 23:58:03.074 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog 2018-08-15 23:58:03.246 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Connected to MQTT broker! 2018-08-15 23:58:03.294 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=324, service.bundleid=197, service.scope=singleton} - org.openhab.binding.mysensors 2018-08-15 23:58:03.308 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan 2018-08-15 23:58:03.330 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE! ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:03.493 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED) 2018-08-15 23:58:03.617 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED) ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:03.743 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Adding consumer for topic: mysensors-out/+/+/+/+/+ ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:03.840 [hingStatusInfoChangedEvent] - 'mysensors:light-level:mygateway1:PukuhValoisuus' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED) 2018-08-15 23:58:03.908 [hingStatusInfoChangedEvent] - 'mysensors:door:mygateway1:TalliSivuovi' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED) 2018-08-15 23:58:03.997 [hingStatusInfoChangedEvent] - 'mysensors:lock:mygateway1:TalliSivuoviLukko' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED) ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:04.055 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2; 2018-08-15 23:58:04.076 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Sending MQTT Message: Topic: mysensors-in, Message: 0;0;3;0;2; 2018-08-15 23:58:04.241 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/0/255/3/0/2, Message: 2.3.0 2018-08-15 23:58:04.276 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 0/255/3/0/2 2018-08-15 23:58:04.311 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 0;255;3;0;2;2.3.0 2018-08-15 23:58:04.373 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.3.0 2018-08-15 23:58:04.390 [DEBUG] [rsAbstractConnection$MySensorsReader] - Good,Gateway is up and running! (Ver:2.3.0) ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:04.849 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:mygateway1' changed from INITIALIZING to ONLINE ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:04.940 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [1] 2018-08-15 23:58:04.975 [INFO ] [rotocol.mqtt.MySensorsMqttConnection] - Successfully connected to MySensors Bridge. 2018-08-15 23:58:05.191 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=5, childId=5, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false} ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:05.211 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:05.224 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=1, childId=15, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false} 2018-08-15 23:58:05.347 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=1, childId=3, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false} 2018-08-15 23:58:05.404 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=1, childId=14, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false} 2018-08-15 23:58:05.494 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=5, childId=6, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false} 2018-08-15 23:58:05.521 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Adding device MySensorsNode [nodeId=5, childNumber=1, chidldList={5=MySensorsChild [childId=5, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LOCK_STATUS=MySensorsVariableVLockStatus [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]}] 2018-08-15 23:58:05.610 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Merging child map: {5=MySensorsChild [childId=5, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LOCK_STATUS=MySensorsVariableVLockStatus [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]} with: {6=MySensorsChild [childId=6, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_TRIPPED=MySensorsVariableVTripped [value=null], V_ARMED=MySensorsVariableVArmed [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]} 2018-08-15 23:58:05.607 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 5-5 not registered yet, registering... ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:05.704 [hingStatusInfoChangedEvent] - 'mysensors:lock:mygateway1:TalliSivuoviLukko' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:05.737 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Merging child map: {} with: {14=MySensorsChild [childId=14, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_LEVEL=MySensorsVariableVLevel [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LIGHT_LEVEL=MySensorsVariableVLightLevel [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]} ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:05.800 [hingStatusInfoChangedEvent] - 'mysensors:light-level:mygateway1:PukuhValoisuus' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:05.769 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 5-6 not registered yet, registering... 2018-08-15 23:58:05.783 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Merging child map: {14=MySensorsChild [childId=14, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_LEVEL=MySensorsVariableVLevel [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LIGHT_LEVEL=MySensorsVariableVLightLevel [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]} with: {15=MySensorsChild [childId=15, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null], V_TEMP=MySensorsVariableVTemp [value=null], V_ID=MySensorsVariableVId [value=null]}]} 2018-08-15 23:58:05.795 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 1-14 not registered yet, registering... 2018-08-15 23:58:05.858 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Merging child map: {14=MySensorsChild [childId=14, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_LEVEL=MySensorsVariableVLevel [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LIGHT_LEVEL=MySensorsVariableVLightLevel [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}], 15=MySensorsChild [childId=15, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null], V_TEMP=MySensorsVariableVTemp [value=null], V_ID=MySensorsVariableVId [value=null]}]} with: {3=MySensorsChild [childId=3, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_TRIPPED=MySensorsVariableVTripped [value=null], V_ARMED=MySensorsVariableVArmed [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]} 2018-08-15 23:58:05.866 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 1-15 not registered yet, registering... ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:05.908 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:05.902 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 1-3 not registered yet, registering... ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:05.982 [hingStatusInfoChangedEvent] - 'mysensors:door:mygateway1:TalliSivuovi' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING 2018-08-15 23:58:06.050 [hingStatusInfoChangedEvent] - 'mysensors:lock:mygateway1:TalliSivuoviLukko' changed from INITIALIZING to ONLINE 2018-08-15 23:58:06.109 [hingStatusInfoChangedEvent] - 'mysensors:light-level:mygateway1:PukuhValoisuus' changed from INITIALIZING to ONLINE 2018-08-15 23:58:06.160 [hingStatusInfoChangedEvent] - 'mysensors:door:mygateway1:TalliSivuovi' changed from INITIALIZING to ONLINE 2018-08-15 23:58:06.202 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from INITIALIZING to ONLINE 2018-08-15 23:58:06.253 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from INITIALIZING to ONLINE ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:10.493 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/1/14/1/0/23, Message: 0 2018-08-15 23:58:10.511 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 1/14/1/0/23 2018-08-15 23:58:10.526 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 1;14;1;0;23;0 2018-08-15 23:58:10.542 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 1;14;1;0;23;0 2018-08-15 23:58:10.574 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 1 found in gateway 2018-08-15 23:58:10.586 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/1/15/1/0/0, Message: 53 2018-08-15 23:58:10.606 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 1/15/1/0/0 2018-08-15 23:58:10.591 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 14 found in node 1 2018-08-15 23:58:10.619 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 1;15;1;0;0;53 2018-08-15 23:58:10.661 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: light-level(V_LIGHT_LEVEL) value to: 0 ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:11.034 [vent.ItemStateChangedEvent] - PukuhValoisuus changed from NULL to 0 ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:11.617 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 1/14 to 2018-08-15T23:58:10.000+0300 2018-08-15 23:58:11.629 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 1;15;1;0;0;53 2018-08-15 23:58:11.642 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 1 found in gateway 2018-08-15 23:58:11.657 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 15 found in node 1 2018-08-15 23:58:11.671 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: temp(V_TEMP) value to: 53 ==> /var/log/openhab2/events.log <== 2018-08-15 23:58:11.758 [vent.ItemStateChangedEvent] - BoilerTemp changed from NULL to 53 ==> /var/log/openhab2/openhab.log <== 2018-08-15 23:58:11.770 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 1/15 to 2018-08-15T23:58:11.000+0300 2018-08-15 23:58:47.461 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/1/14/1/0/23, Message: 0 2018-08-15 23:58:47.482 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 1/14/1/0/23 2018-08-15 23:58:47.495 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 1;14;1;0;23;0 2018-08-15 23:58:47.513 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 1;14;1;0;23;0 2018-08-15 23:58:47.533 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 1 found in gateway 2018-08-15 23:58:47.565 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/1/15/1/0/0, Message: 53 2018-08-15 23:58:47.556 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 14 found in node 1 2018-08-15 23:58:47.579 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: light-level(V_LIGHT_LEVEL) value to: 0 2018-08-15 23:58:47.597 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 1/15/1/0/0 2018-08-15 23:58:47.612 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 1;15;1;0;0;53 2018-08-15 23:58:47.719 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 1/14 to 2018-08-15T23:58:47.000+0300 2018-08-15 23:58:47.731 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 1;15;1;0;0;53 2018-08-15 23:58:47.750 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 1 found in gateway 2018-08-15 23:58:47.765 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 15 found in node 1 2018-08-15 23:58:47.778 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: temp(V_TEMP) value to: 53 2018-08-15 23:58:47.839 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 1/15 to 2018-08-15T23:58:47.000+0300
And my item & thing (in separate files of course):
Number PukuhValoisuus "Pukuhuone valoisuus [%.1f %]" <719914_monitor> {channel="mysensors:light-level:mygateway1:PukuhValoisuus:light-level"} light-level PukuhValoisuus [nodeId=1, childId=14]
-
I have a strange issue now when I am trying to bring my irrigation controller over from Vera to openHab. I setup the Ethernet Gateway and have several nodes working ok. I then configured the binding to have the irrigation controller as follows:
Bridge mysensors:bridge-eth:gateway [ ipAddress="192.168.100.63", tcpPort=5003, sendDelay=150, startupCheckEnabled=true, networkSanCheckEnabled=true, networkSanCheckInterval=1, networkSanCheckConnectionFailAttempts=1 ] { light Water_All_Zones "Water - All Zones" @ "Backyard" [ nodeId=2, childId=0 ] light Water_Zone1 "Water - Veg Garden" @ "Backyard" [ nodeId=2, childId=1 ] light Water_Zone2 "Water - Rear Garden" @ "Backyard" [ nodeId=2, childId=2 ] light Water_Zone3 "Water - Side Garden" @ "Backyard" [ nodeId=2, childId=3 ] light Water_Zone4 "Water - Verge Grass" @ "Backyard" [ nodeId=2, childId=4 ] light Water_Zone5 "Water - Front Grass" @ "Backyard" [ nodeId=2, childId=5 ] light Water_Zone6 "Water - Front Garden" @ "Backyard" [ nodeId=2, childId=6 ] cover Courtyard_Door_Blind "Door Blind" @ "Courtyard" [ nodeId=4, childId=1 ] cover Office_Front_Blinds "Front Blinds" @ "Office" [ nodeId=4, childId=2 ] cover Office_Side_Blinds "Side Blinds" @ "Office" [ nodeId=4, childId=3 ] cover Courtyard_LHS_Blinds "LHS Blinds" @ "Courtyard" [ nodeId=4, childId=4 ] cover Courtyard_RHS_Blinds "RHS Blinds" @ "Courtyard" [ nodeId=4, childId=5 ] power Power_Phase1 "Energy Phase 1" @ "Garage" [ nodeId=5, childId=0 ] power Power_Phase2 "Energy Phase 2" @ "Garage" [ nodeId=5, childId=1 ] power Power_Phase3 "Energy Phase 3" @ "Garage" [ nodeId=5, childId=2 ] power Power_Main "Energy Main" @ "Garage" [ nodeId=5, childId=8 ] light Entry_FrontGarden_Lights "Power Socket Relay" @ "Entry" [ nodeId=7, childId=1 ] light Office_Door "Door Controller" @ "Office" [ nodeId=13, childId=1 ] light Desktop_Debug_Light "Power Socket Relay" @ "Office" [ nodeId=27, childId=1 ] }
So far so good, I then setup the items as follows:
Switch Water_All_Zones "Water All Zones" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ] {channel="mysensors:light:gateway:Water_All_Zones:status"} Switch Water_Veg_Garden "Water - Veg Garden" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ] {channel="mysensors:light:gateway:Water_Zone1:status"} Switch Water_Rear_Garden "Water - Rear Garden" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ] {channel="mysensors:light:gateway:Water_Zone2:status"} Switch Water_Side_Garden "Water - Side Garden" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ] {channel="mysensors:light:gateway:Water_Zone3:status"} Switch Water_Verge_Grass "Water - Verge Grass" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ] {channel="mysensors:light:gateway:Water_Zone4:status"} Switch Water_Front_Grass "Water - Front Grass" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ] {channel="mysensors:light:gateway:Water_Zone5:status"} Switch Water_Front_Garden "Water - Front Garden" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ] {channel="mysensors:light:gateway:Water_Zone6:status"} Number Water_Zone1_AllTime "Water - Zone 1 - All Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone1:var1"} Number Water_Zone2_AllTime "Water - Zone 2 - All Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone2:var1"} Number Water_Zone3_AllTime "Water - Zone 3 - All Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone3:var1"} Number Water_Zone4_AllTime "Water - Zone 4 - All Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone4:var1"} Number Water_Zone5_AllTime "Water - Zone 5 - All Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone5:var1"} Number Water_Zone6_AllTime "Water - Zone 6 - All Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone6:var1"} Number Water_Zone1_Time "Water - Zone1 - Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone1:var2"} Number Water_Zone2_Time "Water - Zone2 - Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone2:var2"} Number Water_Zone3_Time "Water - Zone3 - Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone3:var2"} Number Water_Zone4_Time "Water - Zone4 - Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone4:var2"} Number Water_Zone5_Time "Water - Zone5 - Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone5:var2"} Number Water_Zone6_Time "Water - Zone6 - Time [%d]" <selfruntime> (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone6:var2"} String Water_Zone1_Name "Water - Zone1 - Name [%s]" (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone1:var3"} String Water_Zone2_Name "Water - Zone2 - Name [%s]" (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone2:var3"} String Water_Zone3_Name "Water - Zone3 - Name [%s]" (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone3:var3"} String Water_Zone4_Name "Water - Zone4 - Name [%s]" (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone4:var3"} String Water_Zone5_Name "Water - Zone5 - Name [%s]" (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone5:var3"} String Water_Zone6_Name "Water - Zone6 - Name [%s]" (gDevices,gRoom_Backyard) {channel="mysensors:light:gateway:Water_Zone6:var3"}
As the Irrigation project uses 3 vars to manage time and names I setup a System Started rule as follows:
rule "System started" when System started then createTimer(now.plusSeconds(180)) [ | logInfo("Watering", "System started") if (Water_Zone1_AllTime.state == NULL) Water_Zone1_AllTime.sendCommand(5 as Number) if (Water_Zone2_AllTime.state == NULL) Water_Zone2_AllTime.sendCommand(8 as Number) if (Water_Zone3_AllTime.state == NULL) Water_Zone3_AllTime.sendCommand(8 as Number) if (Water_Zone4_AllTime.state == NULL) Water_Zone4_AllTime.sendCommand(12 as Number) if (Water_Zone5_AllTime.state == NULL) Water_Zone5_AllTime.sendCommand(12 as Number) if (Water_Zone6_AllTime.state == NULL) Water_Zone6_AllTime.sendCommand(10 as Number) if (Water_Zone1_Time.state == NULL) Water_Zone1_Time.sendCommand(5 as Number) if (Water_Zone2_Time.state == NULL) Water_Zone2_Time.sendCommand(8 as Number) if (Water_Zone3_Time.state == NULL) Water_Zone3_Time.sendCommand(8 as Number) if (Water_Zone4_Time.state == NULL) Water_Zone4_Time.sendCommand(12 as Number) if (Water_Zone5_Time.state == NULL) Water_Zone5_Time.sendCommand(12 as Number) if (Water_Zone6_Time.state == NULL) Water_Zone6_Time.sendCommand(10 as Number) if (Water_Zone1_Name.state == NULL) Water_Zone1_Name.sendCommand("Veg Garden") if (Water_Zone2_Name.state == NULL) Water_Zone2_Name.sendCommand("Rear Garden") if (Water_Zone3_Name.state == NULL) Water_Zone3_Name.sendCommand("Side Garden") if (Water_Zone4_Name.state == NULL) Water_Zone4_Name.sendCommand("Verge Grass") if (Water_Zone5_Name.state == NULL) Water_Zone5_Name.sendCommand("Front Grass") if (Water_Zone6_Name.state == NULL) Water_Zone6_Name.sendCommand("Front Garden") ] end
This all loaded up nicely (for interest I tried postUpdate as well as sendCommand) shows the right stuff in PaperUI - Control can see all the numbers and string however I have had several issues with the setup.
Firstly when my controller requests the time from the gateway it receives UTC and is showing the wrong time on the LCD display. I have checked that my controller is configured for the right timezone and is showing the right time but everytime I reset the Irrigation controller and it requests the time it is getting UTC. (I did work once and got the right time but not sure how this occurred) I rebooted the openhabianpi unit and it is still delivering UTC, but the fact it did it right once means I cannot just adjust the timezone in the node as it may get it right somehow and then be adjusted wrong! I would have thought the gateway should deliver the correct system time.
Secondly I cannot get the Irrigation Controller to read the var3 String value - when this is requested from from the Irrigation controller it only gets a 0 (numeric). This seems to indicate that the var's can only handle a Number - is this true and how does one get around this if this is the case? I tried changing the value in PaperUI and it changes but nothing gets sent to the node but changing the numeric values in var1 & 2 update to the node - all updates are shown in the logtail.
For the record here is the Serial boot log from the node:
__ __ ____ | \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___ | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __| | | | | |_| |___| | __/ | | \__ \ _ | | \__ \ |_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/ |___/ 2.2.0 16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.2.0 25 TSM:INIT 26 TSF:WUR:MS=0 33 TSM:INIT:TSP OK 35 TSM:INIT:STATID=2 37 TSF:SID:OK,ID=2 39 TSM:FPAR 75 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 81 TSF:MSG:READ,0-0-2,s=255,c=3,t=8,pt=1,l=1,sg=0:0 87 TSF:MSG:FPAR OK,ID=0,D=1 2082 TSM:FPAR:OK 2083 TSM:ID 2084 TSM:ID:OK 2086 TSM:UPL 2089 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1 2100 TSF:MSG:READ,0-0-2,s=255,c=3,t=25,pt=1,l=1,sg=0:1 2105 TSF:MSG:PONG RECV,HP=1 2107 TSM:UPL:OK 2109 TSM:READY:ID=2,PAR=0,DIS=1 2113 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 2120 TSF:MSG:READ,0-0-2,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 2127 TSF:MSG:SEND,2-2-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.2.0 2137 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0 2156 TSF:MSG:READ,0-0-2,s=255,c=3,t=6,pt=0,l=1,sg=0:M 2163 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=11,pt=0,l=19,sg=0,ft=0,st=OK:Irrigation Ctrl (2) 2173 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:4.0 2182 TSF:MSG:SEND,2-2-0-0,s=0,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2189 TSF:MSG:SEND,2-2-0-0,s=1,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2196 TSF:MSG:SEND,2-2-0-0,s=2,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2204 TSF:MSG:SEND,2-2-0-0,s=3,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2211 TSF:MSG:SEND,2-2-0-0,s=4,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2219 TSF:MSG:SEND,2-2-0-0,s=5,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2227 TSF:MSG:SEND,2-2-0-0,s=6,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2232 MCO:REG:REQ 2236 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2 2242 TSF:MSG:READ,0-0-2,s=255,c=3,t=27,pt=1,l=1,sg=0:1 2247 MCO:PIM:NODE REG=1 2249 MCO:BGN:STP Initialising... Turning All Valves Off... Checking EEPROM for stored date: Retreiving last run time from EEPROM... Sensor Presentation Complete Ready... 2907 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=1,pt=0,l=0,sg=0,ft=0,st=OK: Requesting time from Gateway: 2932 TSF:MSG:READ,0-0-2,s=255,c=3,t=1,pt=0,l=10,sg=0:1534904507 Time value received and updated... Clock updated.... Sensor's time currently set to: 02:21am ***** Should be 10:21am GMT +8 ******* 8/22/2018 Wednesday Calling for Valve 1 Data... 3946 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 3966 TSF:MSG:READ,0-0-2,s=1,c=1,t=24,pt=0,l=1,sg=0:5 Recieved variable1 valve:1 = 5 New Zone Times Recieved... Zone 1 individual time: 0 group time: 5 name: Zone 1 Zone 2 individual time: 0 group time: 0 name: Zone 2 Zone 3 individual time: 0 group time: 0 name: Zone 3 Zone 4 individual time: 0 group time: 0 name: Zone 4 Zone 5 individual time: 0 group time: 0 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 4005 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4065 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4116 TSF:MSG:READ,0-0-2,s=1,c=1,t=25,pt=0,l=1,sg=0:5 Recieved variable2 valve:1 = 5 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: Zone 1 Zone 2 individual time: 0 group time: 0 name: Zone 2 Zone 3 individual time: 0 group time: 0 name: Zone 3 Zone 4 individual time: 0 group time: 0 name: Zone 4 Zone 5 individual time: 0 group time: 0 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 4152 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 4212 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 4267 TSF:MSG:READ,0-0-2,s=1,c=1,t=25,pt=0,l=1,sg=0:5 Recieved variable2 valve:1 = 5 Calling for Valve 2 Data... 4303 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 4363 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 4417 TSF:MSG:READ,0-0-2,s=1,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 1 = 0 4425 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4484 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4543 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4567 TSF:MSG:READ,0-0-2,s=1,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 1 = 0 4602 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 4662 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 4717 TSF:MSG:READ,0-0-2,s=2,c=1,t=24,pt=0,l=1,sg=0:8 Recieved variable1 valve:2 = 8 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 0 group time: 8 name: Zone 2 Zone 3 individual time: 0 group time: 0 name: Zone 3 Zone 4 individual time: 0 group time: 0 name: Zone 4 Zone 5 individual time: 0 group time: 0 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 Calling for Valve 3 Data... 4781 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 4839 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 4868 TSF:MSG:READ,0-0-2,s=2,c=1,t=24,pt=0,l=1,sg=0:8 Recieved variable1 valve:2 = 8 4898 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4957 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5016 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5022 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:8 Recieved variable2 valve:2 = 8 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 8 group time: 8 name: Zone 2 Zone 3 individual time: 0 group time: 0 name: Zone 3 Zone 4 individual time: 0 group time: 0 name: Zone 4 Zone 5 individual time: 0 group time: 0 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 5075 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 5135 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 5168 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:8 Recieved variable2 valve:2 = 8 Calling for Valve 4 Data... 5222 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 5281 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 5318 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:8 Recieved variable2 valve:2 = 8 5340 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5399 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5458 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5474 TSF:MSG:READ,0-0-2,s=2,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 2 = 0 5518 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 5577 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 5619 TSF:MSG:READ,0-0-2,s=2,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 2 = 0 Calling for Valve 5 Data... 5663 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 5722 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 5770 TSF:MSG:READ,0-0-2,s=3,c=1,t=24,pt=0,l=1,sg=0:8 Recieved variable1 valve:3 = 8 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 8 group time: 8 name: 0 Zone 3 individual time: 0 group time: 8 name: Zone 3 Zone 4 individual time: 0 group time: 0 name: Zone 4 Zone 5 individual time: 0 group time: 0 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 5805 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5865 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5931 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5952 TSF:MSG:READ,0-0-2,s=3,c=1,t=24,pt=0,l=1,sg=0:8 Recieved variable1 valve:3 = 8 5996 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 6055 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 6071 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:8 Recieved variable2 valve:3 = 8 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 8 group time: 8 name: 0 Zone 3 individual time: 8 group time: 8 name: Zone 3 Zone 4 individual time: 0 group time: 0 name: Zone 4 Zone 5 individual time: 0 group time: 0 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 Calling for Valve 6 Data... 6142 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 6202 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 6220 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:8 Recieved variable2 valve:3 = 8 6261 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 6320 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 6371 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:8 Recieved variable2 valve:3 = 8 6379 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 6438 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 6498 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 6521 TSF:MSG:READ,0-0-2,s=3,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 3 = 0 6556 MCO:BGN:INIT OK,TSP=1 6723 TSF:MSG:READ,0-0-2,s=3,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 3 = 0 6927 TSF:MSG:READ,0-0-2,s=4,c=1,t=24,pt=0,l=2,sg=0:12 Recieved variable1 valve:4 = 12 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 8 group time: 8 name: 0 Zone 3 individual time: 8 group time: 8 name: 0 Zone 4 individual time: 0 group time: 12 name: Zone 4 Zone 5 individual time: 0 group time: 0 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 7129 TSF:MSG:READ,0-0-2,s=4,c=1,t=24,pt=0,l=2,sg=0:12 Recieved variable1 valve:4 = 12 7148 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=2,sg=0:12 Recieved variable2 valve:4 = 12 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 8 group time: 8 name: 0 Zone 3 individual time: 8 group time: 8 name: 0 Zone 4 individual time: 12 group time: 12 name: Zone 4 Zone 5 individual time: 0 group time: 0 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 7331 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=2,sg=0:12 Recieved variable2 valve:4 = 12 7534 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=2,sg=0:12 Recieved variable2 valve:4 = 12 7736 TSF:MSG:READ,0-0-2,s=4,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 4 = 0 7754 TSF:MSG:READ,0-0-2,s=4,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 4 = 0 7939 TSF:MSG:READ,0-0-2,s=5,c=1,t=24,pt=0,l=2,sg=0:12 Recieved variable1 valve:5 = 12 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 8 group time: 8 name: 0 Zone 3 individual time: 8 group time: 8 name: 0 Zone 4 individual time: 12 group time: 12 name: 0 Zone 5 individual time: 0 group time: 12 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 8141 TSF:MSG:READ,0-0-2,s=5,c=1,t=24,pt=0,l=2,sg=0:12 Recieved variable1 valve:5 = 12 8344 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=2,sg=0:12 Recieved variable2 valve:5 = 12 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 8 group time: 8 name: 0 Zone 3 individual time: 8 group time: 8 name: 0 Zone 4 individual time: 12 group time: 12 name: 0 Zone 5 individual time: 12 group time: 12 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 8375 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=2,sg=0:12 Recieved variable2 valve:5 = 12 8546 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=2,sg=0:12 Recieved variable2 valve:5 = 12 8748 TSF:MSG:READ,0-0-2,s=5,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 5 = 0 8950 TSF:MSG:READ,0-0-2,s=5,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 5 = 0 8970 TSF:MSG:READ,0-0-2,s=6,c=1,t=24,pt=0,l=2,sg=0:10 Recieved variable1 valve:6 = 10 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 8 group time: 8 name: 0 Zone 3 individual time: 8 group time: 8 name: 0 Zone 4 individual time: 12 group time: 12 name: 0 Zone 5 individual time: 12 group time: 12 name: 0 Zone 6 individual time: 0 group time: 10 name: Zone 6 9153 TSF:MSG:READ,0-0-2,s=6,c=1,t=24,pt=0,l=2,sg=0:10 Recieved variable1 valve:6 = 10 9356 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=2,sg=0:10 Recieved variable2 valve:6 = 10 New Zone Times Recieved... Zone 1 individual time: 5 group time: 5 name: 0 Zone 2 individual time: 8 group time: 8 name: 0 Zone 3 individual time: 8 group time: 8 name: 0 Zone 4 individual time: 12 group time: 12 name: 0 Zone 5 individual time: 12 group time: 12 name: 0 Zone 6 individual time: 10 group time: 10 name: Zone 6 9559 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=2,sg=0:10 Recieved variable2 valve:6 = 10 9577 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 6 = 0 9760 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 6 = 0 9963 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 6 = 0
EDIT - After the next openHab restart when the variables all got restored from Persistance they all show up right but now the node when reboot will not pick up the data see this node reboot log (Note Zone 1 group time 5 came through as I had forced a sendCommand on that single item - all other values restored from persistance - seems the same issue if they come from postUpdate also)
__ __ ____ | \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___ | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __| | | | | |_| |___| | __/ | | \__ \ _ | | \__ \ |_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/ |___/ 2.2.0 16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.2.0 25 TSM:INIT 26 TSF:WUR:MS=0 33 TSM:INIT:TSP OK 35 TSM:INIT:STATID=2 37 TSF:SID:OK,ID=2 39 TSM:FPAR 75 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 388 TSF:MSG:READ,0-0-2,s=255,c=3,t=8,pt=1,l=1,sg=0:0 393 TSF:MSG:FPAR OK,ID=0,D=1 2082 TSM:FPAR:OK 2083 TSM:ID 2084 TSM:ID:OK 2086 TSM:UPL 2089 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1 2100 TSF:MSG:READ,0-0-2,s=255,c=3,t=25,pt=1,l=1,sg=0:1 2105 TSF:MSG:PONG RECV,HP=1 2107 TSM:UPL:OK 2109 TSM:READY:ID=2,PAR=0,DIS=1 2113 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 2120 TSF:MSG:READ,0-0-2,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 2128 TSF:MSG:SEND,2-2-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.2.0 2137 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0 2162 TSF:MSG:READ,0-0-2,s=255,c=3,t=6,pt=0,l=1,sg=0:M 2170 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=11,pt=0,l=19,sg=0,ft=0,st=OK:Irrigation Ctrl (2) 2180 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:4.0 2188 TSF:MSG:SEND,2-2-0-0,s=0,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2195 TSF:MSG:SEND,2-2-0-0,s=1,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2203 TSF:MSG:SEND,2-2-0-0,s=2,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2210 TSF:MSG:SEND,2-2-0-0,s=3,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2217 TSF:MSG:SEND,2-2-0-0,s=4,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2226 TSF:MSG:SEND,2-2-0-0,s=5,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2233 TSF:MSG:SEND,2-2-0-0,s=6,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 2239 MCO:REG:REQ 2242 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2 2249 TSF:MSG:READ,0-0-2,s=255,c=3,t=27,pt=1,l=1,sg=0:1 2254 MCO:PIM:NODE REG=1 2256 MCO:BGN:STP Initialising... Turning All Valves Off... Checking EEPROM for stored date: Retreiving last run time from EEPROM... Sensor Presentation Complete Ready... 2914 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=1,pt=0,l=0,sg=0,ft=0,st=OK: Requesting time from Gateway: 2939 TSF:MSG:READ,0-0-2,s=255,c=3,t=1,pt=0,l=10,sg=0:1534915205 Time value received and updated... Clock updated.... Sensor's time currently set to: 05:20am 8/22/2018 Wednesday Calling for Valve 1 Data... 3952 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 3976 TSF:MSG:READ,0-0-2,s=1,c=1,t=24,pt=0,l=1,sg=0:5 Recieved variable1 valve:1 = 5 New Zone Times Recieved... Zone 1 individual time: 0 group time: 5 name: Zone 1 Zone 2 individual time: 0 group time: 0 name: Zone 2 Zone 3 individual time: 0 group time: 0 name: Zone 3 Zone 4 individual time: 0 group time: 0 name: Zone 4 Zone 5 individual time: 0 group time: 0 name: Zone 5 Zone 6 individual time: 0 group time: 0 name: Zone 6 4012 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4072 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4126 TSF:MSG:READ,0-0-2,s=1,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:1 = 0 4134 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 4194 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 4253 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 4276 TSF:MSG:READ,0-0-2,s=1,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:1 = 0 Calling for Valve 2 Data... 4340 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 4399 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 4426 TSF:MSG:READ,0-0-2,s=1,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 1 = 0 4458 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4517 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4611 !TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=NACK: 4670 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=1,st=OK: 4729 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 4736 TSF:MSG:READ,0-0-2,s=1,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 1 = 0 4789 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 4848 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 4878 TSF:MSG:READ,0-0-2,s=2,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:2 = 0 Calling for Valve 3 Data... 4935 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 4995 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 5027 TSF:MSG:READ,0-0-2,s=2,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:2 = 0 5054 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5113 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5173 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5179 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:2 = 0 5232 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 5292 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 5328 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:2 = 0 Calling for Valve 4 Data... 5379 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 5438 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 5479 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:2 = 0 5497 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5557 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5616 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 5632 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:2 = 0 5676 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 5735 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 5780 TSF:MSG:READ,0-0-2,s=2,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 2 = 0 Calling for Valve 5 Data... 5822 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 5881 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 5929 TSF:MSG:READ,0-0-2,s=2,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 2 = 0 5941 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 6000 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 6060 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 6080 TSF:MSG:READ,0-0-2,s=3,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:3 = 0 6119 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 6178 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 6231 TSF:MSG:READ,0-0-2,s=3,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:3 = 0 Calling for Valve 6 Data... 6267 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 6326 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: 6381 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:3 = 0 6389 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 6448 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 6507 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK: 6531 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:3 = 0 6566 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 6626 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK: 6681 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:3 = 0 6689 MCO:BGN:INIT OK,TSP=1 6884 TSF:MSG:READ,0-0-2,s=3,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 3 = 0 7087 TSF:MSG:READ,0-0-2,s=3,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 3 = 0 7288 TSF:MSG:READ,0-0-2,s=4,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:4 = 0 7308 TSF:MSG:READ,0-0-2,s=4,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:4 = 0 7491 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:4 = 0 7694 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:4 = 0 7897 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:4 = 0 7915 TSF:MSG:READ,0-0-2,s=4,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 4 = 0 8099 TSF:MSG:READ,0-0-2,s=4,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 4 = 0 8301 TSF:MSG:READ,0-0-2,s=5,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:5 = 0 8504 TSF:MSG:READ,0-0-2,s=5,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:5 = 0 8522 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:5 = 0 8706 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:5 = 0 8908 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:5 = 0 9111 TSF:MSG:READ,0-0-2,s=5,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 5 = 0 9129 TSF:MSG:READ,0-0-2,s=5,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 5 = 0 9313 TSF:MSG:READ,0-0-2,s=6,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:6 = 0 9516 TSF:MSG:READ,0-0-2,s=6,c=1,t=24,pt=0,l=1,sg=0:0 Recieved variable1 valve:6 = 0 9718 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:6 = 0 9737 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:6 = 0 9921 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=1,sg=0:0 Recieved variable2 valve:6 = 0 10123 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 6 = 0 10326 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0 Recieved variable3 valve: 6 = 0
Sorry also just realised I am posting in an MQTT thread - I had an MQTT Gateway and now changed to Ethernet.
-
Hi all, and thanks for the previous posts.
I was having the same issue where the Bridge would stay as INITIALIZING. My set up is a little different as I use Openhan on docker with the following volumes mounting in /opt/openhab:
-v /etc/localtime:/etc/localtime:ro \ -v /etc/timezone:/etc/timezone:ro \ -v /opt/openhab/conf:/openhab/conf \ -v /opt/openhab/userdata:/openhab/userdata \ -v /opt/openhab/addons:/openhab/addons \ -v /opt/openhab/.java:/openhab/.java \
I'm using OH2.3 with the Docker Image: openhab/openhab:2.3.0-amd64-debian and the location of the org.eclipse.smarthome.mqttbroker.cfg file is in /opt/openhab/userdata/config/org/eclipse/smarthome.
After making all the changes above I couldn't get the Brdige to work, until finally I downloaded the MySensors addon 2.4.0 from http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.4.0-SNAPSHOT.jar as suggested by @MasMat and placed it in /opt/openhab/addons.
Immediately the status of the bridge changed to ONLINE.
Hope this helps sombedy.
C
-
Were You able to find out what is wrong regarding MQTT port 1883.0
Suddenly I have the same error...no idea why. It was working just yesterday.
-
This post is deleted!
-
I am very new to openHAB but I am really getting crazy with it. I did exactly what was on top of the screen. But I get an error the MYSensors MQTT Gateway was initializing.. and never came out. So I continue too read and I switch to the binding v 2.4.0. But wathever I do I get an error:
mysensors:bridge-mqtt:gateway' changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org/eclipse/smarthome/io/transport/mqtt/MqttActionCallback
I am not sure where to look and what to change. This is in my demo.things file.
Bridge mysensors:bridge-mqtt:gateway [ brokerName="mosquitto", topicPublish="mygateway1-in", topicSubscribe="mygatewa$ temperature temp01 [ nodeId=5, childId=0 ] }
org.eclipse.smarthome.mqttbroker.cfg:
name=mosquitto host=192.168.10.4 <- This points to the MySensors gateway PI (different then the openHAB) secure=false port=1883 retain=false
Any idears what I can try?
-
@martim I'm running OpenHAB with a few MYS sensors (and other subsystems) and I really like the system system. It is complex with a steep learning curve but incredibly flexible and powerful.
As for your problems with MYS/MQTT I have no solution but to use the direct connection over ethernet instead. I have tried switching to MQTT twice and failed miserably both times.
The MYS addon requires the new MQTT binding which easily collides with the old one. (The new MQTT binding is almost ready for release so it may have been fixed, if you are lucky.)
I don't know if the cause of this problem is with the OpenHAB MQTT bindings or with the MYS binding but it was not trivial to fix with the instructions available. As I could not really see any upside of using MQTT except to have an "all MQTT System" I went back to the ethernet connection which works fine.
I would recommend connecting it as ethernet connection first and get it working that way. Then you can switch to MQTT if you want to. The biggets hurdles are installation of supportive packages (mqtt and serial transports) and getting MQTT to work in parallel with MQTT binding version 1. If you post your logs (WARN level for the Mys binding) I can try help you decode it.
-
@fredswed Hi, I really like MQTT so that is my prefered method. But I can try first on ethernet and then step back. I will try in the weekend since I am now a week away I used the latest version of the binding and also for MQTT.
-
I spend again a few hours. I really want to get it to work with MQTT as I have my complete system based on it. But Apparently, the binding does not work and also the log does not say much. Only those errors:
2018-12-17 11:38:03.559 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing 'mysensors:bridge-mqtt:gateway': org/eclipse/sma ansport/mqtt/MqttActionCallback java.lang.NoClassDefFoundError: org/eclipse/smarthome/io/transport/mqtt/MqttActionCallback at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:?] at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:276) ~[?:?] at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:655) ~[?:?] at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:578) ~[?:?] at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:538) ~[?:?] at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:525) ~[?:?] at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328) ~[?:?] at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:368) ~[?:?] at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:446) ~[?:?] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395) ~[?:?] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387) ~[?:?] at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:?] at org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection.<init>(MySensorsMqttConnection.java:44) ~[?:?] at org.openhab.binding.mysensors.internal.gateway.MySensorsGateway.setup(MySensorsGateway.java:99) ~[?:?] at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:81) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.oh230] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.oh230] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?] Caused by: java.lang.ClassNotFoundException: org.eclipse.smarthome.io.transport.mqtt.MqttActionCallback cannot be found by org.openhab.binding.mysensors_2.4.0.201812040738
-
@martim Don't use the binding! Use plain MQTT.I'd love to have a simple working binding but it isn't there yet. Use plain mqtt elements and it'll work great.The new mqtt binding works. I don't like the mechanism needed to configure the broker, and then each thing, but works, and it is in fact more integrated with openhab than ever.
If you have any questions do not hesitate to contact me.
-
java.lang.NoClassDefFoundError: org/eclipse/smarthome/io/transport/mqtt/MqttActionCallback
The new MQTT binding requires parts of the new automation engine. This is missing from your system for some reason. Should be automatically installed when MQTT or the MySensors binding are installed.
I'd love to have a simple working binding but it isn't there yet. Use plain mqtt elements and it'll work great.
This statement is not correct. The OH 2.4 release officially supports the new binding and if any errors are reported, they are getting fixed. The new binding allows Paper UI and textual configuration so there is no reason to start with mqtt1 nowadays.
Cheers,
David
-
@davidgraeff Yes David, you are correct. The new binding works. I'm in fact using it and with the corresponding changes on the items files its ok.
I would love some kind of auto discovery though. In order to create each thing you have to manually enter the topic (which on mysensors is very complex)
Anyways, I will try to edit previous message which is in fact wrong.
-
@masmat Yes!!!! Thank you man. I found 2.4.0 thanks to your message and now it's working!
Love
-
This post is deleted!
-
Hi all, I am a Newbie an trying to get OH2.4 to work with MySensors nodes.
I have a MYS Mqtt ethernet GW up&running (seems to work, can talk to other sensors)
Now I can't get MQTT thing/broker/binding to work in OH2.4. I first tries the manual above, then I read that Musquitto is not needed any more....right??
I have to use MQTT 2.4 Ting binding and MQTT broker right? -> I have installed this and have MQTT broker running on localhost (online) (no channels addes in MQTT broker)
I have added in Things: MysensorsMQTT gateway: broker name: "MQTT Broker" and 'startup check' and 'sanity check' ON
Then I checked from the CLI the file "org.eclipse.smarthome.mqtt.cfg" ->there was still the musquitto entries I made... Also in mqtt-eventbus.cfg was still broker=musquitto. What do I do with this??
In OH log I get errors:****2019-02-10 21:52:35.274 [me.event.ThingUpdatedEvent] - Thing 'mysensors:bridge-mqtt:9954d183' has been updated. 2019-02-10 21:52:35.682 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:9954d183' changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org/openhab/binding/mysensors/internal/protocol/mqtt/MySensorsMqttConnection$MySensorsMqttPublishCallback to INITIALIZING 2019-02-10 21:52:35.685 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:9954d183' changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org/openhab/binding/mysensors/internal/protocol/mqtt/MySensorsMqttConnection$MySensorsMqttPublishCallback**** ---*
Next problem:
I installed the MySensors Ethernet gateway thing in OH, configged it with IP of Arduino running the Mys GW. -> This Thing will NOT come 'online'. I can Ping the GW board, all looks OK in GW log:0 MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1 4 TSM:INIT 5 TSF:WUR:MS=0 11 TSM:INIT:TSP OK 13 TSM:INIT:GW MODE 15 TSM:READY:ID=0,PAR=0,DIS=0 17 MCO:REG:NOT NEEDED 580 GWT:TPC:IP=192.168.178.87 1583 MCO:BGN:STP 1585 MCO:BGN:INIT OK,TSP=1 1588 GWT:TPC:IP=192.168.178.87 2590 GWT:RMQ:MQTT RECONNECT 2798 GWT:RMQ:MQTT CONNECTED 2801 GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT 2807 TSM:READY:NWD REQ 2844 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 0 MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1 4 TSM:INIT 5 TSF:WUR:MS=0 11 TSM:INIT:TSP OK 13 TSM:INIT:GW MODE 15 TSM:READY:ID=0,PAR=0,DIS=0 17 MCO:REG:NOT NEEDED 580 GWT:TPC:IP=192.168.178.87 1583 MCO:BGN:STP 1585 MCO:BGN:INIT OK,TSP=1 1588 GWT:TPC:IP=192.168.178.87 2590 GWT:RMQ:MQTT RECONNECT 2798 GWT:RMQ:MQTT CONNECTED 2800 GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT 2807 TSM:READY:NWD REQ 2844 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 3810 TSF:MSG:READ,254-254-0,s=255,c=3,t=21,pt=1,l=1,sg=0:0 3815 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/21,MSG SENT 636790 TSF:MSG:READ,254-254-0,s=255,c=3,t=0,pt=1,l=1,sg=0:99 636795 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/0,MSG SENT 637304 TSF:MSG:READ,254-254-0,s=255,c=3,t=1,pt=0,l=0,sg=0: 637309 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/1,MSG SENT 637815 TSF:MSG:READ,254-254-0,s=1,c=1,t=16,pt=2,l=2,sg=0:0 637820 GWT:TPS:TOPIC=mygateway1-out/254/1/1/0/16,MSG SENT 637827 TSF:MSG:READ,254-254-0,s=1,c=1,t=15,pt=1,l=1,sg=0:1 637832 GWT:TPS:TOPIC=mygateway1-out/254/1/1/0/15,MSG SENT 637838 TSF:MSG:READ,254-254-0,s=7,c=1,t=0,pt=4,l=4,sg=0:44 637844 GWT:TPS:TOPIC=mygateway1-out/254/7/1/0/0,MSG SENT 637850 TSF:MSG:READ,254-254-0,s=255,c=3,t=0,pt=1,l=1,sg=0:99 637855 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/0,MSG SENT 900006 TSF:SAN:OK
How do I proceed? Ive tried to find more posts on getting MySensors to work under OH24 but I think it is sooo simple that nobody has any problems to post....right?!
Hope you guys can get this Newbie back on track.... thx a lot!
-
Hi @rene-mullie,
Seems like the mysensors binding mqtt gw doesnt play nice with the mosquitto broker. You can try running the embedded broker of openhab (paperUi->addons->misc->embedded broker i beleive). Dont forget to configure it under services->misc (not shure since im on my phone right now). And connect your mqtt gateway to this broker. I was not succesful in this because i need the embedded broker on port 1884 since i allready have mosquitto on port 1883 for other stuff. And i <think> mysensors mqtt gateway doesnt want to connect to 1884 but 1883. But you can give it a try. If you have ethernet gateway going and dont have plans to use different controllers (for example to do FOTA updates) i would stick to the ethernet gw for now. Greets
-
I have configged the embedded broker in right way, broker is online on localhost.
I tried to connect Mys mqtt gateway to Embedded mqtt broker in paper UI:Broker Name
MQTT Broker (-> not sure about this name....??)
name of the MQTT broker as defined in the org.eclipse.smarthome.mqtt.cfg file``` (-> if I check this cfg file there is NOTHING about the embedded broker, only old Musquitto stuf...)All is on default port 1883 on both sides...
I get fault in OH log file:
2019-02-10 23:40:56.626 [ERROR] [al.protocol.ip.MySensorsIpConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:15)
-
broker name is "embedded-mqtt-broker"
-
@waspie tried that, still same errors...
What should be the entries in the org.eclipse.smarthome.mqtt.cfg file ?
-
@rene-mullie delete it
-
@rene-mullie if im not mistaken that file is to configure mqtt v1 and your using mqtt v2
-
Thx4 your support! I gave up on fixing the old install and started over with brand new install of OH2.4: All was up&running in 45mins!! MQTT2.4 with embedded broker works like a charm. On top the Mysensors MQTT GW Ting was online with 1-click! All my MYsensor nodes where recognized immediately! What a relief!
Hope someone will update Mysensors docu so others will be spared the pain...