Open AsWaM opened 5 years ago
Please update the custom component to the development version (branch: develop)! The device is already supported.
Hello, thanks for your help. I am noob to python and virtual envs, (i am .NET dev), so I don't know how to install the dev branch.
Went in my virtual env, ran this
pip3 install https://github.com/syssi/philipslight/archive/develop.zip
the result was
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting https://github.com/syssi/philipslight/archive/develop.zip Downloading https://github.com/syssi/philipslight/archive/develop.zip \ 102kB 1.0MB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.5/tokenize.py", line 454, in open buffer = _builtin_open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-wuct2s7c/setup.py' Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-wuct2s7c/
So I tried with
(homeassistant) root@DietPi:/srv/homeassistant# python3 -m pip install https://github.com/syssi/philipslight/archive/develop.zip
Same result. What am I doing wrong?
I am sure this is a stupid question but I can't find the answer myself :(
I tried to find something to replace it in the libs, but looks like i miss some preprocessing or whatsoever (the files are splitted by type, unlike in the repository)
(homeassistant) root@DietPi:/srv/homeassistant/lib/python3.5/site-packages/miio# dir airconditioningcompanion.py device.py __pycache__ airfresh.py discovery.py tests airhumidifier.py exceptions.py updater.py airpurifier.py extract_tokens.py utils.py airqualitymonitor.py fan.py vacuum_cli.py ceil_cli.py __init__.py vacuumcontainers.py ceil.py philips_bulb.py vacuum_mapparser.py chuangmi_ir.py philips_eyecare_cli.py vacuum.py chuangmi_plug.py philips_eyecare.py version.py click_common.py philips_moonlight.py waterpurifier.py cli.py plug_cli.py wifirepeater.py cooker.py powerstrip.py wifispeaker.py data protocol.py yeelight.py
Please download & extract this file: https://github.com/syssi/philipslight/archive/develop.zip
Place the "custom_components" folder (incl. content) into your config directory. On hassbian the directory structure looks like this:
/home/homeassistant/.homeassistant/custom_components/light/xiaomi_miio.py
On hass.io it should be something like this:
/config/custom_components/light/xiaomi_miio.py
Restart Home Assistant and try to control the moonlight.
Hello, and merry christmas! Works perfectly, thank you very much :)
Il will try to use the sleep assistant and sleep off time features when I go back from holidays.
Thanks Again
I would be happy if you provide some details (example values, mihome settings -> moonlight behavior) about the sleep assistant & sleep off time features. Thanks in advance!
Of course, will do this either next weekend or the first week of january
I hope the naming of the properties (brand_sleep, brand f.e.) can also be improved some day if the meaning is known.
Hello, sorry for the delay, The component works perfectly!!! I try to figure out the meaning of the properties (brand_sleep, brand), it looks like it is an indicator of supported features (you can do anything, it never changes)
Alex
@AsWaM Do you own a Miband?
Yes, a miband 3
The property should be miband related. If you enable the "miband dependend turn off" the brand_sleep property should be true
. If you don't use the feature it's false
.
I will try this, and keep you informed
@syssi you were right, this is MiBand Related brand_sleep --> Auto power off with MiBand when asleep brand --> Auto power on/off when miband is close sleep_off_time --> remaining time before countdown ends (minutes) --> set to 0 if sleep mode deactivated total_assistant_sleep_time --> original countdown time (minutes)
Hello, I've found some issues related to the scenes. HA allows 1,2,3 and 4 only. But when I chose midnight theme from MI home, it shows as "6" in HA When I chose music mode, in HA i have the error below:
Got exception while fetching the state: {'code': -5001, 'message': 'music mode'}
@frkos How did you choose the "music mode"?
@frkos If you change this line in HA
Is scene 5 and 6 available/usable via the set_scene
service?
@frkos How did you choose the "music mode"?
Music mode is the colored button at the bottom of mi home.
@frkos If you change this line in HA
Is scene 5 and 6 available/usable via the
set_scene
service?
I have hass.io installation with doker. So I've set up ssh, connected to hassio.local, but couldn't find components folder to amend the file ((( If you let me know how to do this, I will be glad to help you with testing
Provide some testing on docker setups is hard. Could you install python-miio
(pip3 install python-miio
) on your desktop and provide some output of the miiocli
command line interface?
Provide some testing on docker setups is hard. Could you install
python-miio
(pip3 install python-miio
) on your desktop and provide some output of themiiocli
command line interface?
Here it is... Sorry for the screenshot, I'm doing it from my cell phone 😬 Is it what you need?
Perfect! Please try:
miiocli device --ip 192.168.1.101 --token f.... raw_command apply_fixed_scene "['4']"
miiocli device --ip 192.168.1.101 --token f.... raw_command apply_fixed_scene "['5']"
miiocli device --ip 192.168.1.101 --token f.... raw_command apply_fixed_scene "['6']"
Does it work?
Unfotunately, for apply_ I have param err, so i tried other options, but with timeout error(( Is it possible to increase it? BTW info, on,off... works, but not the raw_command
It looks like you missed a space between property (set_fixed_scene
) and the new value ("['1']"
). You could enable the deboug output of miiocli by -d
to get more insights / details.
Done... But with rhe same UART timeout error(
But set_scene without raw_command works. Of course, just for 1-4 options
Next try:
miiocli device --ip 192.168.1.101 --token f.... raw_command apply_fixed_scene "[4]"
miiocli device --ip 192.168.1.101 --token f.... raw_command get_prop "['scene']"
miiocli device --ip 192.168.1.101 --token f.... raw_command apply_fixed_scene "[5]"
miiocli device --ip 192.168.1.101 --token f.... raw_command get_prop "['scene']"
miiocli device --ip 192.168.1.101 --token f.... raw_command apply_fixed_scene "[6]"
miiocli device --ip 192.168.1.101 --token f.... raw_command get_prop "['scene']"
Note the removed single quotes for the numbers. The value must be an integer and no string.
Now it works for all scenes except 6. Also get_prop 'scene' doesn't work. But it works for get_prop 'status'... I think 'scene' is not available property name (
Also i confirm, that scene 5 is 'scrreen reading' from mi home app. And when I chose 'midnight' in mi home, I see 6 in HA. But can't set it via miiocli... Weird
Okay. Could you try to enable the night light by:
# make sure "scene 6" isn't active
miiocli device --ip 192.168.1.101 --token f.... raw_command apply_fixed_scene "[1]"
# get the scene property called "snm"
miiocli device --ip 192.168.1.101 --token f.... raw_command get_prop "['snm']"
# enable the night light mode?
miiocli device --ip 192.168.1.101 --token f.... raw_command enable_bl "[True]"
# the value of snm should be 6 now
miiocli device --ip 192.168.1.101 --token f.... raw_command get_prop "['snm']"
# turn off the night light mode?
miiocli device --ip 192.168.1.101 --token f.... raw_command enable_bl "[False]"
# check the scene again
miiocli device --ip 192.168.1.101 --token f.... raw_command get_prop "['snm']"
Looks like it's not for scene 6... Also i tried "['on']" and "[1]" but with the same result
Could you try
miiocli device --ip 192.168.1.101 --token f.... raw_command go_night "[]"
too?
And now it works! As I'm doing it remotely, I can check the lamp itself in the evening only. But HA shows scene 6 and Mi Home shows midnight scene. So it definitely works.
I tried go_music randomly and it works too - MI home opens music mode screen. So as I understand, the only promblem is that HA expects scene as int, and crashes when receive str 'music mode'. Maybe in the code it's pissible to map music mode to scene 7, for example... And we are done )
Do you already know how to disable the night mode again? What happens if you select another scene or if you change the brightness.
Enable music mode: go_music "[]" Disable music mode: exit_music "[]" Music mode property: get_prop "['ms']"
If the music mode is enabled we are unable to retrieve/update the properties? The get_prop
call returns "music mode" always?
As for night mode, there are no issues. If I set another scene via set_scene I see the scene changed to the new one. If I change brightness, scene becomes 0, which is expected. I tried this both from miiocli and HA application. Works well
But with music mode we have problems, as HA can't handle 'text' in scene, and drops an error for any command. So the only option is to disable it in Mi Home directly
This is fine. The "music mode" isn't handled right now. The Mi Home app skips all get_prop
calls/results if the music mode is active.
Got it. Let me know if I can provide something more. And thanks!
Hi all,
I'm also using moonlight lamp and using mii it works like a charm. But how can I use in HA?
I've tried with light.xiaomi_miio_set_scene "6" on dev console but the results is scene 4.
Thank you in advance
@frkos Could you tell me the meaning/name of "scene 5"?
@jokerigno The night mode (scene 6) will be supported soon.
Hi @syssi Scene 5 is 'Screen Reading'. It's just a bit warm static light
@frkos Please update the custom component. The component handles/ignores the music mode now.
Wow... you added color picker)) and it works! Set scene works for sscenes 1-4. If I try to set 5 or 6 it sets 4
When I set music mode in Mi Home I still see errors in logs. Also I can't set another scene from HA But now I can turn it off and then on in HA.
Update for light.lamp fails
Traceback (most recent call last):
File "/config/custom_components/light/xiaomi_miio.py", line 885, in async_update state = await self.hass.async_add_executor_job(self._light.status)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/miio/philips_moonlight.py", line 151, in status properties
File "/usr/local/lib/python3.6/site-packages/miio/device.py", line 272, in send raise DeviceError(m.data.value["error"])
miio.exceptions.DeviceError: {'code': -5001, 'message': 'music mode'}
This is strange. I tried to catch this exception. I will check it again.
@syssi Thanks for your work on this, also happy to assist with any testing for this enhancement.
The music mode should be handled properly now. :-)
Hi, it's still me. I noticed that when a scene is used (in my case midnight scene - scene = 6) the light in HA reports the last status (so a different light level and color) There's a way to fix it? TY again :)
@jokerigno Could you enable the debug log (https://github.com/syssi/philipslight#debugging), turn the light on (no scene) and select scene 6, wait a few status updated and provide the complete log? Which "fake values" do you propose for brightness and color if scene=6 is selected?
@jokerigno Off-topic: Could you provide the model no. of your device to improve this list of supported devices: https://github.com/syssi/philipslight#supported-devices
@jokerigno Could you enable the debug log (https://github.com/syssi/philipslight#debugging), turn the light on (no scene) and select scene 6, wait a few status updated and provide the complete log? Which "fake values" do you propose for brightness and color if scene=6 is selected?
Hi.
Deeply sorry for the delay.
Below the full log from start:
2020-12-01 15:03:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for spotcast which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for smartir which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for skodaconnect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for variable which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:51 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for plex_assistant which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:52 WARNING (MainThread) [homeassistant.config] Package r2d2 contains invalid customize 2020-12-01 15:03:52 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for blitzortung which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:52 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for anniversaries which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:52 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:52 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for garbage_collection which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:52 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for circadian_lighting which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-12-01 15:03:58 INFO (MainThread) [custom_components.xiaomi_miio_philipslight.light] Initializing with host 192.168.2.14 (token c9f25...) 2020-12-01 15:03:58 INFO (MainThread) [custom_components.xiaomi_miio_philipslight.light] Initializing with host 192.168.2.15 (token 074b9...) 2020-12-01 15:03:58 DEBUG (SyncWorker_7) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-12-01 15:03:58 DEBUG (SyncWorker_7) [miio.miioprotocol] Got a response: Container: data = Container: data = b'' (total 0) value = b'' (total 0) offset1 = 32 offset2 = 32 length = 0 header = Container: data = b'!1\x00 \x00\x00\x00\x00\x053\xdcz\x00\x03\xf2+' (total 16) value = Container: length = 32 unknown = 0 device_id = unhexlify('0533dc7a') ts = 1970-01-03 23:50:03 offset1 = 0 offset2 = 16 length = 16 checksum = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' (total 16) 2020-12-01 15:03:58 DEBUG (SyncWorker_8) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-12-01 15:03:58 DEBUG (SyncWorker_8) [miio.miioprotocol] Got a response: Container: data = Container: data = b'' (total 0) value = b'' (total 0) offset1 = 32 offset2 = 32 length = 0 header = Container: data = b'!1\x00 \x00\x00\x00\x00\x051\xa0\xed\x00\x05x}' (total 16) value = Container: length = 32 unknown = 0 device_id = unhexlify('0531a0ed') ts = 1970-01-05 03:35:25 offset1 = 0 offset2 = 16 length = 16 checksum = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' (total 16) 2020-12-01 15:03:58 DEBUG (SyncWorker_7) [miio.miioprotocol] Discovered 0533dc7a with ts: 1970-01-03 23:50:03, token: b'00000000000000000000000000000000' 2020-12-01 15:03:58 DEBUG (SyncWorker_8) [miio.miioprotocol] Discovered 0531a0ed with ts: 1970-01-05 03:35:25, token: b'00000000000000000000000000000000' 2020-12-01 15:03:58 DEBUG (SyncWorker_8) [miio.miioprotocol] 192.168.2.15:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['pow', 'sta', 'bri', 'rgb', 'cct', 'snm', 'spr', 'spt', 'wke', 'bl', 'ms', 'mb', 'wkp']} 2020-12-01 15:03:58 DEBUG (SyncWorker_7) [miio.miioprotocol] 192.168.2.14:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['pow', 'sta', 'bri', 'rgb', 'cct', 'snm', 'spr', 'spt', 'wke', 'bl', 'ms', 'mb', 'wkp']} 2020-12-01 15:03:58 DEBUG (SyncWorker_7) [miio.miioprotocol] 192.168.2.14:54321 (ts: 1970-01-03 23:50:03, id: 1) << {'result': ['off', 0, 1, 16736512, 1, 0, 0, 15, 0, 0, 0, 0, [0, 24, 0]], 'id': 1} 2020-12-01 15:03:58 DEBUG (SyncWorker_8) [miio.miioprotocol] 192.168.2.15:54321 (ts: 1970-01-05 03:35:25, id: 1) << {'result': ['off', 0, 1, 16736512, 1, 0, 0, 15, 0, 0, 0, 0, [0, 24, 0]], 'id': 1} 2020-12-01 15:03:58 DEBUG (MainThread) [custom_components.xiaomi_miio_philipslight.light] Got new state: <PhilipsMoonlightStatus power=off, brightness=1, color_temperature=1, rgb=(255, 97, 0), scene=0> 2020-12-01 15:03:58 DEBUG (MainThread) [custom_components.xiaomi_miio_philipslight.light] Got new state: <PhilipsMoonlightStatus power=off, brightness=1, color_temperature=1, rgb=(255, 97, 0), scene=0> 2020-12-01 15:04:04 DEBUG (SyncWorker_16) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-12-01 15:04:04 DEBUG (SyncWorker_16) [miio.miioprotocol] Got a response: Container: data = Container: data = b'' (total 0) value = b'' (total 0) offset1 = 32 offset2 = 32 length = 0 header = Container: data = b'!1\x00 \x00\x00\x00\x00\x07\xdfe\xb6\x00\x10\xec{' (total 16) value = Container: length = 32 unknown = 0 device_id = unhexlify('07df65b6') ts = 1970-01-13 20:05:15 offset1 = 0 offset2 = 16 length = 16 checksum = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' (total 16) 2020-12-01 15:04:04 DEBUG (SyncWorker_16) [miio.miioprotocol] Discovered 07df65b6 with ts: 1970-01-13 20:05:15, token: b'00000000000000000000000000000000' 2020-12-01 15:04:04 DEBUG (SyncWorker_16) [miio.miioprotocol] 192.168.2.60:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []} 2020-12-01 15:04:04 ERROR (MainThread) [homeassistant.components.roku] Error fetching roku data: Invalid response from API: Error occurred while communicating with device 2020-12-01 15:04:09 DEBUG (SyncWorker_16) [miio.miioprotocol] Retrying with incremented id, retries left: 3 2020-12-01 15:04:09 DEBUG (SyncWorker_16) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-12-01 15:04:09 DEBUG (SyncWorker_16) [miio.miioprotocol] Got a response: Container: data = Container: data = b'' (total 0) value = b'' (total 0) offset1 = 32 offset2 = 32 length = 0 header = Container: data = b'!1\x00 \x00\x00\x00\x00\x07\xdfe\xb6\x00\x10\xec\x80' (total 16) value = Container: length = 32 unknown = 0 device_id = unhexlify('07df65b6') ts = 1970-01-13 20:05:20 offset1 = 0 offset2 = 16 length = 16 checksum = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' (total 16) 2020-12-01 15:04:09 DEBUG (SyncWorker_16) [miio.miioprotocol] Discovered 07df65b6 with ts: 1970-01-13 20:05:20, token: b'00000000000000000000000000000000' 2020-12-01 15:04:09 DEBUG (SyncWorker_16) [miio.miioprotocol] 192.168.2.60:54321 >>: {'id': 102, 'method': 'miIO.info', 'params': []} 2020-12-01 15:04:09 DEBUG (SyncWorker_16) [miio.miioprotocol] 192.168.2.60:54321 (ts: 1970-01-13 20:05:20, id: 102) << {'result': {'life': 1109120, 'cfg_time': 0, 'token': 'f48b728634eed4cebe91a13ef8ebf646', 'mac': '04:CF:8C:92:D4:E4', 'fw_ver': '1.4.3_21104', 'hw_ver': 'MW300', 'model': 'zhimi.airpurifier.mc1', 'wifi_fw_ver': 'SD878x-14.76.36.p84-702.1.0-WM', 'ap': {'rssi': -67, 'ssid': 'Casa Concordia', 'bssid': '18:E8:29:AA:E7:46'}, 'netif': {'localIp': '192.168.2.60', 'mask': '255.255.255.0', 'gw': '192.168.2.1', 'gw_mac': 'E0:63:DA:26:0D:67'}, 'mmfree': 145436, 'otu_stat': [0, 0, 0, 0, 0, 138], 'ott_stat': [0, 44263, 158, 0]}, 'id': 102} 2020-12-01 15:04:09 DEBUG (SyncWorker_28) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-12-01 15:04:09 DEBUG (SyncWorker_28) [miio.miioprotocol] Got a response: Container: data = Container: data = b'' (total 0) value = b'' (total 0) offset1 = 32 offset2 = 32 length = 0 header = Container: data = b'!1\x00 \x00\x00\x00\x00\x07\xdfe\xb6\x00\x10\xec\x80' (total 16) value = Container: length = 32 unknown = 0 device_id = unhexlify('07df65b6') ts = 1970-01-13 20:05:20 offset1 = 0 offset2 = 16 length = 16 checksum = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' (total 16) 2020-12-01 15:04:09 DEBUG (SyncWorker_28) [miio.miioprotocol] Discovered 07df65b6 with ts: 1970-01-13 20:05:20, token: b'00000000000000000000000000000000' 2020-12-01 15:04:09 DEBUG (SyncWorker_28) [miio.miioprotocol] 192.168.2.60:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']} 2020-12-01 15:04:09 DEBUG (SyncWorker_28) [miio.miioprotocol] 192.168.2.60:54321 (ts: 1970-01-13 20:05:20, id: 1) << {'result': ['on', 9, 10, 42, 227, 'auto', 8, 54, 1587, None, 351, None, None, 3500, 'on'], 'id': 1} 2020-12-01 15:04:09 DEBUG (SyncWorker_28) [miio.miioprotocol] 192.168.2.60:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']} 2020-12-01 15:04:09 DEBUG (SyncWorker_28) [miio.miioprotocol] 192.168.2.60:54321 (ts: 1970-01-13 20:05:20, id: 2) << {'result': [None, 38, 'off', 'off', None, '0:0:30:31', '81:66:58:da:2c:b:4', None, None, None, None, 0, None, None], 'id': 2} 2020-12-01 15:04:09 ERROR (MainThread) [homeassistant.components.roku] Error fetching roku data: Invalid response from API: Error occurred while communicating with device 2020-12-01 15:04:19 ERROR (MainThread) [homeassistant.components.roku] Error fetching roku data: Invalid response from API: Error occurred while communicating with device 2020-12-01 15:04:24 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up google_keep platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform await asyncio.shield(task) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, *self.kwargs) File "/config/custom_components/google_keep/sensor.py", line 39, in setup_platform login_success = keep.login(username, password) File "/usr/local/lib/python3.8/site-packages/gkeepapi/init.py", line 693, in login ret = auth.login(username, password, get_mac()) File "/usr/local/lib/python3.8/site-packages/gkeepapi/init.py", line 59, in login raise exception.LoginException( gkeepapi.exception.LoginException: ('BadAuthentication', None) 2020-12-01 15:04:28 DEBUG (SyncWorker_5) [miio.miioprotocol] 192.168.2.14:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['pow', 'sta', 'bri', 'rgb', 'cct', 'snm', 'spr', 'spt', 'wke', 'bl', 'ms', 'mb', 'wkp']} 2020-12-01 15:04:28 DEBUG (SyncWorker_28) [miio.miioprotocol] 192.168.2.15:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['pow', 'sta', 'bri', 'rgb', 'cct', 'snm', 'spr', 'spt', 'wke', 'bl', 'ms', 'mb', 'wkp']} 2020-12-01 15:04:28 DEBUG (SyncWorker_5) [miio.miioprotocol] 192.168.2.14:54321 (ts: 1970-01-03 23:50:34, id: 2) << {'result': ['off', 0, 1, 16736512, 1, 0, 0, 15, 0, 0, 0, 0, [0, 24, 0]], 'id': 2} 2020-12-01 15:04:28 DEBUG (MainThread) [custom_components.xiaomi_miio_philipslight.light] Got new state: <PhilipsMoonlightStatus power=off, brightness=1, color_temperature=1, rgb=(255, 97, 0), scene=0> 2020-12-01 15:04:28 DEBUG (SyncWorker_28) [miio.miioprotocol] 192.168.2.15:54321 (ts: 1970-01-05 03:35:55, id: 2) << {'result': ['off', 0, 1, 16736512, 1, 0, 0, 15, 0, 0, 0, 0, [0, 24, 0]], 'id': 2} 2020-12-01 15:04:28 DEBUG (MainThread) [custom_components.xiaomi_miio_philipslight.light] Got new state: <PhilipsMoonlightStatus power=off, brightness=1, color_temperature=1, rgb=(255, 97, 0), scene=0> 2020-12-01 15:04:29 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{ state_attr('binary_sensor.joshua_server', 'motherboard').split(',')[0] }}") Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 353, in async_render render_result = compiled.render(kwargs) File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render self.environment.handle_exception() File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception reraise(rewrite_traceback_stack(source=source)) File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise raise value.with_traceback(tb) File "", line 1, in top-level template code File "/usr/local/lib/python3.8/site-packages/jinja2/sandbox.py", line 460, in call if not self.is_safe_callable(obj): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1381, in is_safe_callable return isinstance(obj, AllStates) or super().is_safe_callable(obj) File "/usr/local/lib/python3.8/site-packages/jinja2/sandbox.py", line 360, in is_safe_callable getattr(obj, "unsafe_callable", False) or getattr(obj, "alters_data", False) jinja2.exceptions.UndefinedError: 'None' has no attribute 'split'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 462, in async_render_to_info
render_info._result = self.async_render(variables, *kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 355, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'split'
2020-12-01 15:04:29 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'split'') while processing template 'Template("{{ state_attr('binary_sensor.joshua_server', 'motherboard').split(',')[0] }}")' for attribute '_state' in entity 'sensor.joshua_motherboard'
2020-12-01 15:04:39 DEBUG (SyncWorker_17) [miio.miioprotocol] 192.168.2.60:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']}
2020-12-01 15:04:39 DEBUG (SyncWorker_17) [miio.miioprotocol] 192.168.2.60:54321 (ts: 1970-01-13 20:05:50, id: 3) << {'result': ['on', 10, 10, 42, 227, 'auto', 8, 54, 1587, None, 351, None, None, 3500, 'on'], 'id': 3}
2020-12-01 15:04:39 DEBUG (SyncWorker_17) [miio.miioprotocol] 192.168.2.60:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']}
2020-12-01 15:04:39 DEBUG (SyncWorker_17) [miio.miioprotocol] 192.168.2.60:54321 (ts: 1970-01-13 20:05:50, id: 4) << {'result': [None, 37, 'off', 'off', None, '0:0:30:31', '81:66:58:da:2c:b:4', None, None, None, None, 0, None, None], 'id': 4}
2020-12-01 15:04:58 DEBUG (SyncWorker_2) [miio.miioprotocol] 192.168.2.14:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['pow', 'sta', 'bri', 'rgb', 'cct', 'snm', 'spr', 'spt', 'wke', 'bl', 'ms', 'mb', 'wkp']}
2020-12-01 15:04:58 DEBUG (SyncWorker_39) [miio.miioprotocol] 192.168.2.15:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['pow', 'sta', 'bri', 'rgb', 'cct', 'snm', 'spr', 'spt', 'wke', 'bl', 'ms', 'mb', 'wkp']}
2020-12-01 15:04:58 DEBUG (SyncWorker_39) [miio.miioprotocol] 192.168.2.15:54321 (ts: 1970-01-05 03:36:25, id: 3) << {'result': ['off', 0, 1, 16736512, 1, 0, 0, 15, 0, 0, 0, 0, [0, 24, 0]], 'id': 3}
2020-12-01 15:04:58 DEBUG (MainThread) [custom_components.xiaomi_miio_philipslight.light] Got new state: <PhilipsMoonlightStatus power=off, brightness=1, color_temperature=1, rgb=(255, 97, 0), scene=0>
2020-12-01 15:04:58 DEBUG (SyncWorker_2) [miio.miioprotocol] 192.168.2.14:54321 (ts: 1970-01-03 23:51:04, id: 3) << {'result': ['off', 0, 1, 16736512, 1, 0, 0, 15, 0, 0, 0, 0, [0, 24, 0]], 'id': 3}
2020-12-01 15:04:58 DEBUG (MainThread) [custom_components.xiaomi_miio_philipslight.light] Got new state: <PhilipsMoonlightStatus power=off, brightness=1, color_temperature=1, rgb=(255, 97, 0), scene=0>
2020-12-01 15:05:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback async_track_point_in_utc_time.
@syssi Regarding model number here it is (specs found at the bottom of the lamp): Number: 9290019202
Hello,
I have the following message in home assistant:
Unsupported device found! Please create an issue at https://github.com/syssi/philipslight/issues and provide the following data: philips.light.moonlight
I am a developper myself, and could help if needed.
Alex