Augh!!! New users can only embed one image so I’m having to rewrite this without some of the screenshots. . .
Greetings. . .
I’m a noob naturally or I wouldn’t be bothering everyone with this but just to get it out of the way I’ve already RTFM and can’t find the answer and have spent 2 or 3 hours trying to figure out how to get the forum search to provide an answer but all I get is stuff that has absolutely nothing to do with my question.
I’m trying to use HA to automate a dust collector in a friends wood working shop. The idea is that when any of the tools get activated the dust collector turns on and when all are off the dust collector runs for 2 or 3 more minutes then shuts down.
I’m using a Raspberry Pi 3 and a Sonoff S31 along with an ESP8266 Node MCU to configure a test set up. The ESP8266 has an on board LED that I used to test HA configuration by creating a “Hello World turn the LED on” ability to see how HA works. I bought some Sonoff S31 wifi switches with build in current monitoring and flashed them using ESPHome. Both devices are working via the Overview and Generic dashboards.
I wrote 2 automations based on the current sense capability of the S31 to monitor current. At present a floor fan is used to simulate a wood working tool so that if the fan is on i.e. current above 0.3 (fan draws 0.5 amps in normal operation) then the LED on ESP8266 is turned on. This should simulate a tool being turned on and the command to turn on dust collector. The second automation is set up that if the current drops below 0.2 then check if ESP8266 LED is on and if so then turn it off.
The automation scripts seem to run OK but they take a LONG time to trigger. According to Logbook both automations are taking 54 seconds to trigger. The delay is consistent (sorry, had to manually enter as sceenshot was not allowed):
ESP8266HellowWorld Onboard LED turned on triggered by automation Fan Monitor On triggered by numeric state of S31-001S31-001 Current
20:57:54 - 34 minutes ago
Fan Monitor On triggered by numeric state of S31-001 S31-001 Current
20:57:54 - 34 minutes ago
S31-001 S31-001 Relay turned on triggered by service Switch: Turn on
20:57:00 - 35 minutes ago
Here’s the ON automation (was originally a screenshot of the built in automation editor now YAML):
alias: Fan Monitor On
description: Test to see if monitoring current draw can trigger different device
trigger:
- platform: numeric_state
entity_id: sensor.s31_001_s31_001_current
for:
hours: 0
minutes: 0
seconds: 0
above: 0.2
condition: []
action: - type: turn_on
device_id: d72d05b23966e4f0208fb76f677b67f8
entity_id: c4b914e66e280110c83840805f199487
domain: light
Does anyone have an idea why the automations are taking 54 seconds to trigger? From my reading I thought the resolution of automations was 1 second.
Or can anyone suggest search parameters that might point me in the right direction on finding answers in the forums maybe? Things like “automation delay too long” and “automation timing” and “automation execution time” and other assorted search phrases give me lots of answers that have nothing to do with what I’m trying to find. BTW, I tried a LOT of different search criteria to no avail. The above are just examples.
Thanks for any assistance you can provide