Closed viper-666 closed 2 years ago
you might find this thread more useful that here; https://community.openhab.org/t/nxpanel-replacement-firmware-for-sonoff-nspanel/132869/61
you can send a
{"sync": {"pid": 10, buttons:[{"bid":7, "state:"1}]}
you only NEED the refresh first time open the page or where it pid is different. nxpanel only ask for refresh
when needed, If it's the same pid, the nxpanel should send a sync not a refresh message, meaning all the icons and labels are fine, it just needs to know the state, so you can send the short "sync" message back
make sense?
I know the side you mentioned, but I don't find a answer to my question there.
And I thought I have understood you but
nxpanel {"sync": {"pid": 10, buttons:[{"bid":1, "state:"0}]}
on the Tasmota console don't change the state of the button 1 (toggle typ 1).
bit of a typo...
{"sync": {"pid": 10, buttons:[{"bid":1, "state:"0}]}
should be ...
{"sync": {"pid": 10, "buttons":[{"bid":1,"state":0}]}}
come on Andre!!! :) :) that's basic json! 😛
Ok, thank you that works, what one space makes... And you are so fast with the updates of the tft file, I can't flash it in time :-) Could you please give me a example code how I can fill the status page?
Thank you 👍
You gave me a example how to configure the buttons on the second page. This works fine but if I update only one button like this:
nxpanel {"refresh":{"pid":10,"name":"Home","format":6,buttons:[{"bid":7,"label":"Viper","type":10,"next":12,"state":15,"icon":12}]}}
It changed the icon and the naming of the button, but the button don't work any more (it doesn't go to the status page). I have to refresh all buttons to get the functionality back. And can you give me please give an example whow I set the ten status on the status page?