openHAB 3.0 Milestone 2 discussion

Hey,
every minute I’m getting this info:

2020-11-23 01:03:11.565 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.31.208'. Next attempt in 60000ms
2020-11-23 01:03:11.569 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.31.208' with clientid 14d81dde-448c-42a9-8f90-46eb19a0b020

why is it happening? is it normal?

1 Like

your mqtt connection is failing. there binding tries to reconnect and fails and then waits a minute before trying again.

Yes, I see that:)
But why is it happening?
On OH2 there was no problem.
My mosquito server is on same raspberry as openHAB. How to check what is causing this?

Could be two clients with the same ID.

1 Like

But I dont have any other things on my system. Mosquitto is only for OPENHAB. And every sensor sending mqtt messages has its own unique id.

In OpenHab 3 settings do you see “MQTT Broker connection”? If so, click the link. The info on this page was blocking port 1883 so Mosquitto didn’t connect. I removed all the info on this page and saved the page. Restart Openhab and Mosquitto, as port 1883 was not blocked anymore, Mosquitto could connect. Perhaps a reboot is needed.

1 Like

You deleted every data from this ?

Yes Kamil, that is exactly what I did. P.s. I use dark background as you can see.

1 Like

I did same as You and now it is ok;) Thank You:)

But question - for what is this System Broker needed?

2 Likes

That should be explained by someone with more knowledge. I remembered the error message as I struggled with the same a few weeks ago. But I’m certainly not an expert yet. Perhaps there is even a better solution. If someone knows please post. Thank you for the feedback that it is working. I appreciate it. Have a nice day.

3 Likes

i have the same “problem” as Kamil. with quotes, because everything works.

I guess i need to do some reading to understand the difference between MQTT config under “settings>other services” and MQTT Binding Broker as a Thing.
maybe this will be a good place to start : MQTT System broker Vs. MQTT Embedded broker
EDIT: i realise this page is about embedded vs system broker, which is different from system broker and MQTT binding!
The one under settings is refered as System MQTT broker.

I used a different identifier for each of them to avoid conflict of course. it is the one under Settings>other services that generates the error.

it seems that to be able to add a generic MQTT “generic” thing, i need to have the MQTT binding, but i am confused what is the difference between these two.

also i remember the system broker appearing as a discovered thing at somepoint in oh3.

1 Like

On your post, click the 3 dots

then select the trash can

image

1 Like

“MQTT System broker Vs. MQTT Embedded broker”
The first is a broker on internet and the second a broker in your local network.

“it seems that to be able to add a generic MQTT “generic” thing, i need to have the MQTT binding, but i am confused what is the difference between these two.”
That is correct. You need both. First the MQTT binding and afterwards you are able to create MQTT things.

Hello,

I have problem running Rule from myopenhab.org. I have OH 3 daily snapshot (2025), using label card (oh-cell) tu run rule.

it works when I run it localy but when using myopenhab.org, there is:
error message in the GUI “Error while running rule: OK”

and this is in the log:
2020-11-23 15:00:54.969 [WARN ] [s.impl.WebApplicationExceptionMapper] - javax.ws.rs.ClientErrorException: HTTP 415 Unsupported Media Type
at org.apache.cxf.jaxrs.utils.SpecExceptions.toHttpException(SpecExceptions.java:117)
at org.apache.cxf.jaxrs.utils.ExceptionUtils.toHttpException(ExceptionUtils.java:168)
at org.apache.cxf.jaxrs.utils.JAXRSUtils.findTargetMethod(JAXRSUtils.java:514)
at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:181)
at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:78)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)

I can use items from cloud but not rules.

Any idea what shall I change?

Thanks,
Jirka

The System Broker is used to run an embedded broker on openHAB itself. You would use that if you didn’t have Mosquitto installed. But I don’t know how long the embedded broker will be around and there are some bugs and limitations to it is better to use mosquitto instead.

MQTT requires five things:

  • a broker
  • MQTT binding installed
  • an MQTT Broker Thing that establishes the connection to the broker
  • MQTT Things (Generic Things, Homie Things, Home Assistant Things) which represent an MQTT device.
  • Channels on the MQTT thing for each MQTT topic subscribed to and/or published to.
4 Likes

Thank-you @rlkoshak. Appreciate your feedback.
I read through Model your home with items & link channels which gave me a good understanding of how I should model my items in a hierarchy. Like you mentioned, Equipment should be a member of Location. I’ve refactored my items and link channels to follow this model.
I have a use case I’m trying to understand how to implement optimally. In my model, I have lights in the various Location groups on the Ground Floor. Let’s say I want to turn all the lights on the Ground Floor off with one command. Can I create a new Equipment Group with the light items from the various locations added to it? Then simply call the new Equipment group to turn off all the lights? Or is there a better way to do this while keeping with the Model recommendation.

Thanks for your help.

Cheers,
Randy

It is not in the model, but the brick scheme knows zones. So i could imagine that there might be a location that is called GroundFloor Lighting

Hi @Dibbler42 - Not sure I follow. Could you please elaborate? Thanks.

Firstly, but every item and group needs to be a part of the model. And your particular use case really isn’t one that’s part of the model. Handling that use case, turn off all the lights, is something that uses the model would implement. Right now the only thing that uses the model in this way is HABot and indeed, if you ask HABot to turn off all the lights, it will find all the points/equipment labels tagged with light and turn them off.

So for now I would suggest implementing this use case outside of the model.

I updated file /usr/lib/node_modules/frontail/preset/openhab.json and restarted frontail service → no result…
Could you please, list files names and locations? Thanks!