If I setup a command node for a dimmer with the default command=setLevel, default argument=49 and then send a msg.command to it overriding setLevel with "off" it will cause an error on Maker API in Hubitat.
It looks like the Node-Red command node is still sending the "49" to Maker API even though the command "off" does not use/have arguments. I can see the "49" in the chain of Maker API messages before it generates the error - so I'm 99.9% that is what is happening.
Since Maker API is not expecting arguments with an "off" command it generates an error (and the "off" doesn't work).
To work around this I can do any of the following, which is fine for now:
Change the default command node to something other than setLevel that does not have arguments
Delete the default argument in the node
Set msg.arguments in the overriding message to a blank string
I'm just going to do #3, really easy to do since I already have a change node. No big deal.
But long term, commands that don't use arguments need to strip this out automatically to prevent errors in Maker API and ensure the command functions.
EDIT: 1 more thing. The response from that invalid command did make a trappable message, of sorts - if you had a debug node connected. This really should get logged/flagged somewhere more obvious. Without a debug node, you get no error indication in the Node-Red debug log at all. Maybe a status icon on the node with a red square, a debug warn/error message, something. Just food for thought!
LOL, good question!!! Interestingly, I did that while testing and forgot to change it back to 50. Glad I did, because in this specific case it made it really easy to find the issue. Purely accidental.
I went back in and edited hubitat, now there's a button "configure webhook" that I never noticed.
clicked on it, got a tick, click on deploy, it doesn't come up anymore.
Yep! It's about a default compatibility migration when you did not set the webhookPath. To avoid breaking all config nodes and force people to resave the form, then we simply add a default value with a notice
If you resave your config node, then it disappear
Just checking to see if you have tried adding the optional "duration secs" argument to the setLevel command? For example, I use a command node argument property 75,15 to dim the lamp to 75% over 15 seconds.
Node-RED only proxy what Maker API return and Maker API only proxy what the driver allow to do. So if you want this, I think you must modify the driver
Right. In the Hubitat driver model only setLevel has a duration argument.
So if you want to change color over time you will need to do it on the node-red side, and send saturation and hue commands on a repeated basis.
Frustratingly you can't use setColor, as there is an issue on the Hubitat side where it doesn't convert the string passed to it into a map. So, separate hue and saturation commands are needed.