Nickduino / Pi-Somfy

A script to open and close your Somfy (and SIMU) blinds with a Raspberry Pi and an RF emitter.
Other
434 stars 108 forks source link

Adding special set-up keypresses and a simple guided UI #131

Closed MarkGodwin closed 2 years ago

MarkGodwin commented 2 years ago

This feature allows you to run through the first-time installation steps (e.g. after a factory reset) as well as the configuration steps to update the limits and "My" position of the shutters. There is now no need for a genuine Somfy remote to set up the blinds at all.

I added a command to allow a specific chord of buttons to be pressed for a short or long period. The "short" period is very short, as limit adjustment needs to be very precise. This means you might have to hit the buttons a few times when doing the setup, unless your transmitter is very close to the shutter. (The shutters run in a low-sensitivity radio mode during the Initial installation stages)

In the Web UI, rather than make the user choose what chords they might want to try pressing, I added some simple step-by-step guides to each of the shutter's configuration modes. This is hidden away in a configuration dialog, so it shouldn't affect the existing UI usage of the page.

I tried to follow the existing code patterns and formatting style, but python isn't a language I'm all that familiar with so I may have done some things in a way that isn't sensible.