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.
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.
@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.
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?