-
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
Ability to use POWER<x> for each configured PWM channel instead of POWER for the whole device #6134
Comments
This would also be useful for custom made boards running Tasmota. |
This is what Channel is supposed to do, with a range of 0..100. Don't forget to 'SetOption37 128' to ensure that all 5 pwm can be independently controlled. Is it what you are looking for? |
I don't want to re-set the Channel value each time. After giving it some more thought maybe it would be enough to allow Channel commands to accept values "ON/OFF" (which currently are converted to 1/0) or "TOGGLE" |
as explained by @Jason2866 on discord, SetOption37 applies only to specific brand of Tuya-based lightbulbs. |
Correct but that's only part of the story. By default when you change Channel1..3 it resets channels 4 & 5. This way you automatically switch between RGB and White. Unless SetOption37 >= 128, then channels 1..3 and 4-5 are independent. SetOption37 128 activates this mode without changing anything else. |
Ah I understand better your request, you want Power On/Off on each channel. It should be doable but we need another SetOption boolean to signal you want independent channels. @arendst is there a boolean SetOption I could use or could you add one please? Aldo, I didn't find where states of multiple Relays are stored in Settings. Any hint? |
|
Just take the next boolean setoption one as documented in settings.h |
@jziolkowski You can try this branch to see work in progress.
Numbering of Power is the same as currently, i.e. PWM numbers come just above the relays. This can however lead to inconsistent numbering. For example, if you have 2 relays and 3 PWM, relays are controlled via It's still unfinished and not ready for PR:
|
New version. I actually aligned numbering of I completely gave up supporting SetOption20 in multi-channels. There are far too many side effects and it would require to refactor some parts of code. My goal is still to have minimal code impact for this feature.
Philips Hue still not supported; |
... and, I'm back... to say... what does the documentation in the wiki need to say with respect to updates/new information, SetOption20, SetOption68, ... |
and what happens when you have both relay and pwm? |
@meingraham It's still a bit too early for wiki update. It should be ok in a few days. @jziolkowski If you have both relay and pwm, it's basically similar to currently. Relays will get I have a problem though. The Philips Hue emulation is currently limited to I propose to first use the 4 FriendlyNames as usual, then use the last FriendlyName(4) and append an index (5-16). |
I'm confused. You said:
but now you say that PWM are added after last relay, as before. So which approach it is? |
Let's take an example. Let's say you have 2 Relays and 3 PWMs. Relay1: In the previous approach it would have been: PWM1: |
Ahhhh ok. Now it makes sense. Thanks. |
By the way, I just found a bug in the current implementation of multiple relays with Hue Emulation, they all inherit the dimmers from the light, instead of being seen as simple on/off bulbs. Will correct it at the same time. |
Release candidate, still in the same branch: https://github.com/s-hadinger/Sonoff-Tasmota/tree/temp_multi_chan I will test further but it seems to react correctly, including Hue emulation. @jziolkowski If you can please test. |
All tests are good now. I will push the PR later in the day. |
Add SetOption68 to enable multi-channel PWM instead of a single light (#6134)
Currently for multi-PWM devices like RGB controllers the POWER command - as expected - toggles the light. But there are scenarios where per-channel control would be useful, such as (like myself) an H801 controlling 5 separate white LED strips. Having a SetOption that alters this behavior would be really nice.
The requested behavior can be done using rules and events as a workaround, but "native" command support per each channel would be truly useful.
(Currently this idea has 25 thumb-up's on the v7-community-vote discord channel ;) )
The text was updated successfully, but these errors were encountered: