What does "send to MQTT" do?

For devices supporting the Auto Discovery feature. Like ZWaveJS2MQTT, Zigbee2MQTT.

Moderator: leecollings

Post Reply
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

What does "send to MQTT" do?

Post 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 859 times
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: What does "send to MQTT" do?

Post 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
Blah blah blah
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: What does "send to MQTT" do?

Post 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 785 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
}
Quality outlives Quantity!
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: What does "send to MQTT" do?

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: What does "send to MQTT" do?

Post by gizmocuz »

@waltervl, I'm not quite following you, but this is separate from any hardware device
Quality outlives Quantity!
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: What does "send to MQTT" do?

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
blueberryPie
Posts: 18
Joined: Sunday 19 November 2017 20:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: What does "send to MQTT" do?

Post 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?
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: What does "send to MQTT" do?

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest