Page 1 of 1

What does "send to MQTT" do?

Posted: Sunday 30 June 2024 13:55
by roblom
I was playing around with some MQTT and tried to find out what the "Sendo to MQTT" option does but to me it looks like it doesn't do anything? Can someone explain?
sendtomqtt.png
sendtomqtt.png (157.92 KiB) Viewed 861 times

Re: What does "send to MQTT" do?

Posted: Monday 01 July 2024 11:06
by HansieNL
When you push MQTT button you should get a settings page to set MQTT.
For MQTT settings see the Wiki: https://www.domoticz.com/wiki/MQTT

Re: What does "send to MQTT" do?

Posted: Wednesday 03 July 2024 7:12
by gizmocuz
This option allows you to send device values to MQTT, for example, just like the InfluxDB pusher does.
You have to enter your MQTT server paramers first and press 'save'.
Next you select for example a P1 device and say that you want to export the 'usage_current' to MQTT.
Or you push your outside temperature.
Of course, it's only pushed when a value is received/changed
mqtt_push.png
mqtt_push.png (4.95 KiB) Viewed 787 times
It is also possible to export multiple values of a device (like a P1 meter or a temp+hum)

Code: Select all

{
  "delivery_1": 1184073,
  "delivery_2": 2783062,
  "delivery_current": 0,
  "usage_1": 9368981,
  "usage_2": 6269705,
  "usage_current": 108
}

Code: Select all

{
  "barometer": 1010,
  "forecast": "Some Clouds",
  "humidity": 70,
  "humidity_status": "Wet",
  "temperature": 13
}

Re: What does "send to MQTT" do?

Posted: Wednesday 03 July 2024 17:18
by waltervl
Thanks, a basic wiki page has been created: https://www.domoticz.com/wiki/MQTT_Push

It seems a little bit the same when you create a MQTT hardware and empty the Topic In Prefix to disable listening to MQTT. Then use the Setup button of the MQTT Client gateway in menu Setup - Hardware to filter only the devices you want to send the data to the MQTT Topic out.

Re: What does "send to MQTT" do?

Posted: Thursday 04 July 2024 9:02
by gizmocuz
@waltervl, I'm not quite following you, but this is separate from any hardware device

Re: What does "send to MQTT" do?

Posted: Thursday 04 July 2024 17:37
by waltervl
gizmocuz wrote: Thursday 04 July 2024 9:02 @waltervl, I'm not quite following you, but this is separate from any hardware device
I know but in the end to get only a limited number of device data being pushed to MQTT there are now 2 options:
  • The MQTT Data push
  • The standard MQTT hardware gateway with only out topic defined and a device filter activated

Re: What does "send to MQTT" do?

Posted: Monday 11 November 2024 18:04
by blueberryPie
Domoticz MQTT Push will only push integer value of dummy voltage device with decimal value.

In 2024.4 this function is only pushing the integer value of a Dummy Voltage device:

As viewed from MQTT explorer:
Topic

Code: Select all

Domoticz_Push/329/state

Code: Select all

Domoticz_Push
329
state = {"voltage":245}
Value of device in Domoticz = 245.78

Is this a bug that needs to be reported or is there some other way to get this working?

P.S. What does the "Link active" switch control in the MQTT Push setup?

Re: What does "send to MQTT" do?

Posted: Monday 11 November 2024 21:45
by waltervl
blueberryPie wrote: Monday 11 November 2024 18:04 Domoticz MQTT Push will only push integer value of dummy voltage device with decimal value.

In 2024.4 this function is only pushing the integer value of a Dummy Voltage device:

.....

Is this a bug that needs to be reported or is there some other way to get this working?
Issue was already reported by another user and recently fixed in 2024.7 beta.