MQTT integration
Moderators: leecollings, remb0
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: MQTT integration
Did you know GPIO is supported native by Domoticz?
Re: MQTT integration
Yes, I see that but my relays are on a separate Pi.
By the way, is there a way to invert the state of the ON/OFF GPIO?
Because my relay board turns ON the relays when the GPIO is 0, so the Domoticz act contrariwise (the switches are all OFF but the relays are all ON).
Thanks!
By the way, is there a way to invert the state of the ON/OFF GPIO?
Because my relay board turns ON the relays when the GPIO is 0, so the Domoticz act contrariwise (the switches are all OFF but the relays are all ON).
Thanks!
- nayr
- Posts: 354
- Joined: Tuesday 11 November 2014 18:42
- Target OS: Linux
- Domoticz version: github
- Location: Denver, CO - USA
- Contact:
Re: MQTT integration
Domoticz supports a Master/Slave configuration so you can hook multiple Domo's together and have remote nodes.
and for inverting gpio, try: echo 1> /sys/class/gpio/gpioN/active_low
and for inverting gpio, try: echo 1> /sys/class/gpio/gpioN/active_low
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Re: MQTT integration
Thanks Nayr, the inversion of the GPIO works!!!
-
- Posts: 1602
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: MQTT integration
mmm
What can i do more with MQTT
I did make a MQTT broker with mysensors...
Only i do not understand what i can do with MQTT
What are the settings : And what are the best/beautiful options that in can make, with this...
And it is always so simple
what can i do with MQTT and Node red??
What can i do more with MQTT
I did make a MQTT broker with mysensors...
Only i do not understand what i can do with MQTT
What are the settings : And what are the best/beautiful options that in can make, with this...
And it is always so simple

Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
-
- Posts: 112
- Joined: Monday 26 June 2017 21:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Spain
- Contact:
Re: MQTT integration
I'm new in all this domoticz things. What I want to know is how to translate the domoticz mqtt in order to manage a modbus plc. What I want is to integrate a plc into domoticz via node red.
Thanks
Thanks
-
- Posts: 187
- Joined: Tuesday 07 March 2017 21:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Germany
- Contact:
Re: MQTT integration
Hello, I have a question if someone can help me?
Please excuse me for my English, I use Google Translate.
How can I connect this sketch with domoticz and controll?
https://github.com/thexperiments/esp826 ... tt_gateway
Thank you!
Please excuse me for my English, I use Google Translate.
How can I connect this sketch with domoticz and controll?
https://github.com/thexperiments/esp826 ... tt_gateway
Thank you!
-
- Posts: 187
- Joined: Tuesday 07 March 2017 21:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Germany
- Contact:
Re: MQTT integration
Can someone tell me
How can I control this in Domoticz?
Default topic is /ZB40_GATEWAY. You can controll it via MQTT with the following topics.
Topic Payload (only one at a time)
/ZB40_GATEWAY/ALL/ up, down, stop
/ZB40_GATEWAY/1/ up, down, stop
/ZB40_GATEWAY/2/ up, down, stop
/ZB40_GATEWAY/3/ up, down, stop
How can I control this in Domoticz?
Default topic is /ZB40_GATEWAY. You can controll it via MQTT with the following topics.
Topic Payload (only one at a time)
/ZB40_GATEWAY/ALL/ up, down, stop
/ZB40_GATEWAY/1/ up, down, stop
/ZB40_GATEWAY/2/ up, down, stop
/ZB40_GATEWAY/3/ up, down, stop
Re: MQTT integration
If you have a (mosquitto) MQTT broker installed and working, you can create dummy switches and send commands using mosquitto_pubsalopette wrote: ↑Tuesday 17 October 2017 22:50 Can someone tell me
How can I control this in Domoticz?
Default topic is /ZB40_GATEWAY. You can controll it via MQTT with the following topics.
Topic Payload (only one at a time)
/ZB40_GATEWAY/ALL/ up, down, stop
/ZB40_GATEWAY/1/ up, down, stop
/ZB40_GATEWAY/2/ up, down, stop
/ZB40_GATEWAY/3/ up, down, stop
Re: MQTT integration
Domoticz has two topics domoticz/in and domoticz/out. Please take a look at https://www.domoticz.com/wiki/MQTT for different JSON formats to send/receive
-
- Posts: 187
- Joined: Tuesday 07 March 2017 21:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Germany
- Contact:
Re: MQTT integration
Hello, I have looked here https://www.domoticz.com/wiki/MQTT, but I do not understand how I have to adjust in the sketch?
I now create a Virtuall switch, when I enter the command via browser, I see everything.
But how do I go on?
my MQTT is on 192.168.178.37/ port 1883
http://192.168.178.37:8080/json.htm?typ ... es&rid=266
I now create a Virtuall switch, when I enter the command via browser, I see everything.
But how do I go on?
my MQTT is on 192.168.178.37/ port 1883
http://192.168.178.37:8080/json.htm?typ ... es&rid=266
Code: Select all
{
ActTime: 1508492733,
ServerTime: "2017-10-20 11:45:33",
Sunrise: "07:56",
Sunset: "18:14",
result: [
{
AddjMulti: 1,
AddjMulti2: 1,
AddjValue: 0,
AddjValue2: 0,
BatteryLevel: 255,
CustomImage: 0,
Data: "Open",
Description: "",
Favorite: 0,
HardwareID: 7,
HardwareName: "Virtual",
HardwareType: "Dummy (Does nothing, use for virtual switches only)",
HardwareTypeVal: 15,
HaveDimmer: true,
HaveGroupCmd: true,
HaveTimeout: false,
ID: "0001415A",
Image: "Light",
IsSubDevice: false,
LastUpdate: "2017-10-20 08:47:18",
Level: 0,
LevelInt: 0,
MaxDimLevel: 100,
Name: "/ZB40_GATEWAY/ALL/",
Notifications: "false",
PlanID: "0",
PlanIDs: [],
Protected: false,
ShowNotifications: true,
SignalLevel: "-",
Status: "Open",
StrParam1: "",
StrParam2: "",
SubType: "Switch",
SwitchType: "Venetian Blinds EU",
SwitchTypeVal: 15,
Timers: "false",
Type: "Light/Switch",
TypeImg: "blinds",
Unit: 1,
Used: 1,
UsedByCamera: false,
XOffset: "0",
YOffset: "0",
idx: "266"
}
],
status: "OK",
title: "Devices"
}
-
- Posts: 1
- Joined: Thursday 08 February 2018 14:35
- Target OS: Windows
- Domoticz version:
- Contact:
MQTT/JSON integration
Hello guys,
I am playing with Domoticz now for a few days. My biggest problems with Domoticz and MQTT are the way they are using topics and JSON.
1. Domoticz impose the topics domoticz/in and domoticz/out. Why? It gives you not the freedom affined the MQTT standard. Keep the subscripe and publish topics open ( e.i ALF4all/domoticz and/or ALF4all/domoticz/${floorplan name}/${plan name} ), so you are not overwhelmed with messages if you are using a public MQTT-broker (like HiveMQ).
2. JSON is designed to keep messages readable. An object in Domoticz like "idx":1 (device index) is clear, objects as "nvalue" and "svalue" says nothing. Why not using objects as "temperature" and "humidity"? An object as "svalue":"20.5; 33.3; 2" for a Temp + Humidity type sensor is not readable at all. Better in JSON documents is to split up the data in seperate objects like: {"temperature":"20.5", "humidity":"33.3","humidity-status":"2"}.
Even better: {"temperature":"20.5", "humidity":"33.3","humidity-status":"dry"}.
Perhaps it would be nice if this way is also implemented (not diffecult I think) in Domoticz.
Regards...
Wijnand
b.t.w. As device hardware/firmware I use ESP8266 (thing) -> Arduino IDE -> ArduinoJson.h -> PubSubClient.h -> MQTT -> Domoticz.
I am playing with Domoticz now for a few days. My biggest problems with Domoticz and MQTT are the way they are using topics and JSON.
1. Domoticz impose the topics domoticz/in and domoticz/out. Why? It gives you not the freedom affined the MQTT standard. Keep the subscripe and publish topics open ( e.i ALF4all/domoticz and/or ALF4all/domoticz/${floorplan name}/${plan name} ), so you are not overwhelmed with messages if you are using a public MQTT-broker (like HiveMQ).
2. JSON is designed to keep messages readable. An object in Domoticz like "idx":1 (device index) is clear, objects as "nvalue" and "svalue" says nothing. Why not using objects as "temperature" and "humidity"? An object as "svalue":"20.5; 33.3; 2" for a Temp + Humidity type sensor is not readable at all. Better in JSON documents is to split up the data in seperate objects like: {"temperature":"20.5", "humidity":"33.3","humidity-status":"2"}.
Even better: {"temperature":"20.5", "humidity":"33.3","humidity-status":"dry"}.
Perhaps it would be nice if this way is also implemented (not diffecult I think) in Domoticz.
Regards...
Wijnand
b.t.w. As device hardware/firmware I use ESP8266 (thing) -> Arduino IDE -> ArduinoJson.h -> PubSubClient.h -> MQTT -> Domoticz.
Who is online
Users browsing this forum: Amazon [Bot] and 1 guest