Pack3tL0ss / ConsolePi

Raspberry Pi Based Serial Console Server, with PushBullet Notification of IP changes, Automatic VPN termination, custom menu, Power Outlet Control, and a lot more
MIT License
185 stars 16 forks source link

Refactor ESPHome Power Logic to Also Support Home Assistant #203

Open conallob opened 1 month ago

conallob commented 1 month ago

I would like configure ConsolePi to support Power Control with my PoE switch, by using Home Assistant as an intermediatary between ConsolePi and my Network Controller.

My existing Home Assistant instance is able to control individual ports on my PoE switch. Since ESPHome and Home Assistant are from the same foks, there are a number of parallels between both systems.

AFAIK, the main differences between a Home Assistant or ESPHome power controller are:

Pack3tL0ss commented 1 month ago

You want ConsolePi to be able to toggle PoE on individual ports?

The power control currently is to control outlets, i.e. turn on/off the actual switch itself.

I'll be working with that bit of the code soon as I'm adding port-groups (one menu item toggles on/off multiple ports). I'll take a look at it.

conallob commented 1 month ago

You want ConsolePi to be able to toggle PoE on individual ports?

Correct.

The power control currently is to control outlets, i.e. turn on/off the actual switch itself.

Home Assistant's integration with my PoE switch presents with the same abstraction interfaces as home automation power control systems such as TP-Link Kasa or Shelly Cloud switches (e.g per device/port switches and per device/port energy monitoring)

Pack3tL0ss commented 1 week ago

Home Assistant's integration with my PoE switch presents with the same abstraction interfaces as home automation power control systems such as TP-Link Kasa or Shelly Cloud switches (e.g per device/port switches and per device/port energy monitoring)

What is the integration? I'll be working on some updates in the near future. I'll take a look at this one when I update the power module.

conallob commented 1 week ago

My PoE switch is a Ubiquiti Unifi switch.

See https://www.home-assistant.io/integrations/unifi/ for more details