google / python-lakeside

Apache License 2.0
45 stars 18 forks source link

Support for Eufy T1016 Light Bulb #17

Open eukatree opened 5 years ago

eukatree commented 5 years ago

Would it be possible to add support for the T1016 Lumos Smart Bulb 2.0 - Tunable White so that it can be used in Home Assistant along with this and the HA Eufy Component?

bdf0506 commented 5 years ago

Also interested in this. I opened the below, and seeing this issue on github leads me to believe its an issue with the underlying python code, not a HA issue. https://community.home-assistant.io/t/eufy-t1016-configuration/115134

mjg59 commented 5 years ago

Possible to add support, but I don't have one of the bulbs so can't easily do it myself.

bdf0506 commented 5 years ago

If you are willing to try and modify the code to add support, I’ll buy you a bulb.

Create a wishlist and add the following item to it, and I’ll front the cost for you as a token of appreciation.

https://www.amazon.com/dp/B07MFK2G3N

mjg59 commented 5 years ago

Before that, can you try just changing the code so everywhere it checks for T1011 or T1012, it also checks for T1016?

bdf0506 commented 5 years ago

No luck here. I'm not sure exactly how this module should be working in the first place, and really I am not very strong in python.

When i manually configure this and then attempt to set it up, I am doing the following:

>>> import lakeside
>>> devices = lakeside.get_devices('xxxxx@xxxxxx','yyyyyyyyyyyy')
>>> print(devices)
[{'id': u'5zzzzzzzzzzz7', 'code': u'', 'type': u'T1016', 'name': u'Living Room Lamp', 'address': u'xx.xx.xx.xx'}]

The interesting this is that the "address" that is registered is my public IP, and not the local IP of the Eufy lightbulb.

Then I do the following:

>>> test1 = lakeside.bulb('xx.xx.xx.xx','5zzzzzzzzzzzzzz7','T1013') 
>>> test1.connect()

After doing connect(), it simply hangs. I did try to enter the actual IP of the Eufy device, and when I did that, it complained about connection refused. But entering the public IP hangs, so not sure what it is doing. Notice I entered T1013 instead of T1016 as a test. Everything that I have done so far is the ORIGINAL code that is on GitHub, haven't done any modifications yet.

StuartPearlman commented 4 years ago

@bdf0506

I own a T1011 and T1015. The T1015 exhibits the same behavior of mapping to my public IP address.

The newer bulbs make all requests through the internet, whereas the older bulbs have intranet support. As I have both models, I unplugged the WAN cord in my router and was still able to control the T1011 with a phone connected to my home network, whereas the T1015 was shown to be "offline".

That means controlling the newer hardware through sockets might be out of the question.

bdf0506 commented 4 years ago

So this may be the case, as lots of other smart devices are going the same direction. If so, can this python code be updated to support both use cases? Would still like ability to control it for home automation, even if it has to reach out to the Eufy cloud service to make that happen.

bdf0506 commented 4 years ago

Anyone make any progress here? @mjg59 offer still stands, I’ll buy you a bulb if you are able to assist with the code.

hursh-desai commented 3 years ago

Just discovered this project. Seems really cool but I was also wondering if it would be possible to add support for T1016 Light Bulbs, or how I would go about it if I had to try myself.

hursh-desai commented 3 years ago

After researching this topic a bit more I've come to the conclusion that adding support for this bulb might be impossible. First Source Second Source There are also many other people on the internet that are complaining about Eufy not opening up their API to help allow people to programmatically control their Eufy lightbulbs. This is just further evidence that Eufy wants to close down access to their IOT devices.

I ran into two specific problems trying to connect to my T1016 lightbulb: the first is that when I hit the API for my devices' information it will not give a local code for my lightbulb and second this statement 'self.s.connect((self.address, 55556))' does not seem to work for my lightbulb. I don't know if they changed the open port for this product or if as the second source says it is actually a new proprietary protocol.

Either way I found it impossible to connect to my lightbulb even at the socket level so I'm pretty sure its impossible to add support for the Eufy T1016 lightbulbs.