ZigUP icon indicating copy to clipboard operation
ZigUP copied to clipboard

Question about integration with zigbee2mqtt

Open azh-github opened this issue 5 years ago • 9 comments

So far, all my attempts to manage have not been completely successful. Where can I find out what exactly to send to the topic "mqtt", to control the LED and WS2812 tape. While I control only the relay, sending to the topic 'zigbee2mqtt/ZigUP1/set' <- ON or OFF. I see pulses on the oscilloscope at the output of turning the polarized relay on or off. It's good. But attempts to send to ".../set/led" lead to errors in zigbee2mqtt, but simply to "set" do not give a result. There is no information and can not find - how to. I ask for help. Thanks.

azh-github avatar Jan 06 '20 15:01 azh-github

so far I have done so: static void zclZigUP_OnOffCB( uint8 cmd ) ... // Turn on the light if ( cmd == COMMAND_ON ) { Relais(LIGHT_ON); LED(1); } // Turn off the light else if ( cmd == COMMAND_OFF ) { Relais(LIGHT_OFF); LED(0); } ...

But, I need an independent LED, but I’m silent about the tape :)

azh-github avatar Jan 06 '20 15:01 azh-github

Send "{"led":"toggle"}" (or on/off instead of toggle) to your "set" topic.

For the WS2812 tape use {"light_color":"..."} for the "set" topic. You can use several parameter formats for that (see https://github.com/formtapez/ZigUP/blob/c14e12ebba28ea22bc18bfca1ce4d822ef75c947/zigbee-shepherd-converters/converters/toZigbee.js#L420 ). Its compatible with nodered's colorpicker.

formtapez avatar Jan 06 '20 16:01 formtapez

'Error: Cluster 'genOnOff' has no command '{led:on}' ... 'Error: Cluster 'genOnOff' has no command '{led:off}' in zigbee2mqtt log :(

Cluster 'genOnOff' -- is right target?

azh-github avatar Jan 06 '20 17:01 azh-github

i'm use "openHAB2" for tests

azh-github avatar Jan 06 '20 17:01 azh-github

Error: Cluster 'genOnOff' has no command ' "{"led":"toggle"}"

azh-github avatar Jan 06 '20 17:01 azh-github

Cluster 'genOnOff' is only used for the relais. You dont have to care about the cluster - zigbee2mqtt chooses the right one depending of the command. Maybe your version is outdated and it doesnt know ZigUp yet? Unfortunately i cannot say anything about openHAB2.

formtapez avatar Jan 06 '20 17:01 formtapez

o lala! wonderwork ... :)

  1. i sent 'on' to topic 'zigbee2mqtt/ZigUP1/set/led' -- and the LED turned on
  2. i sent 'off' to topic 'zigbee2mqtt/ZigUP1/set/led' -- and the LED turned off (used the program 'MQTT.fx') We continue research :)

azh-github avatar Jan 06 '20 17:01 azh-github

It turned out the following: The command reaches its destination when sent to the topic 'zigbee2mqtt / ZigUP1 / set / led' <- "on" or "off", but if you immediately send any second command, it fails with the diagnostics "'Error: Data request failed with error:' MAC no ack '" ... in my opinion, the 2530 controller restarts at this time. Diagnostics: zigbee2mqtt:debug 2020-01-06 22:00:58: Error: Timeout - 32826 - 8 - 49 - 257 - 11 after 15000ms ... zigbee2mqtt:info 2020-01-06 22:00:58: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Publish 'set' 'led' to 'ZigUP1' failed: 'Error: Timeout - 32826 - 8 - 49 - 257 - 11 after 15000ms'","meta":{"friendly_name":"ZigUP1"}}'

Conclusion: Or zigbee2mqtt of the latest version (zigbee2mqtt: '1.8.0') does not know how to work with ZigUP correctly and stands on an unrequited timer, Or there is an error in the ZigUP code (after all, the LED is controlled all the same) and the timer simply does not wait for a response from ZigUP.

sh-5.0$ npm version { zigbee2mqtt: '1.8.0', npm: '6.13.4', ares: '1.15.0', brotli: '1.0.7', cldr: '36.0', icu: '65.1', llhttp: '2.0.1', modules: '79', napi: '5', nghttp2: '1.39.2', node: '13.5.0', openssl: '1.1.1d', tz: '2019c', unicode: '12.1', uv: '1.34.0', v8: '7.9.317.25-node.23', zlib: '1.2.11' }

azh-github avatar Jan 06 '20 19:01 azh-github

I have the same problem. I want to expose the color picker in zigbee2mqtt by adding e.light_brightness_colorxy(), but when I use it nothing happens. The firmware doesn’t call the “MoveToColor” callback.

hope someone can help us.

tomasrocchetti avatar Dec 02 '21 18:12 tomasrocchetti