Page 5 of 6
Re: MQTT Audo-discovery
Posted: Sunday 20 February 2022 16:05
by Ries
I read up on the mqtt auto discovery on the wiki pages.
A quick question, is it still necessary to do the “install software” part with mosquitto?
Re: MQTT Audo-discovery
Posted: Sunday 20 February 2022 16:18
by jvdz
Ries wrote: ↑Sunday 20 February 2022 16:05
A quick question, is it still necessary to do the “install software” part with mosquitto?
mmm... not sure what you mean with this question, but in general: mosquitto (or any other MQTT Deamon) is required for things to work!
Re: MQTT Audo-discovery
Posted: Thursday 24 February 2022 15:55
by dheuts
I would like to replace all devices created by the Zigbee2mqtt plugin with the devices created by the MQTT auto discovery plugin.
Because the old plugin with max 250 devices is flooding my logs:
Code: Select all
2022-02-24 16:24:24.744 Error: Expected: myVar = Domoticz.Device(Name="myDevice", Unit=0, TypeName="", Type=0, Subtype=0, Switchtype=0, Image=0, Options={}, Used=1)
2022-02-24 16:24:24.744 Error: Device creation failed, Device object is not associated with a plugin.
I think this is the reason for crashing the webserver a lot since the last couple of days.
But the device type is totally different, so it is hard to do this for some devices.
For example the Xiaomi WXKG12LM.
The plugin created 1 selector switch, but the auto discovery plugin creates with all different click types like: single, double, release, hold, off.
But the MQTT auto discovery creates 6 devices, and the only device with all statuses in it, is the Text sensor.
Any ideas how to get this back to the selector switch?
Thanks.
Re: MQTT Audo-discovery
Posted: Sunday 12 June 2022 12:10
by redswan
Hi,
I'm trying to setup a new Domoticz installation on an Rpi 3B with Bullseye 11 to eventually replace my current production installation.
I've installed Docker and Domoticz, MQTT (Mosquitto) and Zigbee2mqtt in their respective containers.
So far I have just one Zigbee device, a Sonoff temperature/humidity sensor (SNZB02) paired to a Sonoff Zigbee 3.0 USB Dongle plus.
Zigbee2mqtt connects correctly to Mosquitto and I can see the device and values in MQTT Explorer.
So far so good, the problem I'm having is in getting Domoticz to create this device via the auto-discovery method. Although the Domoticz appears to discover the sensor no new device is created and there are many error messages in the log about "invalid/unhandled data received"!
As far as I can see I have configured things correctly, but obviously I'm missing something
So any help would be much appreciated.
Here is some information on how I have configured things.
Extract from Domoticz and mqtt_ad_record_all logs :
docker-compose.yml for zibee2mqtt and domoticz and zigbee2mqtt configuration.yaml:
Domoticz hardware config for MQTT auto discovery client :
- Domoticz hardware.PNG (30.72 KiB) Viewed 2557 times
Thanks in advance for any insight into where I'm going wrong.
Chris
Re: MQTT Audo-discovery
Posted: Monday 25 July 2022 23:41
by dheuts
jvdz wrote: ↑Monday 14 February 2022 9:56
dheuts wrote: ↑Monday 14 February 2022 9:54
Yes, only for the Zwave devices indeed.
Rounding the decimals sounds like the best solution to me indeed..
Maybe possible to check how the Openzwave plugin handles it? I don't know how to check this.
Thanks a lot for your replies!
As my last post states: It should be fixed in the latest Beta, so could you try that and let us know?
In the newest beta, I have some problems with my Zwave devices via this auto discovery method again. I can change dim level, but turning on or off is not working.
I tried it with dimmers and power plugs. In the zwave2mqtt backend, I read it wants to go from true to true.
I restored from my backup, so its back working now. But with the newest beta, not working
Re: MQTT Audo-discovery
Posted: Tuesday 26 July 2022 9:19
by Ragdag
Re: MQTT Audo-discovery
Posted: Sunday 21 August 2022 16:28
by gizmocuz
@dheuts , I can switch my zigbee(2mqtt) lights/dimmers/rgb without problems with the latest beta, could this already be solved?
Re: MQTT Audo-discovery
Posted: Thursday 22 September 2022 12:58
by Ragdag
I'll post this here to, as I did in the Slack channel
Is Domoticz leveraging MQTT Discovery from ZwaveJS2MQTT?
If so I just heard from the dev that he will stop maintaining that.
https://github.com/zwave-js/node-zwave- ... 1254841161
Re: MQTT Audo-discovery
Posted: Friday 23 September 2022 22:35
by Xenomes
Hi all,
I was experimenting with
https://github.com/mafrosis/tinytuya2mqtt with the 'MQTT Audo-discovery' in the latest version of Domoticz.
A device is created in Domoticz but i can not control it.
The log is showing:
Code: Select all
2022-09-23 22:06:59.322 Status: Test: discovered: 3D Lamp/3D Lamp (unique_id: bfa550692e71343800we58) supported_color_modes: { color temp, hs }
2022-09-23 22:07:00.925 Test: Color Switch/RGB (3D Lamp)
2022-09-23 22:07:00.723 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/white_brightness_state, Message: 33)
2022-09-23 22:07:00.823 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/hs_state, Message: 355,100)
2022-09-23 22:07:01.030 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/hsb_state, Message: 355,100,100)
2022-09-23 22:07:01.131 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/mode_state, Message: colour)
2022-09-23 22:07:01.231 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/color_temp_state, Message: 313)
2022-09-23 22:07:01.432 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/dps/1/state, Message: true)
2022-09-23 22:07:01.532 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/dps/2/state, Message: colour)
2022-09-23 22:07:01.633 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/dps/3/state, Message: 100)
2022-09-23 22:07:01.733 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/dps/4/state, Message: 90)
2022-09-23 22:07:01.834 Error: Test: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 3d_lamp/dps/5/state, Message: 0000000163ff00)
Can the plugin deal with 'dps/1' path and is this something to add to the plugin?
Re: MQTT Audo-discovery
Posted: Monday 26 September 2022 17:11
by brjhaverkamp
Hi all,
I switched yesterday from the zigbee2mqtt plugin to MQTT autodiscovery.
After some back-and-forth between zigbee2mqtt and domoticz I have it operational.
All my zigbee devices flooded in nicely. A lot more than with the zigbee2mqtt plugin, because all sensor are separate devices. But that is OK.
I now have one weird effect:
My aqara temperature/humidity/air pressure sensor (WSDCGQ11LM) is reporting everything in Celcius. Even the humidity, air pressure and battery voltage. What has gone wrong here? Did I do something wrong? Is this a (known) bug? And is there a way to fix this manually?
Hope you can advice,
Bert
Re: MQTT Audo-discovery
Posted: Wednesday 14 December 2022 14:41
by djdevil
i did the update yesterday with the addition of zwavejuis but once it deletes the devices i don't want to use on restart they are recreated again! how come this happens?
Re: MQTT Audo-discovery
Posted: Saturday 17 December 2022 21:39
by juankar
Hello, I'm new in mqtt.
I've installed mosquito and the mosquito autodiscovery in hardware (as wiki says).
I've a pair of wifi sockets in my net. Noe how does domoticz discover this devices? I mean how does mqtt (mosquito) discover these devices?
I've read the domotica wiki about mosquito but I don't see instructins about how to use the autodiscover.
Thanks
Re: MQTT Audo-discovery
Posted: Saturday 17 December 2022 22:04
by JuanUil
Hi all,
after a cou[ple of weeks without any problem and a verry good respons of my z-wave devices with zwave-js-ui, this week I had a supurb crash!
For some reason mqtt broker mosquitto failed to connect.
Probally it was my own fault because I was experimenting with some things.
Anyway, I made a fresh install, put in my Aeotec z-wave stick, reloaded my database and started again.
But......
As you can see in the picture below z-wave-js is not collecting all the info of the nodes.
Manufacturer, Product Code and Product stay as UNKNOW.
More serious is that for multi sensors only motion, battery level and low level battery switches are recognized.
See node 2 which is a pir with motion, lux, temp and battery.
Here lux and temp are NOT created!
I added this node as a new node by the way
anybody any idea?
Jan
Re: MQTT Audo-discovery
Posted: Sunday 18 December 2022 10:32
by gizmocuz
djdevil wrote: ↑Wednesday 14 December 2022 14:41
i did the update yesterday with the addition of zwavejuis but once it deletes the devices i don't want to use on restart they are recreated again! how come this happens?
You have to set them as unused in the devices page
Re: MQTT Audo-discovery
Posted: Sunday 18 December 2022 11:46
by JuanUil
JuanUil wrote: ↑Saturday 17 December 2022 22:04
Hi all,
after a cou[ple of weeks without any problem and a verry good respons of my z-wave devices with zwave-js-ui, this week I had a supurb crash!
For some reason mqtt broker mosquitto failed to connect.
Probally it was my own fault because I was experimenting with some things.
Anyway, I made a fresh install, put in my Aeotec z-wave stick, reloaded my database and started again.
But......
As you can see in the picture below z-wave-js is not collecting all the info of the nodes.
Manufacturer, Product Code and Product stay as UNKNOW.
More serious is that for multi sensors only motion, battery level and low level battery switches are recognized.
See node 2 which is a pir with motion, lux, temp and battery.
Here lux and temp are NOT created!
I added this node as a new node by the way
anybody any idea?
Jan
Today deleted the node and included it again. But with the same result no Lux, no Temp and no product, manufacturer.
Re: MQTT Audo-discovery
Posted: Sunday 18 December 2022 21:37
by JuanUil
nobody who can help me?
Re: MQTT Audo-discovery
Posted: Monday 19 December 2022 22:03
by JuanUil
Never mind. Did a complete new install and all is working well now.
Making a complete howto now to share
Re: MQTT Audo-discovery
Posted: Monday 26 December 2022 13:07
by Derik
Is there a list of working device with auto dicovery ?
Shelly?
Tua?
Espeasy?
Etc etc
Perhaps als other hardware?
Re: MQTT Audo-discovery
Posted: Sunday 01 January 2023 20:31
by Nautilus
My Moes BHT-002 zigbee thermostat gets autodiscovered, but it is missing heating/idle status from running_state. Also,
- Spoiler: show
- forget this part - as explained in the edits: it updates the short log with every mqtt message, shouldn't it be only when status changes? Further,
it looks like there is something wrong in the preset/preset mode status message. In mqtt I see:
Code: Select all
{
"child_lock": "UNLOCK",
"current_heating_setpoint": 18,
"deadzone_temperature": 1,
"heat": "OFF",
"linkquality": 87,
"local_temperature": 21,
"local_temperature_calibration": -3,
"max_temperature_limit": 25,
"min_temperature_limit": 5,
"preset": "hold",
"preset_mode": "hold",
"running_state": "idle",
"sensor": "IN",
"system_mode": "heat"
}
In Domoticz I see this in log:
- preset.JPG (133.89 KiB) Viewed 1683 times
Fearing my short log soon explodes if I install more of these.
edit: I noticed it is only saving the short log for the preset which is understandable as it "changes". What is strange that I am running Zigbee2MQTT plugin on the side and it creates similar devices (+ the running_state), it does not report the preset to be changing like in above screenshot, but it still logs everything:
- preset2.JPG (82.37 KiB) Viewed 1668 times
edit2: Except this one stopped about three hours ago, it is currently not logging the same status anymore. This happened when I restarted Domoticz. The other thermostat is was mpt doing this switching which the device created by Zigbee2MQTT plugin.
Re: MQTT Audo-discovery
Posted: Monday 09 January 2023 17:37
by quazar
I am switching to Zigbee2MQTT and Zigbee2MTQQ is running fine
Zigbee2MQTT log:
Code: Select all
info 2023-01-09 17:26:34MQTT publish: topic 'zigbee2mqtt/0xa4c138ec38ecd7de', payload '{"co2":363,"formaldehyd":4,"humidity":53.5,"linkquality":116,"temperature":18.8,"voc":1}'
info 2023-01-09 17:26:34MQTT publish: topic 'zigbee2mqtt/0xa4c138d94e67db9c', payload '{"co2":561,"linkquality":148}'
info 2023-01-09 17:26:34MQTT publish: topic 'zigbee2mqtt/0xa4c138ec38ecd7de', payload '{"co2":363,"formaldehyd":1,"humidity":53.5,"linkquality":116,"temperature":18.8,"voc":1}'
info 2023-01-09 17:26:34MQTT publish: topic 'zigbee2mqtt/0xa4c138ec38ecd7de', payload '{"co2":363,"formaldehyd":1,"humidity":53.5,"linkquality":116,"temperature":18.8,"voc":4}'
info 2023-01-09 17:26:35MQTT publish: topic 'zigbee2mqtt/0xa4c138ec38ecd7de', payload '{"co2":364,"formaldehyd":1,"humidity":53.5,"linkquality":116,"temperature":18.8,"voc":4}'
info 2023-01-09 17:26:36MQTT publish: topic 'zigbee2mqtt/0xa4c138d94e67db9c', payload '{"co2":558,"linkquality":148}'
info 2023-01-09 17:26:36MQTT publish: topic 'zigbee2mqtt/0xa4c138ec38ecd7de', payload '{"co2":364,"formaldehyd":1,"humidity":53.5,"linkquality":112,"temperature":18.7,"voc":4}'
info 2023-01-09 17:26:36MQTT publish: topic 'zigbee2mqtt/0xa4c138ec38ecd7de', payload '{"co2":364,"formaldehyd":1,"humidity":52.9,"linkquality":112,"temperature":18.7,"voc":4}'
ESPeasy also does not give errors when using Dototicz MQTT as controller.
Mosquitto also seems to be running:
Code: Select all
sudo tail -n20 -f /var/log/mosquitto/mosquitto.log
1673275905: New connection from ::1:51866 on port 1883.
1673275905: New client connected from ::1:51866 as auto-C8015DDA-2909-DEDE-1A4B-227AB178032D (p2, c1, k60).
1673276269: Client auto-C8015DDA-2909-DEDE-1A4B-227AB178032D disconnected.
1673276389: mosquitto version 2.0.11 terminating
1673276389: Saving in-memory database to /var/lib/mosquitto//mosquitto.db.
1673279987: mosquitto version 2.0.11 starting
1673279987: Config loaded from /etc/mosquitto/mosquitto.conf.
1673279987: Opening ipv4 listen socket on port 1883.
1673279987: Opening ipv6 listen socket on port 1883.
1673279987: mosquitto version 2.0.11 running
1673280002: New connection from ::1:38438 on port 1883.
1673280002: New client connected from ::1:38438 as Domoticz-MQTT-AutoDiscover73a2f63c-f2ff-4530-84eb-34ce26ecb85b9 (p2, c1, k40).
1673280035: New connection from 192.168.3.44:57821 on port 1883.
1673280035: New client connected from 192.168.3.44:57821 as CO2-woonkamer_0 (p2, c0, k10).
1673280694: New connection from ::1:53898 on port 1883.
1673280694: New client connected from ::1:53898 as auto-7010F855-7A53-3632-EFC0-B1A0D950BE66 (p2, c1, k60).
1673280694: Client auto-7010F855-7A53-3632-EFC0-B1A0D950BE66 disconnected.
1673280732: New connection from ::1:51746 on port 1883.
1673280732: New client connected from ::1:51746 as auto-463FB3D7-EB27-4548-DEC1-61B479FECB8A (p2, c1, k60).
1673280732: Client auto-463FB3D7-EB27-4548-DEC1-61B479FECB8A disconnected.
Domoticz seems to have no issues with MQTT:
Code: Select all
2023-01-09 16:59:58.957 Sunrise: 08:48:00 SunSet: 16:51:00
2023-01-09 16:59:58.957 Day length: 08:03:00 Sun at south: 12:50:00
2023-01-09 16:59:58.957 Civil twilight start: 08:08:00 Civil twilight end: 17:31:00
2023-01-09 16:59:58.957 Nautical twilight start: 07:25:00 Nautical twilight end: 18:14:00
2023-01-09 16:59:58.957 Astronomical twilight start: 06:45:00 Astronomical twilight end: 18:55:00
2023-01-09 16:59:58.789 Status: Domoticz V2022.2 (build 14929) (c)2012-2023 GizMoCuz
2023-01-09 16:59:58.789 Status: Build Hash: 776a0c021, Date: 2023-01-09 11:39:38
2023-01-09 16:59:58.789 Status: Startup Path: /home/boven/domoticz/
2023-01-09 16:59:59.287 Active notification Subsystems: (0/13)
2023-01-09 16:59:59.318 Starting shared server on: :::6144
2023-01-09 16:59:59.274 Status: PluginSystem: Started, Python version '3.9.2', 1 plugin definitions loaded.
2023-01-09 16:59:59.299 Status: WebServer(HTTP) started on address: :: with port 8090
2023-01-09 16:59:59.315 Status: WebServer(SSL) started on address: :: with port 443
2023-01-09 16:59:59.318 Status: TCPServer: shared server started...
2023-01-09 16:59:59.319 Status: RxQueue: queue worker started...
2023-01-09 17:00:00.642 Status: Starting automatic database backup procedure...
2023-01-09 17:00:00.900 Status: Ending automatic database backup procedure...
2023-01-09 17:00:01.901 Status: NotificationSystem: thread started...
2023-01-09 17:00:01.901 Status: EventSystem: reset all events...
2023-01-09 17:00:01.915 Status: EventSystem: reset all device statuses...
2023-01-09 17:00:01.957 Status: Python EventSystem: Initializing event module.
2023-01-09 17:00:01.957 Status: EventSystem: Started
2023-01-09 17:00:01.957 Status: EventSystem: Queue thread started...
2023-01-09 17:00:02.901 Status: MQTT: Connecting to localhost:1883
In MQTT explorer I see a lot of messaging going on. Especially under $SYS
Yet I cannot see any MQTT devices in Domoticz.
I'm using MQTT Auto Discovery Client Gateway with LAN interface with localhost, port 1883 and homeassistant as autodiscovery prefix.
Does anyone have a clue what I'm doing wrong?