Commit Graph

141 Commits

Author SHA1 Message Date
Theo Arends 2dde0329ed
Merge pull request #7466 from to-scho/hotfix/shutterbuttons_no_key_restrictions
Enable WIFI setup, restart and reset via ShutterButtons
2020-01-09 14:52:54 +01:00
to-scho a1ccd0131d Enable WIFI setup, restart and reset via ShutterButtons
When no button restriction is given and ALL shutter buttons are pressed simultaneously more than 5 times or hold simultaneously follow Tasmota's basic button behavior.
2020-01-09 14:48:23 +01:00
Theo Arends a6dcf46771 Move heap to stack 2020-01-09 11:35:01 +01:00
Theo Arends a52c059cdc
Merge pull request #7465 from to-scho/hotfix/shutterbuttons_short_command
Add MQTT field to short shutterButton command syntax
2020-01-09 10:42:18 +01:00
to-scho 3675388148 Add MQTT field to short shutterButton command syntax
Align code to latest command doc suggestion
2020-01-09 10:35:27 +01:00
to-scho 2c6659fca4 Fix labeling of web buttons for shutters
Instead of switching power of the shutter relais web buttons will issue shutter commands to work right when in shuttermode 1. Up down labels arrow up/down fixed for more than one shutter.
2020-01-09 09:17:39 +01:00
Theo Arends 5c97cdc12e
Merge pull request #7437 from to-scho/hotfix/shutterbuttons_inverted_command
inverted ShutterButton command
2020-01-04 16:42:00 +01:00
Theo Arends 81d3b35d0c
Merge pull request #7436 from to-scho/hotfix/shutterbuttons
Fixed exception with ShutterButton
2020-01-04 16:41:24 +01:00
to-scho f6f4a3f88f inverted ShutterButton command
As discussed in doc repo this is the code for my inverted shutter button command.
2020-01-04 16:24:45 +01:00
to-scho cea20feab3 Fixed exception with ShutterButton
When a button assigned to a shutter is pressed before any command is issued an exception occured
2020-01-04 16:10:03 +01:00
Theo Arends 49137ec79f Refactor shutters 2020-01-04 15:09:57 +01:00
Theo Arends 8be7dbe235 Fix shutter JSON 2020-01-04 14:20:41 +01:00
kabongsteve 1b451e722f Improve multiple shutter operation and MQTT 2020-01-04 13:38:56 +11:00
Theo Arends eb7e7d45b2
Merge pull request #7403 from to-scho/feature/initial_shutter_button_support
Initial support for shutter button control
2020-01-02 14:48:13 +01:00
Theo Arends 8e3540d58d
Merge pull request #7405 from to-scho/hotfix/shutter_calibration_command_add_response
Add response to ShutterCalibration command
2020-01-02 14:40:25 +01:00
to-scho a9a5c33327 Wrong shutter percentage reporting
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.
2020-01-02 12:46:12 +01:00
to-scho f2a89605af Add response to ShutterCalibration command
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>.
2020-01-02 12:37:07 +01:00
to-scho 406a5a15f5 Initial support for shutter button control
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.
2020-01-02 11:23:11 +01:00
Theo Arends 8aa9109656 Happy New Year
Happy New Year
2019-12-31 14:23:34 +01:00
Theo Arends 1e06976eee
Merge pull request #7039 from ahoiahoi/domoticz-shutter
domoticz blinds -> tasmota support
2019-12-30 17:00:38 +01:00
stefanbode ddbca8e393
Update xdrv_27_shutter.ino
Fix infinite loop for shutter
2019-12-29 16:19:26 +07:00
stefanbode 9974d29726
Update xdrv_27_shutter.ino
Minor fix in recognizing stepper
2019-12-29 13:04:34 +07:00
stefanbode daf3d27c9a
Update xdrv_27_shutter.ino
Try to bugfix
2019-12-28 23:24:52 +07:00
stefanbode a2b4b1b06d
new features
- new closeduration
- new control how to accelerate an decellerate
2019-12-20 11:27:35 +01:00
root fa56e958e0 domoticz -> tasmota support 2019-12-17 10:40:48 +01:00
stefanbode 4aa66b8032
Update xdrv_27_shutter.ino
- bugfix inverted shutter
- improved stepper soft start/stop now in all situations
-
2019-12-15 14:21:41 +01:00
stefanbode de749b5b63
Update xdrv_27_shutter.ino
Sorry you were to fast for me. I uploaded a buggy version. Now fixed
2019-12-14 12:44:05 +01:00
stefanbode 40da54a0ec
New functions shutter: ramp up/down, MQTT reporting
- code optimization
- shuttermotordelay now defines ramp up and ramp down duration
- shutterposition reported through MQTT during movement (HASS support)
- improved stop (no underrun anymore)
2019-12-14 12:09:35 +01:00
stefanbode bfeaabfc7f
typo 2019-12-12 17:03:25 +01:00
stefanbode 29de8b9dce
Update several functions
- 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
2019-12-12 16:14:06 +01:00
localhost61 abf1d2b27c Cosmetic typo in shutter log 2019-12-12 08:39:44 +01:00
stefanbode 7cc7c2cc98
Update xdrv_27_shutter.ino
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
2019-12-09 10:14:13 +01:00
stefanbode f0e6e0098d
Added frequency change support
shutterfrequency 1000 is default. can be increased or decreased. 
Added more comments to the source code for explanation
optimize load in RPC call
2019-12-04 12:34:27 +01:00
stefanbode 0b3f84c36e
Added #7006 request for support of stepper motors 2019-12-02 21:44:05 +01:00
stefanbode 888bcb4cc2
fix #6892
#6892 shutterposition not reported
2019-11-13 08:48:53 +01:00
stefanbode 9ffcc424a9
Added UP/DOWN/STOP command for OpenHAB
shutterposition now also accept UP/DOWN/STOP or the position in % 0 ... 100
2019-11-12 09:52:41 +01:00
Theo Arends 4b49979274 Add SetOption comments to code 2019-11-03 13:51:22 +01:00
Theo Arends 5f4e38023d Add SetOption comments to code 2019-11-03 12:33:36 +01:00
stefanbode c67de901f1
Update xdrv_27_shutter.ino 2019-10-30 09:28:46 +01:00
stefanbode 562a564ff9
Added motordelay to enhance calibration
Some electronic shutters have up to 1sec before the motor starts. this can cause calibration issues
2019-10-30 09:20:55 +01:00
Theo Arends 0e07397ff7 Change Sonoff-Tasmota to Tasmota 2019-10-27 12:04:08 +01:00