Replies: 4 comments 2 replies
-
You do not need any new payload for using the rotary in rules instead of controlling a light, as this is already supported, selected via Here's an example of how you can get values from a 16-position rotary
And here's a trick if you just want increment/decrement instead of a value. Asking for a one-value rotary effectively produces a direction:
However, these values available to triggers are not pushed as series of console/MQTT messages. And a bit of hair-splitting.... You ask for "raw", but the rotary does not have any raw position, only direction ticks. The bounded position is a feature on top of the raw input. Looks like you did not read the docs about using a rotary encoder.... |
Beta Was this translation helpful? Give feedback.
-
@sfromis My expression "rotary raw" may be misleading but it was the best name that came to my mind when working on that. Edit: maybe |
Beta Was this translation helpful? Give feedback.
-
Thank's for your clarification on the effects of I've tried already with |
Beta Was this translation helpful? Give feedback.
-
Back to this issue:
Conclusion: please forget about my request. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I'm using rotary encoder (type KY-040) in several environmental related projects as a control element to set temperature or humidity values but not as a slider to control light.
The current implementation of rotary encoder is aligned to set light values which have limits (e.g. from 0% to 100%) and fixed rotary steps which can be set. My need is no fixed lower or upper limit nor a step boundary for all this varies on the settings needed individually in the certain project.
To fit my needs I've modified the "support_rotary.ino" file to report the raw information about the rotary changes regarding up or down and whether button is pressed or not. This information is published using MQTT and can be used in scripting or rules.
My changes are based on support_rotary.ino (version 14.1.0.2) and have an additional parameter "ROTARY_RAW" to be defined in user_config_override.h controlling whether the option is used or not.
The coding adds the following lines to "tasmota\tasmota_support\support_rotary.ino"
(@@ -263,0 +263,4 @@ void RotaryHandler(void) {):
#ifdef ROTARY_RAW
Response_P(PSTR("{\"Rotary%d\":{\"Btn\":%d,\"Pos\":%d}}"), index +1, button_pressed, rotary_position);
MqttPublishTeleSensor();
#endif // ROTARY_RAW
Please let me know your opinion on this idea and thank you for considering.
Günter
Beta Was this translation helpful? Give feedback.
All reactions