Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keeps showing up in Home Assistant (OS) as unavailable until i reboot the plugs #44

Open
PeteDenmark opened this issue Feb 2, 2023 · 7 comments

Comments

@PeteDenmark
Copy link

PeteDenmark commented Feb 2, 2023

I have flashed with both the newest firmware and web interface, and both my HF-LPB100 plugs work great, and are auto discovered by Home Assistant mosquitto broker.
But every time i restart HA, they are unavailable until i reboot the plugs.

@phrogg
Copy link

phrogg commented Feb 9, 2023

I have the same issue.

@PeteDenmark
Copy link
Author

PeteDenmark commented Feb 10, 2023

I have the same issue.

I have made a workaround. I have made an automation that calls the HFeasy plugs reboot URL when HA starts. So HA starts, the plugs reboot, and everything is fine. Not the cleanest, but it works :)

You can call a URL with the Rest command:

So i configuration.yaml:

rest_command: !include rest_commands.yaml

Make a file called rest_commands.yaml and put the following in it:

#restarts HFeasy plugs by calling their URLs
restart_hfeasy_1:
  url: 'http://192.162.1.150:8080/save?restart=Restart'
restart_hfeasy_2:
  url: 'http://192.168.1.151:8080/save?restart=Restart'
restart_hfeasy_3:
  url: 'http://192.168.8.152:8080/save?restart=Restart'

You of course replace the url's with the url's for you specific plugs

Then i go into automations and make one script with the RESTful command to call the rest_commands of each plug.

And finally just make an automation with a trigger "when home assistant is started" and action and script whatever you called the script you made for the RESTful triggers.

@PeteDenmark PeteDenmark changed the title Keeps showing up in Homa Assistant (OS) as unavailable until i reboot the plugs Keeps showing up in Home Assistant (OS) as unavailable until i reboot the plugs Feb 10, 2023
@phrogg
Copy link

phrogg commented Feb 11, 2023

I have the same issue.

I have made a workaround. I have made an automation that calls the HFeasy plugs reboot URL when HA starts. So HA starts, the plugs reboot, and everything is fine. Not the cleanest, but it works :)

You can call a URL with the Rest command:

So i configuration.yaml:

rest_command: !include rest_commands.yaml

Make a file called rest_commands.yaml and put the following in it:

#restarts HFeasy plugs by calling their URLs
restart_hfeasy_1:
  url: 'http://192.162.1.150:8080/save?restart=Restart'
restart_hfeasy_2:
  url: 'http://192.168.1.151:8080/save?restart=Restart'
restart_hfeasy_3:
  url: 'http://192.168.8.152:8080/save?restart=Restart'

You of course replace the url's with the url's for you specific plugs

Then i go into automations and make one script with the RESTful command to call the rest_commands of each plug.

And finally just make an automation with a trigger "when home assistant is started" and action and script whatever you called the script you made for the RESTful triggers.

Nice idea, unluckily unsuited for me as a reboot power cycles the plug.

@PeteDenmark
Copy link
Author

Yeah - that sucks.

Guess calling the HFeasy plugs on and off URLs with get commands is the only option left

on: http://<deviceip>/state?sw=1
off: http://<deviceip>/state?sw=0

@sshaikh
Copy link

sshaikh commented Sep 4, 2024

Is there any guidance on how to set this up with HA? I've used the following YAML:

# Switch
mqtt:
  - switch:
      unique_id: car_charger_smart_socket
      name: "Car Charger Smart Socket"
      state_topic: "homeassistant/switch/hfeasy_360D92LWT"
      command_topic: "homeassistant/switch/hfeasy_360D92LWT"
      payload_on: "ON"
      payload_off: "OFF"

But no luck.

Actually at rest I see the topic flicking from Online to Offline before the socket completely crashes - is the MQTT client in v.1.1 actually functional?

@sshaikh
Copy link

sshaikh commented Sep 4, 2024

Also, I can't tell where to publish the autodiscovery to? I feel that there are a whole bunch of mqtt settings I am missing.

@sshaikh
Copy link

sshaikh commented Sep 8, 2024

FYI I moved away from MQTT and went with the HTTP API instead:

#47 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants