I wrote a python client lib for my eero router and would like to integrate it with home assistant. The API provides a ton of information about the network, including connected devices, which eero they are connected to, current transfer rates and wifi-connection quality. Anybody here who could help me on what information can be pushed how into home assistant?
Hey @343max I used your library and have a device_tracker working! I donāt know if you are still interested.
Itād be great if you could add your lib to the package manager so we can import directly. Right now my POC is just copy pasta a bunch of your code in.
Let me know. Right now Iāll try to clean this up and get it in with just devices, but Iād clean it up if you get it on the package manager.
Thanks for putting it together.
-Joe
This is amazing!
What package manager do you mean? pip?
Found this via Google. I was just about to use your python client and create the home-assistant plugin.
Very interested in using the network information to synthesize physical presence around the house.
I am happy to help however I can.
edit:
@343max I have a lot of python experience including packaging, unit testing etc. I would be happy to get the module folder ready for pypi. I would just hate to duplicate effort if anyone has started (@iamJoeTaylor did you start on it?)
@iamJoeTaylor I would love to see your component up on the repo too
I have not started getting the package ready. That would be awesome if it gets done.
Once the package is ready I can turn my Proof Of Concept to legit code in about a night. Iād rather wait on committing the code I have. The code I have manually hacks up the code in the lib so it can be used in a single file with only the one API method available. I did this because the lib was not available without the package manager.
Itās working great and would be awesome to get to the community.
-Joe
This would be awesome. I love my eero, and am hoping to use the data for device tracking in HA.
Any updates on this? This would make my life so much easier.
Much like @iamJoeTaylor, I took 10 minutes to just condense down @343maxās library to a single file since itās not in pip. I have it spitting out the relevant devices to the console, but havenāt started adapting it over to HAās framework. Hereās the very quick and hacky start: https://gist.github.com/jrlucier/90d0db3c46d81e42c0854603dd07d316
Iām a Java/Scala guy, so python is newer to me. That said Iām sure I can make it work. I think thereās definitely going to be some questions on how to go about having them establish a session initially (since it uses an SMS message). Also error handling will be crucial for this.
I only get spare minutes of time to work on personal projects like this, so if others want to jump in on it thatād be great. Iād love to see @iamJoeTaylorās proof of concept to see how heās interacting with the device_tracker.
Side note: Eero devās seem to be hinting at āsomething in the worksā for systems like HA. Perhaps a publicly accessible API, but who knows.
Just picked up a Pro eero given the number of WiFi devices on my network has exploded after taking the HA drug lol
Iām not a dev but can certainly test if you are at a point to build a custom component?
Thanks for the effort so far - super glad I found this thread!
Hey buddy, any progress on this? Be awesome to try it out. Switching to eero (apart from rebuilding static IP assignments) was super easy, and as they said - itās solved nearly all my network issues, except one - being able to tell when a device is home or not home.
Any suggestions in the meantime - Bluetooth is kinda working, but not as solid as the DD-WRT I had before. Anyone had any luck with a DD-WRT enabled device on the network just for reporting?
I had a couple hours of downtime today and I have the component functioning correctly [huzzah!]. I need to do clean up, documentation, and a way to acquire the session key via another python file. Then itāll be ready for everyone to test. Iām not a Python dev, but rather a Java/Scala guy ā so Iām sure someone can go back through my code and refactor it heavily to conform to better standards, error handling, etc. Iām just going to provide something that should work, without any real warranties
343maxās work was crucial for this, so most thanks should go to him! Hopefully Iāll have this all ready sometime tomorrow.
This sounds amazing. Thanks for picking up, canāt wait to try it out.
First cut, have at it guysā¦ this only adds device_tracking. Next step would be a display component for other information.
Thank you for building this! amazing news!
Running into an issue (line 138)
āraw_inputā is not defined
EDIT: seems raw_input() was replaced with input()
Amending the 2 references fixed it (raised a change on your git)
Also - I had an issue finding the custom_component (but putting it in the main components structure worked, but not custom_components)
not sure if:
from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA, CONF_SCAN_INTERVAL, DeviceScanner)
based on another persons similar issue should be:
from custom_components.device_tracker import .....
that said, iām not able to see any macs in eero.session. is there any other logging to show its successfully connected? Iāve verified the number via SMS, and there is a string of numbers and then what looks like a client secret.
EDIT - could be confusing things (but the above seems to find the component, but I get a different error importing DOMAIN when using custom_componentsā¦
Gone back to putting the file in both locations and it works.
Thanks for finding that! Iāll get it committed later today
Edit: Opened it as an issue just so I donāt forget and can track them: https://github.com/jrlucier/eero_tracker/issues
Hmm, i wonder if anyone else has the same custom_component problem? Iāll look into that later today as well. Great feedback, thanks!
I asked on the Dev discord channel, but havenāt had a reply - apologies iām not able to give a definitive answer (wish iād learnt to actually code lol)
Good news is though itās still working!!
(iāll Have a look around for why the DOMAIN canāt be imported from custom_components.
Are you planning to submit for full integration?
This looks exciting. Anyone know how to use python to run the instatiate.py file on hassio?