MQTT device timeout

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
FredZ
Posts: 22
Joined: Monday 08 June 2020 6:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

MQTT device timeout

Post by FredZ »

Hello All

I have Dom working, and I have added the Tasmota autodiscovery plugin and that is working.
I've installed the tasmota plugin as I have installed tasmota on all of my sensor boards. I'm sending all the sensor data via mqtt to the server.

Q. How do I get a device (sensor) that is for whatever reason not working to time out (show as red)?

Regards

Fred
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: MQTT device timeout

Post by FireWizard »

Hi, @FredZ,

You asked:
How do I get a device (sensor) that is for whatever reason not working to time out (show as red)?
This is as a standard implemented in Domoticz, so if a Sensor times out, it will automatically show a red bar, except for "Text" sensors.
The time-out, you can find in Setup > Settings > Other > Sensor Timeout. The value is in minutes.

Regards
FredZ
Posts: 22
Joined: Monday 08 June 2020 6:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MQTT device timeout

Post by FredZ »

Thanks for that

I had noticed that previously, and it is set to 10 minutes. However, I have deliberately turned off a sensor several weeks ago and it still shows the last temp received.

I'm guessing it has something to do with mqtt. But I've never played with mqtt before so I have no knowledge of it.

I used mqqt explorer and I can see the device listed on the mqtt server.

Regards

Fred
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: MQTT device timeout

Post by FireWizard »

Hello @FredZ

You wrote:
However, I have deliberately turned off a sensor several weeks ago and it still shows the last temp received.
This is normal behavior and the the data and date will change if the sensor is updated.
'm guessing it has something to do with mqtt. But I've never played with mqtt before so I have no knowledge of it.
I used mqqt explorer and I can see the device listed on the mqtt server.
No, the message will be there as long as it is not replaced by a new message or cleared in MQTT Explorer.

So the questions are.

1. Who is publishing to the MQTT broker and what are the settings (topic and payload)?
2. Who is subscribing to that topic?
3. What is de QoS and the setting of the retain flag?
4. What is the type of the sensor in Domoticz?

Regards
FredZ
Posts: 22
Joined: Monday 08 June 2020 6:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MQTT device timeout

Post by FredZ »

To answer all of your questions. I don't know.

I simply installed the tasmota firmware on my various sensor boards (WeMos D1 Mini Pro V3.0 NodeMcu 16MB) and attached the various sensors, mostly DHT22 and DS18B20 probes. Pointed mqtt to the server and set the user name and PW. Nothing else was changed at the client level.

On the server (raspbian) I simply installed mqtt/mosquito and set the user name and PW.

On Dom I simply installed the tasmota autodiscovery pluggin and pointed it to the mqtt server and set the user name and PW.

Yes, I simply followed a couple of simple instructions and it all went.

Sorry for being such a newby.

Regards

Fred
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: MQTT device timeout

Post by FireWizard »

hello @FredZ,

Unfortunately I do not own (yet) any Tasmota flashed devices.
As you use probably the Python plugin for the Sensors, you probably have to look to that plugin.

My experience is, that if I send data to a virtual Sensor by MQTT, e.g. through Node Red, this sensor, if it times out, shows a red bar at the top.
So this is not a MQTT issue.

You can try to pick up the sensors with Node Red and send it to Domoticz, without using the Tasmota plugin and the Auto Discovery.

See: https://flows.nodered.org/node/node-red-contrib-tasmota
And: https://flows.nodered.org/node/node-red ... ff-tasmota

And see what happens.

Regards
FredZ
Posts: 22
Joined: Monday 08 June 2020 6:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MQTT device timeout

Post by FredZ »

Thanks for the Nodered comments.

Looked into it, didn't make any sense to me at all.

My decision: Dumped Tasmota and mqtt as I simply don't have the knowledge to get it to work how I want.
Have gone back to ESPeasy on the clients and configured the devices manually on Dom. Now my devices time out and show as red when they aren't working as expected. I can now setup sensor switches to respond as desired.

Problem solved.

Regards

Fred
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest