Upgrade OH2 beta3 --> beta4 issues

Hello Everybody,

maybe this is a stupid question but I have some problems with updating from beta3 to beta4.
The update process itself worked fine. (sudo apt-get update & sudo apt-get upgrade).

As I understood I have to configure all things new (like my Z-Wave or RFXOM)?
The items were available but they did not worked, I was even not able to delete them, so I deleted them manually with text editor in the items-file. Now they are not shown anymore.

I also have install mqtt, mysql-persistence etc. new? --> Is this right?

After installing all bindings like mysql-persistance, mqtt the service did not worked.
For example I did not receive any mqtt message, there is simply no log in the log-file. Do I have to configure mqtt, mysql … new after upgrading?

I also added my Z-Wave devices to the Things. Normally I was able to see these things then on the “Control-panel”, but I do not see any.

Please give me some hints to solve this.
If you need more information please let me know.

Greetings Gerhard

Really? Or just a typo?
We are on beta5 right now …
http://docs.openhab.org/installation/linux.html#installation

Your other questions can only be answered when we know to what version you want to upgrade.

Hello Sihui

I did the upgrade like it was described in the manual with “sudo apt-get update” & “sudo apt-get upgrade”. So in fact it should be the latest beta.
How can I find out which beta/version is actally installed?

Greetings Gerhard

Yes.

Bad idea. You should keep your items. Don’t confuse “things” with “items”.

Yes, as long as you don’t have defined them in addons.cfg

No, the config did not change …

That is because you deleted your items.

You should read the important changes section:
https://community.openhab.org/c/openhab-2/news-important-changes

and the basic concepts:

http://docs.openhab.org/concepts/index.html

Hello

so I made a complete new installation just to have a clean setup. I installed

  • mysql for persistence
  • mosquitto/mqtt which is running, I can see the data coming in at the mosquitto logfile.

I installated Openhab2 Snapshot-release (Build 694) like in the manual descriped.

I still have the problem that Openhab does not receive mqtt-messages.
What I have found out so far from the logfiles is that the mosquitto itself receives data from my arduino board. Openhab is also registered at mosquitto. But openhab does not get/receive/see any mqtt-message.

This is what the openhab.log says:

> 2017-01-07 14:00:06.584 [DEBUG] [.binding.mqtt.internal.MqttActivator] - MQTT binding has been started.
> 2017-01-07 14:00:06.602 [DEBUG] [org.openhab.binding.mqtt            ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={event.topics=openhab/*, service.pid=org.openhab.mqtt-eventbus, component.name=org.openhab.binding.mqtt.eventbus, component.id=179, service.id=305, service.bundleid=207, service.scope=bundle} - org.openhab.binding.mqtt
> 2017-01-07 14:00:06.620 [DEBUG] [ng.mqtt.internal.MqttEventBusBinding] - MQTT: Activating event bus binding.
> 2017-01-07 14:00:06.629 [DEBUG] [ng.mqtt.internal.MqttEventBusBinding] - Initializing MQTT Event Bus Binding
> 2017-01-07 14:00:06.631 [DEBUG] [ng.mqtt.internal.MqttEventBusBinding] - MQTT Event Bus Binding initialization completed.
> 2017-01-07 14:00:06.639 [DEBUG] [org.openhab.binding.mqtt            ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler}={event.topics=openhab/*, component.name=org.openhab.binding.mqtt.MqttItemBinding, component.id=180, service.id=307, service.bundleid=207, service.scope=bundle} - org.openhab.binding.mqtt
> 2017-01-07 14:00:06.657 [DEBUG] [org.openhab.binding.mqtt            ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.mqtt.MqttBindingProvider}={component.name=org.openhab.binding.mqtt.genericbindingprovider, component.id=181, service.id=306, service.bundleid=207, service.scope=bundle} - org.openhab.binding.mqtt
> 2017-01-07 14:00:06.660 [DEBUG] [org.openhab.core.compat1x           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.model.item.BindingConfigReader}={service.id=308, service.bundleid=184, service.scope=singleton} - org.openhab.core.compat1x
> 2017-01-07 14:00:06.681 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_1000L_Oben' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.698 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_1000L_Unten' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.707 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_300L_Oben' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.719 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_300L_Unten' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.722 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_HZ_Vorlauf' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.725 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_HZ_Ruecklauf' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.727 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_Brauchwasser' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.730 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'WK1_Temp' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.733 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'WK1_Hum' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.737 [DEBUG] [org.openhab.binding.mqtt            ] - BundleEvent STARTED - org.openhab.binding.mqtt

This is what mosquitto-logging says, you also see the received message from my arduino board:

> Starting daemon mosquitto with command '/usr/local/sbin/mosquitto' and options '-c /etc/mosquitto/mosquitto.conf'...

> 1483777247: mosquitto version 1.4.10 (build date 2017-01-04 20:04:09+0100) starting
> 1483777247: Config loaded from /etc/mosquitto/mosquitto.conf.
> 1483777247: Opening ipv4 listen socket on port 1883.
> 1483777247: Opening ipv6 listen socket on port 1883.
> 1483777304: New connection from 192.168.2.114 on port 1883.
> 1483777304: New client connected from 192.168.2.114 as arduinoClient (c1, k15).
> 1483777304: Sending CONNACK to arduinoClient (0, 0)
> 1483777304: Received SUBSCRIBE from arduinoClient
> 1483777304: 	/openHAB/Test_Switch1/# (QoS 0)
> 1483777304: Sending SUBACK to arduinoClient
> 1483777307: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Oben', ... (5 bytes))
> 1483777307: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Unten', ... (5 bytes))
> 1483777307: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Oben', ... (5 bytes))
> 1483777307: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Unten', ... (5 bytes))
> 1483777312: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_HZ_Vorlauf', ... (5 bytes))
> 1483777312: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_HZ_Ruecklauf', ... (5 bytes))
> 1483777313: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_Brauchwasser', ... (5 bytes))
> 1483777318: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/WK1_Temp', ... (4 bytes))
> 1483777318: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/WK1_Hum', ... (3 bytes))
> 1483777326: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Oben', ... (5 bytes))
> 1483777326: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Unten', ... (5 bytes))
> 1483777326: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Oben', ... (5 bytes))
> 1483777326: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Unten', ... (5 bytes))
> 1483777331: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_HZ_Vorlauf', ... (5 bytes))
> 1483777331: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_HZ_Ruecklauf', ... (5 bytes))
> 1483777331: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_Brauchwasser', ... (5 bytes))
> 1483777336: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/WK1_Temp', ... (4 bytes))
> 1483777336: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/WK1_Hum', ... (3 bytes))
> 1483777345: New connection from 127.0.0.1 on port 1883.
> 1483777345: New client connected from 127.0.0.1 as openhab.1483777344878 (c1, k60).
> 1483777345: Sending CONNACK to openhab.1483777344878 (0, 0)
> 1483777345: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Oben', ... (5 bytes))
> 1483777345: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Unten', ... (5 bytes))
> 1483777345: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Oben', ... (5 bytes))

my config for mqtt from openhab looks like this:
> # URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
> mqtt:openHAB.url=tcp://127.0.0.1:1883

This configuration is also shown in the karaf.console

What I am doing wrong? I think I should see the messages mosquitto receives also in the openhab-logging.

Do I have to give some special rights to the user?

Please give me some hints. If you need further information let me know.

Thanks so far.

Greetings Gerhard

First thing is, you need to properly format your logs and config so we can read it.
Don’t use the “Blockquote”, please use the “Preformatted text”.
It would be great if you could edit your post above.

Second thing is, it looks like you mixed up the mqtt config for openHAB1 with openHAB2.
There is no “mqtt:” prefix for the mqtt.cfg file in openHAB2, so a proper config should read:

mosquitto.url=tcp://localhost:1883

where “mosquitto” is the name of your broker (in my case I named it “mosquitto”).

Next thing is you need to correctly define your items file, from your log I suppose you try to read some temperatures.
An item file may read:

Number TemperaturHeizung "Temperatur Heizung [%.1f °C]" { mqtt="<[mosquitto:/openHAB/Heizung_Temp_1000L_Unten:state:default]" }

then display it on your sitemap with
Text item=TemperaturHeizung

From your log I can see you are using the mqtt event bus, I have no clue how that works, I don’t use the event bus.

For more information take a look at

Don’t use the installation instructions, only use the config examples and omit the prefix “mqtt:” in your mqtt.cfg

For more information on that read the “Configure Add-Ons” section in
http://docs.openhab.org/tutorials/migration.html#configure-add-ons

Edit: from your config above I guess your items should look like
Number TemperaturHeizung "Temperatur Heizung [%.1f °C]" { mqtt="<[openHAB:/openHAB/Heizung_Temp_1000L_Unten:state:default]" }
because you named your broker service “openHAB”

Thank you very much. Now it works. I think the problem was the “mqtt:” before mosquitto.

Greetings Gerhard

1 Like