[SOLVED] Activity no stop

Hi to all
on my logfile i have this information:

2019-04-05 14:43:19.068 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘settare_orario.rules’ is either empty or cannot be parsed correctly!

2019-04-05 14:43:21.040 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘settare_orario.rules’

2019-04-05 14:43:23.999 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘openhabianpi-mqtt’

2019-04-05 14:43:24.021 [WARN ] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to ‘openhabianpi-mqtt’ was lost: Connection lost : ReasonCode 32109 : Cause : null

2019-04-05 14:43:24.024 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting connection helper to periodically try restoring connection to broker ‘openhabianpi-mqtt’

2019-04-05 14:43:34.034 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘openhabianpi-mqtt’

2019-04-05 14:43:34.046 [WARN ] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to ‘openhabianpi-mqtt’ was lost: Connection lost : ReasonCode 32109 : Cause : null

2019-04-05 14:43:34.055 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting connection helper to periodically try restoring connection to broker ‘openhabianpi-mqtt’

2019-04-05 14:43:44.065 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘openhabianpi-mqtt’

2019-04-05 14:43:44.091 [WARN ] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to ‘openhabianpi-mqtt’ was lost: Connection lost : ReasonCode 32109 : Cause : null

2019-04-05 14:43:44.094 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting connection helper to periodically try restoring connection to broker ‘openhabianpi-mqtt’

2019-04-05 14:43:46.696 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘openhabianpi-mqtt’

What could be the cause?

What are the MQTTClientIDs of all your devices connected to the broker and the MQTTClienttID of the broker? Each of them has to have its own name, no duplicated IDs are allowed!

this is my things


I have for now only one device

The question was NOT related to your openHAB Things!
The posted error:
MQTT connection to ‘openhabianpi-mqtt’ was lost: Connection lost : ReasonCode 32109 : Cause : null
COULD be related to mutiple MQTTdevices with the same MQTT-ClientID!
So what is the MQTT ClientID of your broker (NOT the Broker-Thing!)
What is the MQTT ClientID of the “SonoffSERCAM” ( if your SONOFF is running Tasmota you could look that up on the web-interface of the device / browse to the ip address of the device!).

ok
the setting of the sonoffSERCAM is


Is the MQTT Client ID this?

if no where can i have it?

Yes, this was it, and no, this was not the cause of the constantly disconnecting broker.

Is the mqtt broker you are connecting to really named “openhabianpi-mqtt” , or is it another one?

when i enter in openhab i have this

so i think this is the correct name.

Don’t you think?

I think you have no idea what I am talking about and you don’t know what MQTT broker is nor do you have a broker running (at least I think so).

Maybe, in fact I’m asking for help…
you know where I can find the name you’re talking about?
in \openhabianpi\openHAB-conf\things i tried the file mqtt.tXT.
Here it reports that:


Can this be the name of the broker?

From the pic posted, the broker name is MosquittoMqttBroker.

The file, from which you show the contents, is named " mqtt.tXT". Although it is in the directory for things-files, it is NOT used as a .things file! In order to be used it has to have the ending .things!
The contents WOULD define the broker-thing with the name “MosquittoMqttBroker”.

The used name-part “Mosquitto” indicate that you(or who?) had installed at a point the mosquitto mqtt broker. In that case use the following command in order to check if the broker is running:

systemctl status mosquitto.service

a correct output would be:

mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
   Loaded: loaded (/etc/init.d/mosquitto; generated; vendor preset: enabled)
   Active: active (running) since Sat 2019-03-09 16:01:41 CET; 3 weeks 6 days ago
     Docs: man:systemd-sysv-generator(8)
  Process: 336 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/mosquitto.service
           └─401 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Mär 09 16:01:40 opuspi3 systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broker...
Mär 09 16:01:41 opuspi3 mosquitto[336]: Starting network daemon:: mosquitto.
Mär 09 16:01:41 opuspi3 systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.

The part: " Active: active (running)" would indicate a running service of the broker.
Do you have the same display??

I am using this broker, however the PaperUI page for my broker-thing looks a bit different, from that I can only guess that you ALSO installed the " Embedded MQTT Broker" from withing openHAB (found under Addons-Misc).
Is this broker also installed??

If both brokers are installed, the messages posted in the starting post could be caused by that.

Where the name “openhabianpi-mqtt” is coming from is remaining a mystery!

This is the result

I noticed that the message is repeated several times

i have not it

OK, understood, the PaperUI page from for broker-thing was scrolled down, that’s the only difference to mine!
Since you did not show the top lines of the MQTT Broker Thing, to which “Broker Hostname/IP” is it connected? And what is the IP of your system running openHAB?

And coudl you post the contents of your file

/var/lib/openhab2/config/org/openhab/mqtt.config

Be carefull with it in order to do NO changes on that one! Please post the contents and not a screenshot, because that is hard to read!


192.168.0.200

URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883

localbroker.url=tcp:localhot:1883

Optional. User id to authenticate with the broker.

localbroker.user=openhabian

Optional. Password to authenticate with the broker.

localbroker.pwd=my password

OK, still nothing which shows the name “openhabianpi-mqtt”.
Which bindings do you have installed? The WARN could come from the mqtt-version 1 binding.
Do you have an mqtt.cfg in the etc/openhab2/services folder?

Please check PaperUI AND the file var/lib/openhab2/config/org/openhab/addons.config (no changes while oepnhab is running on that file as well)

only MQTT Binding

for the version one i had abilited this

yes

You do not NEED the mqtt version q, but the WARN messages in your log COULD come from that binding, if openhab tries to install it.
The last screenshot does not show the correct folder
It has to be var/lib/openhab2/config/org/openhab/addons.config

I upgraded from openhab 2.3 to 2.4, since the mqtt version 2 was released on that update I had mqtt1 installed before and afterwards I hab mqtt and mqtt1 in the above mentioned file. I needed to stop openhab, remove the “mqtt1” in that file and restart openhab.
Since you have a mqtt.cfg I guess you had the version 1 mqtt binding installed at a time.