nspanel
nspanel copied to clipboard
mqtt-widget-commands
After some helpful chatting on the Tasmota Discord I finally got this to work like I wanted:
To draw widgets:
NSPSetWidget {"type":"","name":"","position":,"always_online":}
"type":%s typelist
"name":%s max 8 char
"position":%d 1-8
"always_online":%b bool (optional, will be set false)
Types:
single horizontal double horizontal triple horizontal quad horizontal single vertical dual vertical triple vertical quad vertical rgb strip cct bulb rgb+cct bulb scene
To delete:
NSPSetWidget {"delete":}
"delete":%d 1-8
Examples:
NSPSetWidget {"type":"scene","name":"Scene 1","position":3}
NSPSetWidget {"type":"rgb strip","name":"Strip 1","position":5,"always_online":true}
NSPSetWidget {"delete":3}
Set the strip to "ON":
WIDGET {"relation":{'id': '5', 'params': {'switch': 'on'}}}
you have removed the ability to set widgets in the driver code and now it is required to use a command which is impractical