Yes, this is their documentation… They have the same physical packaging, including the marking on the product …And I don’t think everyone will be looking at HW to find out what chip they have
Yeah, well, China…
That explains why it works with zstack
(not ember
). At least now you know which firmware is needed whenever it comes time to update it.
Whew! At least that’s solved; it’s not an E type.
Meanwhile the other person’s Sonoff dongle’s name starts with “Silicon Labs” so it suggests it’s an E type yet they say it works with zstack
not ember
.
But he directly bought the E version from the Sonoff store I myself was fooled and only found out when I tried to flash the fw for the router… and failed
How did you set this up exactly? Neither ember
nor zstack
work for me.
port: >-
/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_######################-if00-port0
adapter: zstack
and you have space before adapter:
This still didn’t cut it, unfortunately
port: >-
/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_#############-if00-port0
adapter: zstack
The new version (2.x) has a lot of breaking changes:
@mcarty Thanks for the GitHub discussion link. As per that article, I added the following lines to my Zigbee2MQTT config file and everything seems to be working:
advanced:
homeassistant_legacy_entity_attributes: false
homeassistant_legacy_triggers: false
legacy_api: false
legacy_availability_payload: false
device_options:
legacy: false
Is that all that needs to be done? I just skimmed over the rest of the topic and there’s a lot of info, so I could be missing something.
Actually none of my aqara buttons work. I’m thinking this line in that article is talking about that issue:
Only breaking when legacy is enabled:
- All click sensors have been removed (
homeassistant.legacy_triggers
setting). This means allsensor.*_click
entities are removed. Use the MQTT device trigger instead.
Am I right?
… yeah, I had to go edit the triggers in all my automations with the aqara buttons. Changed them to MQTT device triggers.
For future reference, you can also use a State Trigger with the device’s event
entities.
Main advantage is that if the device is ever replaced, as long as the new one’s name remains the same, you won’t have to modify any automations that reference it.
In contrast, an MQTT Device Trigger uses the device’s device_id
and it will automatically change when the physical device is changed (requiring you to update all of its related automations).
@123 Thanks for the info. I just read over this article. I did not find any event attributes (in Developer Tools → States) for my aqara buttons. Is there something I need to do to activate event entities?
… found the answer in the article. Added the following to Zigbee2MQTT config.yaml:
homeassistant:
experimental_event_entities: true
… as a followup on configuring by event entities, the event_type status stays with the last action. So, for example, if I do a single click, the event_type changes to “single” and stays that way until I make a different action, like a double click, and then it changes to “double” until a different action type. Ideally the event_type state would go back to “null” shortly after the action, so I can toggle things on/off with a single click or double click. I do have a workaround by just adding an automation that sets all the event_type attributes to “null” 1 second after the action (i.e. single, double, or hold).
You could also read the full posting 123 linked to. It says exactly how to handle the new event entities so you can detect multiple clicks on the same button. Do not put any valies in the trigger. Never.
I’ve just had to do the same thing - updated Zigbee2MQTT to 2.0 and everything broke - seems reverting fixed things…
It’s still not entirely clear to me what has broken however, even after reading this thread and others on Reddit
The only things I know are:
- I updated Zigbee2MQTT to v2
- I am using a Sonoff Zigbee Dongle
- I received 502 Bad Gateway when trying to load the Zigbee2MQTT dashboard
- The addon was telling me that it was not started when the addon page showed that it was…
Can anyone advise what actually needs to be done to prevent this break!?
@KennethLavrsen: Thank you for the information. I’m trying to configure the triggers without any values, as you suggested, but it’s not working properly, and I’m wondering if I can get your input.
I did review your post titled “Using the new action events in Zigbee2MQTT 2.0”. Where I’m not understanding things is the lines on how to format the conditions. In your examples, it looks like a template with curly brackets around the “trigger.to_state.attributes…” part. I tried to simulate what you did, but the automation throws an error; the yaml is as follows:
alias: Testing Zigbee2MQTT v2
description: ""
triggers:
- entity_id:
- event.zigbee_smart_button_action
id: Single
trigger: state
not_from: unavailable
enabled: true
conditions: []
actions:
- alias: >-
If Generic Fan Plug is ON --> turn it OFF; else if it is OFF --> turn it
ON
if:
- condition: "{{trigger.to_state.attributes.event_type == 'single'}}"
- condition: state
entity_id: switch.generic_smart_plug
state: "on"
enabled: true
then:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.generic_smart_plug
else:
- if:
- condition: "{{trigger.to_state.attributes.event_type == 'single'}}"
- condition: state
entity_id: switch.generic_smart_plug
state: "off"
enabled: true
then:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.generic_smart_plug
enabled: true
mode: single
So, then I tried changing the conditions to states, as follows, but it only works intermittently:
alias: Testing Zigbee2MQTT v2
description: ""
triggers:
- entity_id:
- event.zigbee_smart_button_action
id: Single
trigger: state
not_from: unavailable
enabled: true
conditions: []
actions:
- alias: >-
If Generic Fan Plug is ON --> turn it OFF; else if it is OFF --> turn it
ON
if:
- condition: or
conditions:
- condition: state
entity_id: event.zigbee_smart_button_action
attribute: event_type
state: single
- condition: state
entity_id: switch.generic_smart_plug
state: "on"
enabled: true
then:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.generic_smart_plug
else:
- if:
- condition: state
entity_id: event.zigbee_smart_button_action
attribute: event_type
state: single
- condition: state
entity_id: switch.generic_smart_plug
state: "off"
enabled: true
then:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.generic_smart_plug
enabled: true
mode: single