-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Enhance new shutter modes and code cleanup. #9244
Conversation
Stefan, is this stable? I plan to release v8.5 tomorrow but am reluctant to include this major change. pls advice. |
Hi arendst. Please do NOT integrate for the next stable release. I already did a lot of testing but you never know I I do not want to break something in a stable release. You can integrate it AFTER the release of 8.5. So I also have time to update the documentation. And also check for the stepper motors. |
I found an Issue in the Stepper driver. Please do not integrate now. Will post an update Tuesday |
- fix restart bug on servo - refactor smooth-ramp for stepper and servo. Now in RTC and much more stable - increased internal resolution to better work with ramps - testing, testing, testing....
Now I'm pretty sure that not only the normal shutter still operates This was also OK before. Now also the smooth ramp on stepper and servos is in sync and tested hours and hours and hours... :-) Driver is now tested 100% and I would also be fine with 8.5. Depends on you. In many cases the stepper runs better than before. |
- harmonized variable naming - add more code comments to help others to understand - SWITCH/PULSE now defined for each shutter.
@arendst : Hi Theo, the servo operation PWM min and max are currently hardcoded. I see there is already a PWMrange defined in the standard. But this just seems to limit the max value. Is there already a way to limit the PWM value instead of 0..1023 to 90..500 without inventing additional variables? |
Current PWMRange command only supports 255, 511 or 1023 (being 8, 9 and 10-bit) resolutions. These values make calculation PWM values very easy. The bottom range is always 0. Changing this to any value like higher low and different high values will at least for lights introduce issues. The chances of having an esp8266 control both lights and shutters are dim. I think the best way forward and keep lights and shutter not intertwined you'll need to introduce a ShutterPwmRange command with both a low and high parameter like |
Please look at issue #9458 |
Description:
#9098 fixed enhanced
#8901 fixed enhanced
Refactor the driver to support different kinds of requirements to operate relays/stepper/servos and open for future requests.
Pulsetime on relays now can be defined independently from the operation mode of the shutter. Only define pulsetime on the relay.
Added new "shuttermode" command to specify an operation mode. Default is 0 and will autodetect the mode as in the previous version as the best guess. The following modes are supported: SHT_UNDEF, SHT_TIME, SHT_TIME_UP_DOWN, SHT_TIME_GARAGE, SHT_COUNTER, SHT_PWM_VALUE, SHT_PWM_TIME,
New modes:
Related issue (if applicable): fixes #
#9098 fixed enhanced
#8901 fixed enhanced
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass