Help with 'he cmd' messages

I posted a too long or too complicated version of this earlier and have gotten 0 replies so I'm trying again.

I have two devices. One device 'Arduino ZB', parses Zigbee messages and sends 'he cmd' commands to another device 'Skylight'. If I use the Hubitat UI Devices > Commands, any changes made, level, light color, etc. From 'Arduino ZB' are carried out by the other device 'Skylight'. So far, so good.

Even though the driver works via the Commands UI for 'Arduino ZB', it does not work when receiving (I hope?) incoming messaages from 'Arduino ZB' via the device code's 'he cmd' messages.

The driver for 'Arduino ZB' uses part of the 'Generic RGBW light' code.

Can someone take a look a see why not?

It seems to me that if it works via the Hubitat UI it should work when receiveing messages as well. I'm brand new to Groovy and Hubitat so I could be missing something small.

Thanks for any help.

1 Like

Can you please also log the full "he cmd ..." string? I don't know what the intToHexStr() function does and I could not find it in the docs.

If it helps, you can take a look at my implementation here. Although it uses the low-level he raw instead of he cmd, it does the same thing (invoke command 0x0A from cluster 0x0300).

Edit: you can also inspect the output of zigbee.setColorTemperature(BigDecimal value, int delay = STANDARD_DELAY_INT) to compare with yours. This should use the current device (Arduino ZB) deviceNetworkId and endpointId which you don't want, but it might help you with building the correct command string.

1 Like

Thank you so much for responding! I was really starting to wonder why nobody was replying.

I was actually just in the middle of scrapping my original idea and going about this problem in a very different way; Global Variables and using the Rules Machine App. I got it to work that way FWIW.

Sorry for your trouble. I may go back to the he cmd problem at some point because I can't stand that it stymied me so much.

Best.

1 Like