With calibrated shutters and ShutterPosition<x> 100 the resulting position may not be 100. This is due to 2 issues. a) percentage is calculated wrong from position due to numerical precision. b) real_position and subsequently position after movement is slightly smaller than max_position.
a) is fixed here by avoiding calculation when position is equal to calibration point
b) open, not fixed here. Issue further depends on start_position which makes it hard to reproduce. Maybe 'stop_position_delta=20' results is real_position not reaching max_position.
When ShutterCalibration<x> is called without any arguments no response was given before that allows to read out setting like for other commands. Workaround was to call ShutterRelay<x> <y>.
New command "ShutterButton<x> <a> <b> <c> <d> <e> <f> <g> <h> <i> <j>" added that allows to assign a tasmota button <x> to control shutter <a>.
Single press button shutter is set to position <b>. Double press button shutter is set to position <c>. Tripple press button shutter is set to position <d>. Hold button shutter is set to position <e>. Disabling any button action is given by <b> ... <e> equal to "-". Any press of the button while the shutter is moving will immediately stop that shutter.
Global steering of all your shutters at home is supported by MQTT. By any button action an MQTT command can be initiated to the <grouptopic> of the device. For single press button this can be enabled by <f> equal to "1". Disabling is indicated by <f> equal to "0". Double to hold actions are given by <g> ... <i>, correspondingly. When <j> is equal to "0" only "cmnd/<grouptopic>/Shutterposition<y> ..." with <y>=<x> is fired. When <j> is equal to "1" <y>=1...4 is used to control any shutter number of a tasmota device having same <grouptopic>.
Easy setup for an "up" button:
ShutterButton<x> <a> up (same as ShutterButton<x> <a> 100 50 74 100 0 0 0 1 1)
Single press will move shutter up to 100%, double press to 50% and tripple press to 74%. Holding the button for more than the hold time (SetOption32) moves all shutters with same <grouptopic> up to 100%.
Easy setup for an "down" button:
ShutterButton<x> <a> down (same as ShutterButton<x> <a> 0 50 24 0 0 0 0 1 1)
Single press will move shutter down to 0%, double press to 50% and tripple press to 24%. Holding the button for more than the hold time (SetOption32) moves all shutters with same <grouptopic> down to 0%.
Easy setup for an "updown" button:
ShutterButton<x> <a> updown (same as ShutterButton<x> <a> 100 0 50 - 0 0 0 0 0)
Single press will move shutter up to 100%, double press down to 0% and tripple press to 50%. No hold action and no other shutter control by MQTT.
- code optimization
- shuttermotordelay now defines ramp up and ramp down duration
- shutterposition reported through MQTT during movement (HASS support)
- improved stop (no underrun anymore)
- finally, secure pressing DOWN/UP button when shutter already in end-position will not turn ON the relay
- remove shutter commands to main to allow other modules to interact
- fix some overrun and underrun issues to end-positions
fix#7006 support for multiple shutters with steppers
+ add ShutterOpen/Close/Stop can get shutter index as parameter. e.g. shutteropen 3 to open shutter 3