Replies: 2 comments 6 replies
-
tested the above code with the hallsensor to my satisfaction , but 😭 not possible? Surprise: having the hallsensor-rules still in place from my experiments, i trigger the relay while touching the wire connected to the button_tc GPIO4 (touch1). is this a bug? or a magnetic side effect? i will investigate this with reboot. and after the reboot the relay is still toggled from the touch-pin. WHATS THIS? normal? edit: seems normal |
Beta Was this translation helpful? Give feedback.
-
When it comes to your code, it seems that you really aim for making it confusing. You supply a dummy function to It would make more sense with My preference would also be something like And instead of Except for the print() you're using, you could also skip the whole if, and do something like: Basically, your func2 boils down to.
I prefer doing |
Beta Was this translation helpful? Give feedback.
-
in berry you can read sensors faster than 1 sec. interval
i tried to use the built in halleffect (without berry) only with rules to trigger a relay and it had a longer delay.
maybe reading time of the internal hall-sensor is limited throug implementation?
Tasmota/tasmota/tasmota_xsns_sensor/xsns_127_esp32_sensors.ino
Line 38 in c1ea895
maybe it wasn't the right approach with rules and rules have a builtin minimal delay-time?
Berry
and after some ideas from other threads
hall in berry
ADC in berry
tasmota.read_sensors()
diagram of sensor reading
i put something together in berry what works quite well now, (and uses timer-callback)
the relay switches fairly quickly (compared to the rules trigger) when the magnet now comes closer to the ESP core.
even with this (longer) callbacktime of 1000ms (!)
maybe a pro can improve the skeleton, i'm a total beginner.
or there will come up a berry tasmota.function() like
gpio.analog_read and gpio.hall_read
to make use of?I would be happy about any suggestions or improvements.
Beta Was this translation helpful? Give feedback.
All reactions