philipslight icon indicating copy to clipboard operation
philipslight copied to clipboard

Add philips.light.rwread support

Open johnskiller opened this issue 4 years ago • 18 comments

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 avatar Dec 04 '19 15:12 johnskiller

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

johnskiller avatar Dec 04 '19 16:12 johnskiller

# 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 avatar Dec 04 '19 16:12 syssi

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!

syssi avatar Dec 04 '19 20:12 syssi

here's the output:

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

johnskiller avatar Dec 05 '19 00:12 johnskiller

# 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?

johnskiller avatar Dec 05 '19 01:12 johnskiller

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

syssi avatar Dec 05 '19 05:12 syssi

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

syssi avatar Dec 05 '19 06:12 syssi

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.

johnskiller avatar Dec 05 '19 08:12 johnskiller

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 avatar Dec 05 '19 08:12 syssi

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 "延迟感应开灯灵敏度“

johnskiller avatar Dec 05 '19 08:12 johnskiller

https://github.com/rytilahti/python-miio/pull/589

syssi avatar Dec 05 '19 08:12 syssi

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

syssi avatar Dec 05 '19 09:12 syssi

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']"

syssi avatar Dec 05 '19 09:12 syssi

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

johnskiller avatar Dec 06 '19 03:12 johnskiller

@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 avatar Dec 06 '19 03:12 johnskiller

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

johnskiller avatar Dec 06 '19 12:12 johnskiller

Thanks!

syssi avatar Dec 07 '19 10:12 syssi

wondering when this one can be added? thank you!

clementx2006 avatar Oct 02 '22 18:10 clementx2006