SwitchBot gets an open API!

On this topic of positions of the curtains. I actually made virtual dimmer switches for all my curtains then use those to set their positions with a webcore script. Basically as long as the curtains reporting value is greater then 10 or less then 10 of the virtual dimmers value they are in the right position. If the physical value (real sb curtain device) goes outside that range or if the virtual value changes the physical value is set to what the virtual dimmers value is.

I set it up this way because I had a hell of a time at the start with the curtains not always getting the api request. So this way I have a timer check after two minutes of a requested curtain change to make sure they moved. If not, it will try again.

Not sure if this will help anyone else, but just thought I'd put it out there.

Shane

1 Like