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.rwread support #32

Open
johnskiller opened this issue Dec 4, 2019 · 18 comments
Open

Add philips.light.rwread support #32

johnskiller opened this issue Dec 4, 2019 · 18 comments

Comments

@johnskiller
Copy link

it's a new model of desk eye care lamp.

I just change the philips.light.mono1 to philips.light.rwread, it seems works well

@johnskiller
Copy link
Author

oops, scene always shows "0" and cannot be changed

@syssi
Copy link
Owner

syssi commented Dec 4, 2019

# Supported properties

['power', 'bright', 'dv', 'snm', 'flm', 'chl', 'flmv']

# Supported methods:

set_bright [int]
set_power ['on']
set_power ['off']
apply_fixed_scene [scene_num] # 1,2,3,4
set_bright [bright] # 0...100
delay_off [date]

# enable/disable follow me level
enable_flm [0]
enable_flm [1]
set_flmvalue [level]

# enable/disable child lock
enable_chl [0]
enable_chl [1]

@syssi
Copy link
Owner

syssi commented Dec 4, 2019

Could you provide the output of:

pip3 install python-miio
miiocli device --ip IP --token TOKEN raw_command get_prop "['power', 'bright', 'dv', 'snm', 'flm', 'chl', 'flmv']"

Thanks!

@johnskiller
Copy link
Author

here's the output:

Running command raw_command
['off', 53, 0, 1, 0, 0, 2]

@johnskiller
Copy link
Author

# Supported properties

['power', 'bright', 'dv', 'snm', 'flm', 'chl', 'flmv']

# Supported methods:

set_bright [int]
set_power ['on']
set_power ['off']
apply_fixed_scene [scene_num] # 1,2,3,4
set_bright [bright] # 0...100
delay_off [date]

# enable/disable follow me level
enable_flm [0]
enable_flm [1]
set_flmvalue [level]

# enable/disable child lock
enable_chl [0]
enable_chl [1]

do I need to add this to the light.py?

@syssi
Copy link
Owner

syssi commented Dec 5, 2019

No. This is just the command set to implement the full featured device.

@syssi
Copy link
Owner

syssi commented Dec 5, 2019

Could you explain the follow me / follow me value feature?

@johnskiller
Copy link
Author

johnskiller commented Dec 5, 2019

It has a motion/shock sensor and will turn on automatically when it detected motion/human activity. I'm not sure if it's follow me. I don't have english manual. The flow me value might be the sensitivity of the shock sensor.

@syssi
Copy link
Owner

syssi commented Dec 5, 2019

So we could call the feature "motion detection" and "sensitivity of the motion detection". Could you provide a URL to a product detail page?

@syssi syssi changed the title philips.light.rwread Add philips.light.rwread support Dec 5, 2019
@johnskiller
Copy link
Author

I'll try to find an english product page. In MIJIA app, this function marked as experimental(实验室功能),named“延迟感应开灯”,can be turned on/off, and the value marked "延迟感应开灯灵敏度“

@syssi
Copy link
Owner

syssi commented Dec 5, 2019

@syssi
Copy link
Owner

syssi commented Dec 5, 2019

Could you provide the different sensitivity levels? 1 (Low), 2 (Medium) and 3 (High) is supported, right?

@syssi
Copy link
Owner

syssi commented Dec 5, 2019

What happens if you try to set 0 or 4?


miiocli device --ip IP --token TOKEN raw_command enable_flm "[1]"
miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[0]"
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"

miiocli device --ip IP --token TOKEN raw_command enable_flm "[1]"
miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[1]"
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"

miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[2]"
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"

miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[3]"
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"

miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[4]"
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"

@johnskiller
Copy link
Author

from the MIJIA app, the sensitivity level only have two value, high and low. I will try set other values using miiocli tonight.

@johnskiller
Copy link
Author

@syssi I could not find any engligh product page. It's a MIJIA & Philips dual brand desk lamp maybe only for chinese market. Here's the chinese product page: https://item.mi.com/product/10332.html?cfrom=search&selected=1192900028&pClass=c the offical name is "米家飞利浦读写台灯", so english name maybe mijia philips read write desk lamp?

@johnskiller
Copy link
Author

miiocli device --ip IP --token TOKEN raw_command enable_flm "[1]"
['ok']
miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[0]"
Error: {'code': -5001, 'message': 'param error'}
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"
[1, 2]

miiocli device --ip IP --token TOKEN raw_command enable_flm "[1]"
['ok']
miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[1]"
['ok']
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"
[1, 1]
miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[2]"
['ok']
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"
[1, 2]

miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[3]"
['ok']
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"
[1, 3]
miiocli device --ip IP --token TOKEN raw_command set_flmvalue "[4]"
Error: {'code': -5001, 'message': 'param error'}
miiocli device --ip IP --token TOKEN raw_command get_prop "['flm', 'flmv']"
[1, 3]

It seems that cannot set value out of range
@syssi

@syssi
Copy link
Owner

syssi commented Dec 7, 2019

Thanks!

@clementx2006
Copy link

wondering when this one can be added? thank you!

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

3 participants