tomaae / homeassistant-mikrotik_router

Mikrotik router integration for Home Assistant
Apache License 2.0
302 stars 52 forks source link

[Feature] Interface POE entities #372

Closed ljmellor closed 1 month ago

ljmellor commented 1 month ago

Is your feature request related to a problem? Please describe.

I've got an issue with a POE camera that occasionally requires rebooting, I do this via POE in my mikrotik switch. Unfortunately it is still possible to ping the camera from the switch so I can't simply use the POE ping timeout feature.

Describe the solution you'd like

I'd love to be able to automate this through Home Assistant but there is no entity created for the POE status of the switch (it runs routeros, not switchos). An entity for POE status with options to turn it off or on (voltage isn't a concern of mine but may be for others) would do the job perfectly in my case.

Describe alternatives you've considered

I've tried using the ping timeout in the switch it's self which is a CRS328 POE model.

Additional context

The command that I'd put into the terminal for this would be...

/interface/ethernet/poe/power-cycle ether19

I'm using the latest RouterOS v7 at all times

tomaae commented 1 month ago

poe is tied to port switch. just switch it off and on to reboot. make sure to five it few seconds in between for router to process the command

ljmellor commented 1 month ago

You're not wrong, I've just tried it and it seems to work flawlessly. It also pointed out to me that I was wrong about voltage as upon POE reset it seemed to keep trying 24v for a 48v device, I realise that this is irrelevant but figured it may well help anyone reading this in the future who is having similar issues. Thanks for pointing out this previously unknown (to me) feature.