Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add philips.light.zystrip support #24

Open
jiagangxu opened this issue Sep 8, 2019 · 22 comments
Open

Add philips.light.zystrip support #24

jiagangxu opened this issue Sep 8, 2019 · 22 comments

Comments

@jiagangxu
Copy link

2019-09-08 18:37:04 ERROR (MainThread) [homeassistant.components.xiaomi_miio.light] Unsupported device found! Please create an issue at https://github.com/syssi/philipslight/issues and provide the following data: philips.light.zystrip
Could you guys help to support the strip light? It should be technically possible according to https://www.openhab.org/addons/bindings/miio. Appreciate your help!

@syssi syssi changed the title request support for philips.light.zystrip Support philips.light.zystrip Oct 27, 2019
@syssi
Copy link
Owner

syssi commented Oct 27, 2019

@terenceng81 Do you use the MiHome app with the philips.light.zystrip and do you have a rooted android device? I'm interested in the Mie Home app plugin of this device. Are you able to control the device if you use the bulb model at your configuration.yaml?

@terenceng81
Copy link

FYI, I am currently using "philips.light.bulb" for the Philips Cove light "philips.light.zystrip", it is working and having the "Google Home unable to add Unavailable issue" issue.

@terenceng81
Copy link

@terenceng81 Do you use the MiHome app with the philips.light.zystrip and do you have a rooted android device? I'm interested in the Mie Home app plugin of this device. Are you able to control the device if you use the bulb model at your configuration.yaml?

Yes, I am able to control "philips.light.zystrip" using bulb model.

Yes, I do have rooted Anroid simulator that i used to collect tokens from the database.

@terenceng81
Copy link

terenceng81 commented Oct 27, 2019

For unknown reason, all assigned lights (philips.light.bulb and philips.light.downlight) are gone in Google Home.. It seems "Model" is not the root caused.

All these devices are now in "Linked to you & Not in a Home & Room" in Google Home App, :-(

@syssi
Copy link
Owner

syssi commented Oct 27, 2019

It doesn't sound like an issue of this costum component. Do you have additional devices /components in Google Home which are stable?

@terenceng81
Copy link

It doesn't sound like an issue of this costum component. Do you have additional devices /components in Google Home which are stable?

I have Yeelight products (strip, ceiling light, bulb, table lamb), they are stable.

Aqara products (Curtain, Aircon Controller, Power Plug)

Zhimi products (Pedestal Fan)

Xiaomi products (Vaccum robot, Sensor, Air Humidifier, Air Purifier)

All the above are ok except for the Xiaomi-Philips Downlight and Cove Light

@syssi
Copy link
Owner

syssi commented Oct 27, 2019

If you unplug and replug the Air Purifier, do you have the same issue?

@terenceng81
Copy link

If you unplug and replug the Air Purifier, do you have the same issue?

U are right, the same issue happens. Air Purifier becomes a "new found" device after I refresh the main page of Google Home App..

It does not happen to the integrated "linked Services" like "Yeelight" or "Smart Things".

I've linked XiaoMi Service but only limited devices available and does not include XIaoMi-Philips downlight.

@syssi
Copy link
Owner

syssi commented Oct 27, 2019

The problematic devices are exposed by HA. The Yeelight and Smart Things devices are connected directly? May be this is a HA issue in general independent of the used HA component/integration?

@terenceng81
Copy link

The problematic devices are exposed by HA. The Yeelight and Smart Things devices are connected directly? May be this is a HA issue in general independent of the used HA component/integration?

You are right, I just tested other devices and experienced the same issue, so long they are exposed by HA will then encounter this issue.

The Yeelight and Smart Things devices are added to the Google Home App directly, Google called it "Linked Services", all these devices are not affected.

High chance this is a HA issue but I do not know how to escalate this case to official HA,

@syssi
Copy link
Owner

syssi commented Oct 27, 2019

Please open an issue at the official repository: https://github.com/home-assistant/home-assistant

@terenceng81
Copy link

Please open an issue at the official repository: https://github.com/home-assistant/home-assistant

Thanks syssi.

I have reported this case using the link given. Below is the case link.
home-assistant/core#28268

BTW for your information, this issue does not happen to HA Cloud, maybe this is the only difference between Paid and Free service.

:-(

@syssi
Copy link
Owner

syssi commented Oct 27, 2019

The zystrip supports following methods:

"add_mb", [item]
"apply_fixed_scene", [scene_num]
"delay_off", [0]
"delay_off", [second]
"enable_ac", [isOnStr]
"enable_bl", [isOnStr]
"enable_mb", [on ? 1 : 0]
"enable_mibs", [on ? 1 : 0]
"get_band_period", []
"get_mb_mac", []
"get_mb_rssi", []
"get_props", ['ac']
'get_props', ['dv']
"get_props", props
'get_props', props
"get_rc_mac", []
"get_switch_en", []
"miIO.bleGetNearbyBandList", []
"miIO.bleStartSearchBand", [1000]
"miIO.bleStartSearchBand", [10000]
"set_band_period", [this.state.preTime, this.state.nextTime]
"set_bricct", [bri, cct]
"set_bright", [bri]
"set_cct", [cct]
"set_mb_rssi", [value]
"set_power", [power]
"set_scene_switch", [this.state.items]
"set_switch_en", [on ? 1 : 0]
"del_rc", []
"start_rc_pair", []
"stop_rc_pair", []

And properties:

proprs = ["power", "bright", "cct", "snm", "dv", "sw", "bl", "ms", "ac"]

power = "on", "off"
bright = 0...100
cct = 1...35(?)
snm = 1, 2, 3, 4
dv = delayed turn of in seconds?
sw = wall switch
bl = 0(off), 1(on) (dlSwitchIsOn)
ms = 0(off), 1(on) (miband feature, sleep)
ac = 0(off), 1(on) (autoAmbiance)

@syssi
Copy link
Owner

syssi commented Oct 27, 2019

@terenceng81 Could you provide the output of these commands:


miiocli device --ip IP --token XXXXXXXXXXXXX info
miiocli device --ip IP --token XXXXXXXXXXXXX get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
miiocli device --ip IP --token XXXXXXXXXXXXX get_switch_en 
miiocli device --ip IP --token XXXXXXXXXXXXX get_rc_mac
 
miiocli device --ip IP --token XXXXXXXXXXXXX set_power "['off']"
miiocli device --ip IP --token XXXXXXXXXXXXX set_power "['on']"
miiocli device --ip IP --token XXXXXXXXXXXXX set_cct "[1]"
miiocli device --ip IP --token XXXXXXXXXXXXX set_cct "[35]"
miiocli device --ip IP --token XXXXXXXXXXXXX set_cct "[36]"
miiocli device --ip IP --token XXXXXXXXXXXXX set_cct "[100]"
miiocli device --ip IP --token XXXXXXXXXXXXX get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
miiocli device --ip IP --token XXXXXXXXXXXXX set_power "['off']"

miiocli device --ip IP --token XXXXXXXXXXXXX enable_ac "[1]"
miiocli device --ip IP --token XXXXXXXXXXXXX enable_ac "[0]"

miiocli device --ip IP --token XXXXXXXXXXXXX enable_bl "[1]"
miiocli device --ip IP --token XXXXXXXXXXXXX enable_bl "[0]"

In some cases it would be interesting, what's happening if you've called the command. Thanks in advance!

@syssi
Copy link
Owner

syssi commented Oct 27, 2019

Could you provide a link to a product page where I can see/buy the device we are talking about?

@rezmus
Copy link

rezmus commented Oct 27, 2019

i think it's this one

https://aliexpress.com/item/32951674146.html

@terenceng81
Copy link

i think it's this one

https://aliexpress.com/item/32951674146.html

I got it from
https://www.xiaomiyoupin.com/detail?gid=104093

I've compared the link given with my link, yes they are the same product.

@terenceng81
Copy link

@terenceng81 Could you provide the output of these commands:


miiocli device --ip IP --token XXXXXXXXXXXXX info
miiocli device --ip IP --token XXXXXXXXXXXXX get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
miiocli device --ip IP --token XXXXXXXXXXXXX get_switch_en 
miiocli device --ip IP --token XXXXXXXXXXXXX get_rc_mac
 
miiocli device --ip IP --token XXXXXXXXXXXXX set_power "['off']"
miiocli device --ip IP --token XXXXXXXXXXXXX set_power "['on']"
miiocli device --ip IP --token XXXXXXXXXXXXX set_cct "[1]"
miiocli device --ip IP --token XXXXXXXXXXXXX set_cct "[35]"
miiocli device --ip IP --token XXXXXXXXXXXXX set_cct "[36]"
miiocli device --ip IP --token XXXXXXXXXXXXX set_cct "[100]"
miiocli device --ip IP --token XXXXXXXXXXXXX get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
miiocli device --ip IP --token XXXXXXXXXXXXX set_power "['off']"

miiocli device --ip IP --token XXXXXXXXXXXXX enable_ac "[1]"
miiocli device --ip IP --token XXXXXXXXXXXXX enable_ac "[0]"

miiocli device --ip IP --token XXXXXXXXXXXXX enable_bl "[1]"
miiocli device --ip IP --token XXXXXXXXXXXXX enable_bl "[0]"

In some cases it would be interesting, what's happening if you've called the command. Thanks in advance!

Hi syssi,

May I know how do i run this command?

ssh to my HA and entered the command below but does not work..
miiocli device --ip 192.168.8.152 --token 3bd3c23837071ab35xxxxxxxx info

core-ssh:~# miiocli device --ip 192.168.8.152 --token 3bd3c23837xxxx info
-bash: miiocli: command not found

@syssi
Copy link
Owner

syssi commented Oct 28, 2019

If you have another linux host just install python-miio by:

pip3 install python-miio

@terenceng81
Copy link

terenceng81 commented Oct 28, 2019

If you have another linux host just install python-miio by:

pip3 install python-miio

Only the first command is working, the rest having "Unknown command" errors.

Last login: Mon Oct 28 13:27:07 on ttys002
Terences-Macbook-Air:~ terenceng$
Terences-Macbook-Air:~ terenceng$ miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e info
Hardware version: ESP8266
Firmware version: 1.2.8
Network: {'localIp': '192.168.8.113', 'mask': '255.255.255.0', 'gw': '192.168.8.1'}
AP: {'rssi': -82, 'ssid': '13-19 HOME WIFI', 'bssid': 'C6:FB:E4:44:00:C4'}

Error: Unknown command (get_switch_en)
Error: Unknown command (get_rc_mac)
Error: Unknown command (set_power)
Error: Unknown command (set_cct)
Error: Unknown command (get_prop)
Error: Unknown command (set_power)
Error: Unknown command (enable_ac)
Error: Unknown command (enable_bl)

@syssi
Copy link
Owner

syssi commented Oct 28, 2019

I've fixed the command list. There was a parameter missing:

miiocli device --ip IP --token XXXXXXXXXXXXX info
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command get_switch_en 
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command get_rc_mac
 
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_power "['off']"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_power "['on']"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_cct "[1]"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_cct "[35]"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_cct "[36]"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_cct "[100]"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command set_power "['off']"

miiocli device --ip IP --token XXXXXXXXXXXXX raw_command enable_ac "[1]"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command enable_ac "[0]"

miiocli device --ip IP --token XXXXXXXXXXXXX raw_command enable_bl "[1]"
miiocli device --ip IP --token XXXXXXXXXXXXX raw_command enable_bl "[0]"

@terenceng81
Copy link

Everything is okay except for the Enable_AC_On and Enable_AC_Off

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e info
Model: philips.light.zystrip
Hardware version: ESP8266
Firmware version: 1.2.8
Network: {'localIp': '192.168.8.113', 'mask': '255.255.255.0', 'gw': '192.168.8.1'}
AP: {'rssi': -80, 'ssid': '13-19 HOME WIFI', 'bssid': 'C6:FB:E4:44:00:C4'}

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
Running command raw_command
['off', 14, 100, 0, 0, [[0, 3], [0, 2], [0, 1]], 1, 1]

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command get_switch_en
Running command raw_command
[1]

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command get_rc_mac
Running command raw_command
['']

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command set_power "['off']"
Running command raw_command
['ok']

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command set_power "['on']"
Running command raw_command
['ok']

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command set_cct "[1]"
Running command raw_command
['ok']

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command set_cct "[35]"
Running command raw_command
['ok']

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command set_cct "[36]"
Running command raw_command
['ok']

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command set_cct "[100]"
Running command raw_command
['ok']

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command get_prop "['power', 'bright', 'cct', 'snm', 'dv', 'sw', 'bl', 'ms', 'ac']"
Running command raw_command
['on', 14, 100, 0, 0, [[0, 3], [0, 2], [0, 1]], 1, 1]

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command set_power "['off']"
Running command raw_command
['ok']

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command enable_ac "[1]"
Running command raw_command
ERROR:miio.device:Got error when receiving: timed out
Error: No response from the device

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command enable_ac "[0]"
Running command raw_command
ERROR:miio.device:Got error when receiving: timed out
Error: No response from the device

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command enable_bl "[1]"
Running command raw_command
['ok']

miiocli device --ip 192.168.8.113 --token 527daede17f1afe5de70a5cd40f7317e raw_command enable_bl "[0]"
Running command raw_command
['ok']

@syssi syssi changed the title Support philips.light.zystrip Add philips.light.zystrip support Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants