Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DimmerStep command #9733

Merged
merged 3 commits into from
Nov 4, 2020
Merged

Add DimmerStep command #9733

merged 3 commits into from
Nov 4, 2020

Conversation

jamesturton
Copy link
Contributor

@jamesturton jamesturton commented Nov 4, 2020

Signed-off-by: Scoobler jamienwood@hotmail.com

Description:

Add DimmerStep to allow an auto (+/-) value to be set between 1...50 instead of the fixed value of 10 which creates a very quick step when using rules for dimming. Default value remains 10.

Related issue (if applicable): fixes #9669

Checklist:

  • The pull request is done against the latest dev branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR.
  • The code change is tested and works on Tasmota core ESP8266 V.2.7.4.5
  • The code change is tested and works on core ESP32 V.1.12.2
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@jamesturton
Copy link
Contributor Author

jamesturton commented Nov 4, 2020

@Scoobler I made one small change to your PR which was to change the valid range of DimmerStep to be between 1..50 instead of 1..10 in case people want to have less steps. If you are ok with this then I shall mark this PR as ready for review.

Copy link
Owner

@arendst arendst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than my suggested change it looks ready for merge.

@arendst
Copy link
Owner

arendst commented Nov 4, 2020

Thx. about to merge. Looking forward to your shelly stuff.

@jamesturton jamesturton marked this pull request as ready for review November 4, 2020 18:12
@arendst arendst merged commit 655a6ec into arendst:development Nov 4, 2020
@Scoobler
Copy link
Contributor

Scoobler commented Nov 4, 2020

@jamesturton looks great, from testing even a value of 10 was a very high - but it’s good to give people the option to tune to all the different needs out there!

arendst added a commit that referenced this pull request Nov 5, 2020
Add command ``DimmerStep 1..50`` to change default dimmer up and down step of 10% by James Turton (#9733)
@kmatokov
Copy link

does that still read only or i just can't set it else than 10 ?

@barbudor
Copy link
Contributor

DimmerStep is just working fine.
As you don't give any details on what's you are doing, don't expect any details on what's you're doing wrong

@kmatokov
Copy link

yup you are right, i didn't provided much info's, because i thought that this treed is just about DimmerStep.... I just wandered if DimmerStep feature is still "hard-coded" (as i read it once was) to 10 because i tried to change it to 5 or other number, but my rules on long-press which trigger + and - continue to increase or decrease it for a 10 even i let DimmerStep 5 or less so i didn't figured out how to soften that dimming steps, thanks, and i'm not sure what release i used yesterday, but some ver 10xx from special tasmota platinum, but then i tested with "usual" last tasmota and same +/- 10 steps inc/dec. when using rules, thx.

@barbudor
Copy link
Contributor

At least with latest development version:

08:45:01.722 CMD: dimmer
08:45:01.729 MQT: stat/nodemcu/DIMMER = {"Dimmer":10}
08:45:09.355 CMD: dimmer +
08:45:09.365 MQT: stat/nodemcu/DIMMER = {"POWER":"ON","Dimmer":20}
08:45:20.769 CMD: dimmerstep 5
08:45:20.775 MQT: stat/nodemcu/DIMMERSTEP = {"DimmerStep":5}
08:45:24.786 CMD: dimmer +
08:45:24.793 MQT: stat/nodemcu/DIMMER = {"POWER":"ON","Dimmer":25}
08:45:30.275 CMD: dimmerstep 30
08:45:30.281 MQT: stat/nodemcu/DIMMERSTEP = {"DimmerStep":30}
08:45:34.900 CMD: dimmer +
08:45:34.907 MQT: stat/nodemcu/DIMMER = {"POWER":"ON","Dimmer":55}

@kmatokov
Copy link

ok, i probably can't use it as i use 4 pwm channels and "normal" dimmer not work for me, so i had to fix rules to use channel1 instead dimmer and it work, but

21:20:34.000 MQT: stat/tasmota_A5825C/RESULT = {"DimmerStep":7}
21:20:47.343 CMD: Dimmer1 +
21:20:47.351 MQT: stat/tasmota_A5825C/RESULT = {"POWER1":"ON","Channel1":100,"POWER2":"OFF","Channel2":100,"POWER3":"OFF","Channel3":100,"POWER4":"OFF","Channel4":100,"Color":"FFFFFFFF"}
21:20:56.184 CMD: Dimmer1 -
21:20:56.192 MQT: stat/tasmota_A5825C/RESULT = {"POWER1":"ON","Channel1":100,"POWER2":"OFF","Channel2":100,"POWER3":"OFF","Channel3":100,"POWER4":"OFF","Channel4":100,"Color":"FFFFFFFF"}
21:21:11.187 CMD: channel1 -
21:21:11.195 MQT: stat/tasmota_A5825C/RESULT = {"POWER1":"ON","Channel1":90,"POWER2":"OFF","Channel2":100,"POWER3":"OFF","Channel3":100,"POWER4":"OFF","Channel4":100,"Color":"E5FFFFFF"}
21:21:22.419 CMD: Dimmer -

maybe DimmerStep not work on 4 channel configuration (because has no effect on channels)
I'm relatively new on tasmota so i "grabbing in dark" or better say brute-forcing as i couldn't find how to use rules on multi channel soft-pwm but i somehow tapped on it by random testing

Rule1 
on system#boot do var1 + ENDON
on switch1#state=2 do POWER TOGGLE ENDON
on switch1#state=4 do Channel1 %var1% ENDON
on switch1#state=7 do event upordown=%var1% ENDON
on event#upordown=+ do var1 - ENDON
on event#upordown=- do var1 + ENDON

this now hardly exits from thread but if someone can point me how to use local longpress rules for channels but with DimmerStep having effect on individual or global channels

thx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Dimmer +/- step configurable
5 participants