I think that I need some advices now. I have tried to get some functionality to work in openHAB in order to collect data from my Arduinos. I think Arduino codes are pretty much ready but cant get openHAB to work. It’s because the concept is still a little confusing to me. Even that I have tried several days now.
I bet this is a very basic and common questions for beginners, yet I couldnt find help from search. Believe me, I have tried.
I have some images here if it helps you to figure out my situation? Does it look right? And if not, should I just remove bindings and brokers and could some one walk me through to show what I would need to do better. The first problem in current situation is that MQTT broker is offline.
I installed the Mosquitto. Do I need to tell it somehow to openHab?
I can find this from my log (192.168.1.109 is the machine where the openHab is installed.
2021-02-05 18:54:01.760 [ERROR] [org.openhab.binding.mqtt ] - bundle org.openhab.binding.mqtt:2.5.12 (242)[org.openhab.binding.mqtt.internal.discovery.MqttServiceDiscoveryService(215)] : The activate method has thrown an exception
java.lang.IllegalArgumentException: ID segment ‘192.168.1.109:1883’ contains invalid characters. Each segment of the ID must match the pattern [A-Za-z0-9_-]*.
I didnt find an IP field that contained also the port number, but doesn’t show in log any more. Now the log looks like this:
2021-02-05 20:01:36.357 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2021-02-05 20:01:37.874 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.109:8080
2021-02-05 20:01:37.876 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.109:8443
2021-02-05 20:01:38.702 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2021-02-05 20:01:38.781 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2021-02-05 20:01:39.004 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2021-02-05 20:01:41.269 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.1.109’ with clientid 579472d1-4420-4894-900d-fe0dfddddf23
2021-02-05 20:01:53.561 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to ‘192.168.1.109’. Next attempt in 60000ms
2021-02-05 20:01:53.599 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.1.109’ with clientid 579472d1-4420-4894-900d-fe0dfddddf23
2021-02-05 20:02:53.618 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to ‘192.168.1.109’. Next attempt in 60000ms
2021-02-05 20:02:53.629 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.1.109’ with clientid 579472d1-4420-4894-900d-fe0dfddddf23
C:\Program Files (x86)\mosquitto>mosquitto.exe -c mosquitto.conf
1612545712: mosquitto version 2.0.7 starting
1612545712: Config loaded from mosquitto.conf.
1612545712: Starting in local only mode. Connections will only be possible from clients running on this machine.
1612545712: Create a configuration file which defines a listener to allow remote access.
1612545712: Opening ipv4 listen socket on port 1883.
1612545712: Opening ipv6 listen socket on port 1883.
1612545712: mosquitto version 2.0.7 running
It’s again that “192.168.1.109:1883 contains invalid character” thing in the log. Im sure that they are not on the same field in the setup.
Also there is now:
2021-02-05 20:43:51.335 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.1.109’ with clientid e347b6c1-d65d-4a8e-af76-1e3e33f340f9
2021-02-05 20:43:51.408 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.1.109’ with clientid 4ba576bf-fee4-4455-924a-62ace0bb50e1