Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about integration with zigbee2mqtt #17

Open
azh-github opened this issue Jan 6, 2020 · 9 comments
Open

Question about integration with zigbee2mqtt #17

azh-github opened this issue Jan 6, 2020 · 9 comments

Comments

@azh-github
Copy link

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
Copy link
Author

azh-github commented Jan 6, 2020

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 :)

@formtapez
Copy link
Owner

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

).
Its compatible with nodered's colorpicker.

@azh-github
Copy link
Author

'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
Copy link
Author

azh-github commented Jan 6, 2020

i'm use "openHAB2" for tests

@azh-github
Copy link
Author

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

@formtapez
Copy link
Owner

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.

@azh-github
Copy link
Author

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
Copy link
Author

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'
}

@tomasrocchetti
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants