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

[Feature Request] Send manually constructed commands using Out node (or new node) #105

Open
rechichidaniel opened this issue Dec 29, 2022 · 7 comments

Comments

@rechichidaniel
Copy link

Can you please add the ability to construct commands and payloads manually in an Out node? Currently, we can only select from preset command options in a dropdown list.

Context: I used a Zigbee sniffer to see what commands my Philips Hue bridge was sending before I moved to Zigbee2MQTT, and now I'd like to use Node Red to send the commands that Zigbee2MQTT can only send from the dev console.

Commands like these:

Cluster Command Payload
0x0006 0x40 (off with effect) { "effected": 0, "effectvariant": 0 }
0x0008 0x02 (write attributes) 0x4000 (startup level) = 0xff (previous)
* Z2M can send 2x other startup commands without dev console, but not this one)
etc. etc. etc.

Something like the zigbee2mqtt dev console in a node. Using the Fade Off example:

  • Cluster: 0x0006 which I pulled from the Hue packet.
  • Command: 0x40 which I also pulled from the Hue packet.
  • Payload:
{
"effectid":0,
"effectvariant":0
}

image

@rechichidaniel rechichidaniel changed the title [Feature Request] send manual commands with out node (or new node) [Feature Request] send manual commands using Out node (or new node) Dec 29, 2022
@rechichidaniel rechichidaniel changed the title [Feature Request] send manual commands using Out node (or new node) [Feature Request] Send manually constructed commands using Out node (or new node) Dec 29, 2022
@andreypopov
Copy link
Owner

you an use raw json as payload
2022-12-29_07-37-47

@rechichidaniel
Copy link
Author

Thanks Andrey. I can add the payload in json format, but how do I add the rest of the command? e.g. command, cluster, endpoint, etc.
Command 0x40 isn't in the dropdown list so I would need to add it some other way. And I'm not sure how to add the 0x0006 cluster.

Using the Fade Off command as an example:

  • Endpoint: 1
  • Cluster: 0x0006
  • Command: 0x40
  • Payload: {"effectid":0,"effectvariant":0}

I'm assuming the endpoint is the device, but I'm not sure.

@rechichidaniel
Copy link
Author

For others who get stuck, this is how you send the full command.
Thank you Gwww on the Home Assistant forum.

{
    "command": {
        "cluster": 6,
        "command": 64,
        "payload": {
            "effectid": 0,
            "effectvariant": 0
        }
    }
}

Z2M Node Red Output Config

JSON Command

@pagaille
Copy link

pagaille commented Apr 2, 2023

Ability to set multiple parameters at once directly in the UI would be nice. Simple example : setting state = ON and brightness = 100 is a very usual case which is not easily done right now if I'm not mistaken.

@rechichidaniel
Copy link
Author

rechichidaniel commented Apr 2, 2023

The command you want is called MoveToLevelWithOnOff. You can't send more than one ZigBee command at a time (to my knowledge) but there are a tonne of commands designed to do more than one thing.

Are you using standalone Z2M or are you using Z2M as a Home Assistant add-on? In the Z2M UI, you have to know the correct command to send but from the developer tab in HA (and other places), you don't have to know the commands because you can just select the parameters you want and let Z2M/HA figure it out.

@pagaille
Copy link

pagaille commented Apr 2, 2023

Thanks. I ended up using {"brightness":255,"state":"ON"} which works. My point is that it should be straightforward to do so from the UI (directly in the dropdown).

@rechichidaniel
Copy link
Author

I'd like that too. Have you got a feature request or issue posted somewhere that I can follow?
Sorry, in my last reply I got distracted and didn't realise we were talking in the node-red-contrib-zigbee2mqtt GitHub. I thought this was the Z2M GitHub.

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