python-sengled-client icon indicating copy to clipboard operation
python-sengled-client copied to clipboard

WiFi Lights not found

Open SlimeQ opened this issue 5 years ago • 6 comments

login returns this:

{'ret': 0, 'msg': 'success', 'jsessionid': 'f30831c4-62df-496c-ba4f-77fe18ebc0d2', 'appServerAddr': 'https://us-elements.cloud.sengled.com:9000/zigbee/', 'ucenterAddr': 'https://us-ucenter.cloud.sengled.com:443/user/', 'gret': 0, 'serverVersionMin': '3', 'serverVersionNow': '3', 'nick_name': '<my email>, 'user_id': <my user id>}

but get_device_details() returns an empty deviceInfos

I only have wifi lights on my account, wondering if that has something to do with it.

SlimeQ avatar Jul 16 '20 05:07 SlimeQ

I think you might be right. I unfortunately only have classic bulbs that work with the sengled hub and I'm not able to test wifi lights.

vroy avatar Jul 16 '20 11:07 vroy

I just used mitmproxy to intercept network traffic from the android app and it appears as though wifi lights go through the "life2" server instead of elements. This url lists them: https://life2.cloud.sengled.com/life2/device/list.json

I'm not sure if the json format returned is the same as zigbee lights (because I don't have any). When I actually perform an action it seems to connect via https://us-mqtt.cloud.sengled.com/mqtt and then open a socket connection. Might be a dead end as far as reverse engineering the thing

SlimeQ avatar Jul 16 '20 22:07 SlimeQ

This line has a copy of the details of a classic light if you want to compare: https://github.com/vroy/python-sengled-client/blob/master/sengled/sengled.py#L56

Yeah, I'm definitely not sure how to go about going through mqtt for actions. If you find anything more on that, I'll be open to contributions. Good luck!

vroy avatar Jul 17 '20 00:07 vroy

I just used mitmproxy to intercept network traffic from the android app and it appears as though wifi lights go through the "life2" server instead of elements. This url lists them: https://life2.cloud.sengled.com/life2/device/list.json

I'm not sure if the json format returned is the same as zigbee lights (because I don't have any). When I actually perform an action it seems to connect via https://us-mqtt.cloud.sengled.com/mqtt and then open a socket connection. Might be a dead end as far as reverse engineering the thing

Have you made any progress on this? I'm just getting started trying to work on this so any help is appreciated. When I look into the life2 device list, this is the response I get

{'ret': '100', 'msg': 'not logged in'}

smitp415 avatar Nov 10 '20 00:11 smitp415

I have not personally made any progress on this, sorry.

vroy avatar Nov 10 '20 12:11 vroy

Came across this while trying to write a script to work with Huginn. It's not much to add, but at the very least, trying to log into life2 with the same headers is a no-go. Can't even identify if the headers are correct myself as my Android version is too high for self-signed certificates to be used to intercept traffic...

Oricul avatar Feb 27 '21 23:02 Oricul