uvjim/linksys_velop

Device Tracker Entity - Connected Node Room vs Mesh (Primary Node Room)

Closed this issue · 3 comments

@uvjim =Any way to associate the device tracker device to show the room of the Node - VS the Room of the Mesh? (Enhancement request)

See Image - I have selected to track the Garage Camera but its connected to the Garage Node in the Garage Room. But currently shows in the Mesh Room of the Front Room (Primary Node)

Reason - I have a camera that sometimes connects to the Primary Node VS the Stronger better signal in the Garage Node. When this happens I have a smart plug that I have to Turn Off and Back on for the Camera - so that it reconnects to the Better Node Aka Garage Node. Which I want to make an automation to run whenever it does that.

image

uvjim commented

Hi,

I'm not sure I understand what you're asking for really.
I'll try and explain how things hang together to see if that gets us both on the same page...

The integration creates the following: -

  • a service which represents the mesh (essentially your network - which doesn't reside anywhere as it's a virtual thing that just exists)
  • devices which represent your nodes (these are physical things)
  • both the service and the devices have entities associated with them which represent properties, configuration or actions that you can take on them.
  • device trackers are optionally created and these allow you to establish when those devices are on the network or not. The timings for this are configured in the options for the integration. All device_tracker entities are part of the Mesh service, this does not change when the device moves around nodes in your mesh.

In your image, you have a node which is called "Garage" which is a device. You have added that device to a Home Assistant area which is also called "Garage".

The "Connected Device" list is a sensor entity for the node device. The sensor has an attribute which lists the devices that are connected at the last poll time. The API for the Velop provides the information which determines which node they are connected to; the integration just reports on it.

In theory your camera is probably moving nodes because either it or the mesh have decided that it gets a better signal from the one it is moving to - that's controlled by "Client Steering".

Your scenario can be achieved mind you but you wouldn't use a device_tracker for it. You'd have to use a Home Assistant automation that triggers based on the "Connected Devices" sensor changing for any node. You'd then have to iterate through the devices attribute to establish which node the device was connected to and determine if you needed to take an action (in your case turn the smart switch off and then on again).

Hopefully that makes sense.

I currently have it off, but maybe i should turn it on and avoid doing any home assistant automation for this. Thanks for the Info and I will look into Connected Devices Sensor changing from a node.

uvjim commented

In fact it should be slightly easier than triggering on all node connected devices sensors. You could just trigger on the sensor that the camera should be on. If the state of that changes, check the devices attribute to see if the camera is there. If it isn't, carry out the actions. It's made easier because you don't care where it went to.