Z2M restart button not working.

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

Moderator: leecollings

Post Reply
rini52
Posts: 38
Joined: Friday 10 June 2022 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: NL
Contact:

Z2M restart button not working.

Post by rini52 »

Dear,

Try to use the auto discovered restart button of the the Z2M Sonof dongle but it failed. Same one is used in autodiscovery of Home assistant and there it works without any problem. I have to restart the Z2M so now and then, because of a USB problem on the PI-4 that is still (for years) not solved.
( i.e ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32 , caused by hardware/firmware problems so they say).

Has anyone an idea where to look to get it solved, so i can used the switch in an automatic recovery?

Thanks
Attachments
domoticz log
domoticz log
Screenshot_log.png (125.88 KiB) Viewed 1678 times
Error generated
Error generated
Screeshot_error_restart_z2m.png (17.55 KiB) Viewed 1678 times
Part off switches discovered.
Part off switches discovered.
Screenshot_zigbee_switches.png (61.08 KiB) Viewed 1678 times
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Z2M restart button not working.

Post by waltervl »

What auto discovered restart button of the the Z2M Sonof dongle do you mean?
Where is this button? In Z2M or Domoticz or on the stick?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
rini52
Posts: 38
Joined: Friday 10 June 2022 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: NL
Contact:

Re: Z2M restart button not working.

Post by rini52 »

I mean the switch in domoticz's switches tap (z2m-restart_z2m). This is auto created by the z2m auto detected (from the Sonof-dongle). You can push the symbol and than you get the error. In Home Assistant you get the same switch and there it works out-off the box. The ZB_waterpomp is also auto created from a Sonof-wall-socket build-in switch, but works oke.

I gues it has something to do with the device-class of these these things.

Regards
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Z2M restart button not working.

Post by waltervl »

Perhaps remove it and have it rediscovered with latest stable Domoticz version.

Also that switch should be somewhere in the Z2M user interface. What happens if you activate it from there?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
rini52
Posts: 38
Joined: Friday 10 June 2022 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: NL
Contact:

Re: Z2M restart button not working.

Post by rini52 »

I did remove the switch "restart" , but i don't seem to be able to re-discoverer it with AutoDectect in the new 2024.3 stable version. These are strange entries since they come from the Sonoff dongle (zstack- flashed with Z2M) itself. They don't have entries in the Z2M webpage like normal devices have.

In MQTT server you see under the discovery-tag long entries, like

homeassistant_domoticz/button/1221051039810110150109113116116_0x00124b00256c5929/restart/config

action:
{
"availability": [
{
"topic": "zigbee2mqtt/bridge/state",
"value_template": "{{ value_json.state }}"
}
],
"availability_mode": "all",
"command_topic": "zigbee2mqtt/bridge/request/restart",
"device": {
"hw_version": "zStack3x0 20220219",
"identifiers": [
"zigbee2mqtt_bridge_0x00124b00256c5929"
],
"manufacturer": "Zigbee2MQTT",
"model": "Bridge",
"name": "Zigbee2MQTT Bridge",
"sw_version": "1.35.1"
},
"device_class": "restart",
"name": "Restart",
"object_id": "zigbee2mqtt_bridge_restart",
"origin": {
"name": "Zigbee2MQTT",
"sw": "1.35.1",
"url": "https://www.zigbee2mqtt.io"
},
"payload_press": "",
"unique_id": "bridge_0x00124b00256c5929_restart_zigbee2mqtt"
}

But it did not get rediscovered again.....


So I give up on this one . Too detailed


BTW: MANY THANKS FOR THE NEW 2024.3 stable . Seem to run okay (apart from above)
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
rini52
Posts: 38
Joined: Friday 10 June 2022 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: NL
Contact:

Re: Z2M restart button not working.

Post by rini52 »

Had a look in MqttAutoDiscover.cpp and there is a difference between 2024.1 and 2024.4 . In 2024.1 the test on "restart" is not skipped while in 2024.4 its left to a later stage where the button action is unwrapped. Obvious something is wrong there. Below the difference between 2024.1 and 2024.4 at the top.
The connection_state, log_level etc are handled properly. The permit_to_join is picked up from the Z2M dongle if changed.:)

The discovery tag is above in this chat.

Below the difference


2024.1 -->
//skip some non-needed types, they will be transmitted in the state topic anyways (for 90%) or not necessary
if (
(object_id == "update_available")
|| (object_id == "power_on_behavior")
|| (object_id == "power_outage_memory")
|| (object_id == "update_state")
|| (object_id == "over-load_status")
|| (object_id == "linkquality")
|| (object_id == "last_seen")
|| (object_id == "sensitivity")
|| (object_id == "color_temp_startup")
|| (object_id == "requested_brightness_level")
|| (object_id == "requested_brightness_percent")
|| (object_id == "device_automation")
|| (object_id == "over-load_status")
|| (object_id == "hardware_status")
|| (object_id.find("_address") != std::string::npos)
|| (object_id.find("_ssid") != std::string::npos)
|| (object_id.find("_signal_sensor") != std::string::npos)
)

2024.4 -->
//skip some non-needed types, they will be transmitted in the state topic anyways (for 90%) or not necessary
if (
(object_id == "update_available")
|| (object_id == "power_on_behavior")
|| (object_id == "power_outage_memory")
|| (object_id == "update_state")
|| (object_id == "over-load_status")
|| (object_id == "linkquality")
|| (object_id == "last_seen")
|| (object_id == "sensitivity")
|| (object_id == "color_temp_startup")
|| (object_id == "requested_brightness_level")
|| (object_id == "requested_brightness_percent")
|| (object_id == "device_automation")
|| (object_id == "over-load_status")
|| (object_id == "hardware_status")
|| (object_id.find("_address") != std::string::npos)
|| (object_id.find("_ssid") != std::string::npos)
|| (object_id.find("_signal_sensor") != std::string::npos)
|| (object_id == "connection_state")
|| (object_id == "log_level")
|| (object_id == "restart")
)


Don't know if the command button (associated with it) is already implemented en hope someone can have a look at it?
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest