Replies: 2 comments 1 reply
-
Hi @mugginsjm, There is a feature on the UI - give me 5 minutes, and ill demo CMD-Factory |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here you go. CMD Factory (Both APIs)
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe someone could show a more complex example of using command factory.
The device is a Fibaro dimmer and I would like to send say 50 to "percentage"
The Wiki is very compehensive but some real world examples would be great.
This will be driven from Alexa. Here is some code I have attempted within a function but it does not work.
var oo=msg.on;
var perc=msg.percentage;
var newPerc;
if(oo==true){newPerc=perc}else{newPerc=0}
let Message = {
"payload": {
"mode": "ValueAPI",
"node": 18,
"method": "setValue",
"params": [{
commandClassName: "Multilevel Switch",
commandClass: 38,
endpoint: 2,
property: "Target value",
propertyName: "Target value"
},newPerc]
}
}
return Message
I would ideally like to achieve this using the "Factory"
Beta Was this translation helpful? Give feedback.
All reactions