vroy/python-sengled-client

WiFi Lights not found

SlimeQ opened this issue · 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.

vroy commented

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.

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

vroy commented

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!

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'}
vroy commented

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

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