Hello everyone, this is my firts post here but I’ve read a lot while configuring lots of devices in HA. Sorry for my bad english.
I’m trying to use some Sonoff DUALR3 powering motor-blinds with mechanical endstops.
Following some guides on the web (GPIO pinout, BL0939 integration, switch input integration, lambda controls for testing with on-board button and interlock function) I managed to make it work, but with some questions about how it does:
To have the sensor reading fast enough to detect endstops i have to set it to 500ms.
This is causing 4 entries per seconds on the logs which doesn’t sound really efficient.
As I don’t need the current to be measured when relays are not triggered, is there a way to force the sensor update at 500ms (or less) when at least 1 relay is on and disable readings when both relays are off?
Current measurement is “internal” so value doesn’t transfer to HA and occupy history space, if that’s what you mean. But in any case measurement are recorded into history only when changed, not at every measurement. So when cover current is zero that value is recorded only once, not every 0.5 s. - until it changes, of course.
Thank you for your reply,
I know that as I disabled sensor names on purpose to remove them from Home Assistant.
I was thinking about resource waste due to continuos sensor monitorin, am I wrong? Is this the best way to make it work?
No, in esphome yaml you set current sensors as “internal: true”. That way they won’t show in HA:
sensor. In below example all sensors are internal - i think that “name” is not needed either… names are just “leftovers” from my testing, when i temporarily created voltage and current sensors available in HA for monitoring…
- platform: ade7953
irq_pin: GPIO16
voltage:
name: Shelly 2.5 Mains Voltage
internal: true
filters:
- throttle: 5s
current_a:
name: Shelly 2.5 Open Current
id: open_current
internal: true
current_b:
name: Shelly 2.5 Close Current
id: close_current
internal: true
update_interval: 0.5s
You said for both current sensor that " This is causing 4 entries per seconds on the logs which doesn’t sound really efficient." internal is the solution for this.
Regarding log: there are a couple of options, see logger component.
This example sets all logs to “verbose”, only switch components to “info”:
logger:
level: verbose
logs:
switch: info
I guess that you could try:
logger:
logs:
sensor: none
This way sensors won’t be logged.
But i’m not sure what you’ll gain with it… it’s just an internal esphome’s logger, which is constantly overwritten.