Help! openHAB 2.4 binding MQTT
-
Has anyone successfully used Mysensors MQTT gateway with Openhab2.4?
I have tried and I have followed "How to's" but nothing work. I have googled and search, but only found people trying and failing, or showing things that does not exist.
Does anyone have a working set up and can share it? Visually if possible? And for starters, just through PaperUI.OpenHab is 2.4.0 and mysensors is development branch
This is what I have done and where I have failed.
- Raspberry Pi running MySensors MQTT Gateway
- Raspberry Pi running Mosquitto MQTT server on port 1883
- OpenHab2.4 with Mysensors Binding installed.
(everything is running on the same PI)
I have created a MySensors MQTT Gateway thing in OH
When I click on the Mysensors MQTT Gateway I can set some settings.
I set the topic to the same as in the config of the mysensors gateway, but what is "Broker Name"It refers to a file, org.eclipse.smarthome.mqtt.cfg, that does not exist. Somewhere I have read you just create the file and past this in it.
mosquitto.url=tcp://127.0.0.1:1883 mosquitto.retain=false
Everything is still offline... nothing happens... The mqtt however is full of messages from sensors, I see this in MQTT.fx
How do I get the Mysensors MQTT Gateway ONLINE in Openhab?
And what do I write in "Broker name".. that feels kind of important
Mosquitto and Openhab run in separate docker containers
mosquitto: image: eclipse-mosquitto:1.5 restart: unless-stopped container_name: mosquitto expose: - 1883 ports: - 1883:1883 volumes: - /mnt/usb1/mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro - /mnt/usb1/mosquitto/data:/mosquitto/data - /mnt/usb1/mosquitto/logs:/mosquitto/log:rw openhab: image: openhab/openhab:2.4.0 container_name: openhab restart: always network_mode: host devices: - /dev/ttyACM0:/dev/ttyACM0 volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro - /mnt/usb1/openhab2/addons:/openhab/addons - /mnt/usb1/openhab2/conf:/openhab/conf - /mnt/usb1/openhab2/userdata:/openhab/userdata environment: OPENHAB_HTTP_PORT: "8080" OPENHAB_HTTPS_PORT: "8443" EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Berlin" USER_UD: "9001" GROUP_ID: "9001"
I have made no changes to mosquitto. It is a standard installation, without any changes to config
-
-
@waspie Thanks, but that did not help me either.
If I Install a "System MQTT Broker" it has one, and only one option.. "Broker ID"
I don't know what to write here.. but I can try to write "mosquitto"
Then I get this:
I have removed the file in services
-
don't install that.
just configure a regular broker in a .thing fileor add it via paperui
inbox-> + sign -> mqtt thing - > add manually - > mqtt broker -> give it the IP and hit the check.
then you'll have a broker to attack mysensors to
-
@waspie But if I install a normal "MQTT broker", I can enter an IP adress to my mosquitto server. And I can see that the thing connects to the server
If I can use the "MQTT Broker".. how do I get Mysensors MQTT Gateway thing to connect to it?
-
what is the name of that broker?
-
@waspie said in Help! openHAB 2.4 binding MQTT:
what is the name of that broker?
I don't know how to answer that.... You vitually see my screen (all the screen shots).. What you see is what I have. Where do I see the name of the broker?
-
I dont see a broker in your things view. Please re-snip and post
-
@waspie said in Help! openHAB 2.4 binding MQTT:
I dont see a broker in your things view. Please re-snip and post
-
in your mysensors gateway config the name of the broker is fd3193ea
-
@waspie said in Help! openHAB 2.4 binding MQTT:
fd3193ea
OK, thanks. I changed the "Broker name" in Mysensors MQTT Gateway in OH to fd3193ea.
The Mysensors thing is still "Offline" though... I rebooted every thing... but still offline...
-
this is 2.4.0 and not a 2.5.x build, right?
-
@waspie said in Help! openHAB 2.4 binding MQTT:
this is 2.4.0 and not a 2.5.x build, right?
Yes it is the 2.4 build. Both OH is 2.4 and mysensors is 2.4 (any newer is not available to my knowledge)
OH is an installation from a docker image (openhab/openhab:2.4.0)
Trace file does not look very healthy...
-
i dont know what folder path your stuff would be in exactly but can you list openhab???/userdata/config/org/openhab/
ex:
/volume1/public/openHAB/userdata/config/org/openhab$ ls -la total 852 drwxrwxrwx+ 1 openhab users 504 Feb 13 13:55 . drwxrwxrwx+ 1 openhab users 74 Feb 13 12:39 .. -rwxrwxrwx+ 1 openhab users 402 Feb 13 13:55 addons.config -rwxrwxrwx+ 1 openhab users 118 Feb 13 12:39 basicui.config -rwxrwxrwx+ 1 openhab users 120 Feb 13 12:39 dashboard.config -rwxrwxrwx+ 1 openhab users 796758 Feb 13 08:28 habpanel.config -rwxrwxrwx+ 1 openhab users 230 Feb 13 12:39 http.config -rwxrwxrwx+ 1 openhab users 184 Feb 13 12:39 influxdb.config -rwxrwxrwx+ 1 openhab users 162 Feb 13 12:39 jdbc.config -rwxrwxrwx+ 1 openhab users 131 Feb 13 12:39 logging.config -rwxrwxrwx+ 1 openhab users 115 Feb 13 12:39 mail.config -rwxrwxrwx+ 1 openhab users 116 Feb 13 12:39 mapdb.config -rwxrwxrwx+ 1 openhab users 118 Feb 13 12:39 network.config -rwxrwxrwx+ 1 openhab users 114 Feb 13 12:39 nma.config -rwxrwxrwx+ 1 openhab users 158 Feb 13 12:39 plex.config -rwxrwxrwx+ 1 openhab users 200 Feb 13 12:39 pushover.config -rwxrwxrwx+ 1 openhab users 116 Feb 13 12:39 rrd4j.config -rwxrwxrwx+ 1 openhab users 118 Feb 13 12:39 runtime.config -rwxrwxrwx+ 1 openhab users 119 Feb 13 12:39 services.config -rwxrwxrwx+ 1 openhab users 119 Feb 13 12:39 voicerss.config -rwxrwxrwx+ 1 openhab users 308 Feb 13 12:39 weather.config
-
@waspie said in Help! openHAB 2.4 binding MQTT:
i dont know what folder path your stuff would be in exactly but can you list openhab???/userdata/config/org/openhab/
Looks like this:
I tried some experiments. I made a simple flow in node-red. Listen to "mysensors-out/#" then print it to debug. And yes, it works.
I also tried to add a channel to the "MQTT Broker" thing, also "mysensors-out/#"
It showed up without any problems... not very usable, but can see the connection...
But the "Mysensors MQTT Gateway"... just dead in the water...
-
yeah, mysensors in 2.4+ is very touchy.
Have you restarted the openhab service lately?
Try deleting your mysensors gateway then restart openhab and re-add the mysensors mqtt gateway. Just for grins...
-
@waspie said in Help! openHAB 2.4 binding MQTT:
yeah, mysensors in 2.4+ is very touchy.
Have you restarted the openhab service lately?
Try deleting your mysensors gateway then restart openhab and re-add the mysensors mqtt gateway. Just for grins...
I did that now... same thing...
So, The "Mysensors Binding" creates a Thing, "Mysensors MQTT Gateway".
The "Mysensors MQTT Gateway" needs a "MQTT Broker" Thing. This thing is called "mosquitto". The mosquitto thing is configured to connect to 127.0.0.1:1883
In "Mysensors MQTT Gateway" I say "Broker Name" is "mosquitto".In log "Mysensors MQTT Gateway" says "No connection to broker: mosquitto"
Maybe I should just revert back to Ethernet. I have spent 3 days with this, and somthing that "mysterious" can just not be right.
-
@magpern
sorry, without direct access to tinker with it I can't say where it is stuck. At this moment I've dumped the binding altogether and just do everything via MQTT. I have a good feeling the binding was somehow crashing the mqtt broker which is why I stopped using the binding.
-
I have exactly same problem. Does it work for anyone not using the system broker?
Both binding and openhab are 2.4.
-
@gahlawathome said in Help! openHAB 2.4 binding MQTT:
I have exactly same problem. Does it work for anyone not using the system broker?
Both binding and openhab are 2.4.Googleing this problem at it is quite reoccurring that the questions are about "How to get mysensors mqtt gateway online". Something must be wrong with it, otherwise so many cannot report the same thing.
@TimO as the developer, do you have any leads?