KaufHA / PLF10

Files for the PLF10 Power Monitoring Smart Plug.
26 stars 15 forks source link

Is there a way to guarantee that relay stays closed? #24

Open sowbug opened 11 months ago

sowbug commented 11 months ago

I'm using a Kauf Plug as a power meter for my desk, which includes my computer. Twice in the past few months my power has suddenly glitched, computer restarts, chaos ensues, etc. Today I figured out that the Kauf plug was responsible. I think it lost its connection to the internet, and like any ESPHome device rebooted in the hopes of restoring the connection.

That's normally a great feature, but in this case it makes the plug a lot less useful for my intended purpose.

I see reboot_timeout in https://esphome.io/components/wifi, and I'm about to try it like so:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  reboot_timeout: 0s

Does this sound right? Is there anything else I can do to configure the plug to never, ever, ever turn off the outlet?

bkaufx commented 11 months ago

If it is rebooting normally I don't think it should be toggling the relay, so it might be crashing. I'd try using the -minimal.yaml config package. The issue might be something glitching with our new HLW component, so using minimal or lite will eliminate using that.

just change the packages line to add -minimal or -lite like so:

packages:
  kauf.plf10: github://KaufHA/PLF10/kauf-plug-minimal.yaml
sowbug commented 11 months ago

I'm willing to switch to -minimal. Alternatively, I'm willing to be the guinea pig to test the crash theory. If there are logs or other diagnostics I can provide the next time it unexpectedly toggles, let me know what you're looking for, and I'll stay on the regular build.

(For those playing along at home, I think HLW refers to HLW8012, which is a power-sensor hardware chip. I suspect that "new HLW component" means that someone, possibly Brian, rewrote the software component that supports the HLW8012.)

On Fri, Sep 22, 2023 at 9:26 AM Brian Kaufman @.***> wrote:

If it is rebooting normally I don't think it should be toggling the relay, so it might be crashing. I'd try using the -minimal.yaml config package. The issue might be something glitching with our new HLW component, so using minimal or lite will eliminate using that.

just change the packages line to add -minimal or -lite like so:

packages: kauf.plf10: github://KaufHA/PLF10/kauf-plug-minimal.yaml

— Reply to this email directly, view it on GitHub https://github.com/KaufHA/PLF10/issues/24#issuecomment-1731705147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAHMVAS7RMYHOZAB7QMM2DX3W32JANCNFSM6AAAAAA5CJ64PM . You are receiving this because you authored the thread.Message ID: @.***>

bkaufx commented 11 months ago

Yea sorry I should have been more specific but you're right HLW and new HLW component is one written by me to replace the ESPHome default. For now run lite or minimal and let me know if you have the issue again.