Mine seems to be doing the same thing running Home Assistant 0.77.3 with Zigpy 0.2.0 and Bellows 0.7.0.
For now I have switched it back to a switch.
Update: Seems like updating to Home Assistant 0.78.0 fixed this issue.
Mine seems to be doing the same thing running Home Assistant 0.77.3 with Zigpy 0.2.0 and Bellows 0.7.0.
For now I have switched it back to a switch.
Update: Seems like updating to Home Assistant 0.78.0 fixed this issue.
Iâm trying to add a ecosmart bulb and I am getting the following:
2018-09-19 20:55:01 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform zha
Traceback (most recent call last):
File â/usr/src/app/homeassistant/helpers/entity_platform.pyâ, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File â/usr/local/lib/python3.6/asyncio/tasks.pyâ, line 358, in wait_for
return fut.result()
File â/usr/src/app/homeassistant/components/light/zha.pyâ, line 45, in async_setup_platform
async_add_entities([Light(**discovery_info)], update_before_add=True)
File â/usr/src/app/homeassistant/components/light/zha.pyâ, line 55, in init
super().init(**kwargs)
File â/usr/src/app/homeassistant/components/zha/init.pyâ, line 312, in init
slugify(model),
File â/usr/src/app/homeassistant/util/init.pyâ, line 46, in slugify
text = normalize(âNFKDâ, text)
TypeError: normalize() argument 2 must be str, not bytes
Any help is appreciated.
What version of HA are you running? Some vendors put extra non ASCII chars in model/manufacturer attributes and that was causing problems earlier. But supposedly it should have been addressed in latest zigpy which latest HA installs by default. I wasnât getting those errors for a while.
Can you post output of sqlite3 zigbee.db "SELECT attrid,value FROM attributes WHERE attrid=4 or attrid=5;"
or your zigbee.db
Anyone have the switch linked below? I was able to pair it fine with HA on the HUSBZB-1 stick but it just acts weird. Like it doesnât always listen to the states at times. I suspect it is something with the Zigbee support in HA as it works fine with other Hubs and such. I havenât dug into the Zigbee side of code things in HA yet so any pointers on debugging this thing and being able to see traffic across the zigbee network back and forth would be a great help. I have some Sengled bulbs paired via Zigbee right now that work fine.
I saw another user on the Amazon review stated this:
âFrom Home Assistant itâll turn off just fine (also set up a node-red flow to work with my Echo). Turning on gets tricky. If I turned it off remotely at say 50% then I have to give it a new dim setting greater than that to turn back on (itâll ignore an on command and any dim setting below 50%). If it was at 100% then I have to give it a 1% and then whatever I want to get it to turn back on. Sometimes itâll go off/on fine though at 100% - havenât quite figured out all the iterations. But again - I think this is just the different zigbee protocols not being 100% compatible with each other. So for the best experience make sure you have one of the listed compatible hubs.â
if it turns on when you change the brightness to a greater level than the current level, then it could be another reincarnation of https://github.com/home-assistant/home-assistant/pull/12924 bug/behavior. IMO current light.zha.Light relies on slightly incorrect behavior of other vendors, thus vendors which follow strictly ZCL specs donât work correctly with HA
Iâll report back after I do a bit more playing with it this weekend. Determined to get this working!
I am running 0.77.3 and the output of that command is:
4|2.1.0_16d_YF05
Looks fine, but 0.77.3 is still using zigpy==0.1.0
. Give 0.78.3 HA version a try, it might fix the issue with model
Sylvania Smart Plugs work fine
bellows devices
output:
Device:
NWK: 0x0639
IEEE: 7c:b0:3e:aa:00:a6:af:65
Endpoints:
3: profile=0xc05e, device_type=DeviceType.ON_OFF_PLUGIN_UNIT
Input Clusters:
Basic (0)
Identify (3)
Groups (4)
Scenes (5)
On/Off (6)
Electrical Measurement (2820)
LightLink (4096)
Manufacturer Specific (64527)
Output Clusters:
Ota (25)
Attributes scan:
===============================
basic cluster
All supported attributes
'0x0000-zcl_version' = 1
'0x0001-app_version' = 144
'0x0002-stack_version' = 2
'0x0003-hw_version' = 1
'0x0004-manufacturer' = b'OSRAM'
'0x0005-model' = b'Plug 01'
'0x0006-date_code' = b'20140331DEOS****'
'0x0007-power_source' = 1
'0x0012-device_enabled' = 1
'0x4000-sw_build_id' = b'V1.04.90'
===============================
groups cluster
All supported attributes
'0x0000-name_support' = 0
===============================
scenes cluster
All supported attributes
'0x0000-count' = 0
'0x0001-current_scene' = 0
'0x0002-current_group' = 0
'0x0003-scene_valid' = 0
'0x0004-name_support' = 0
===============================
on_off cluster
All supported attributes
'0x0000-on_off' = 1
'0x4000-global_scene_control' = 1
'0x4001-on_time' = 0
'0x4002-off_wait_time' = 0
===============================
electrical_measurement cluster
All supported attributes
'0x0000-measurement_type' = 8
'0x050b-active_power' = 400
Has anyone looked at adding a quirk for battery status for smartthings devices? It appears that the old ones donât support the âbattery_percentage_remainingâ attribute, so I was trying to fake this attribute using the existing âbattery_voltageâ attribute and a previous conversion formular.
It didnât work
Sorry if I have missed it, but has anyone had luck adding Philips Hue Motion Sensors to the mix using ZHA?
Obviously the Hue bulbs and lamps all work (All Hue fittings, globes, and lamps I have tried that is).
I was tossing up between the nice, small, self contained Philips Hue sensor option or making my own using ESP8266 and MQTT.
Apparently the Hue motion sensor has Light, Temperature and motion sensing.
Anyone got it to work (sending battery data would also be a bonus)?
I removed zigbee.db and updated HA to 0.78.3. I reset my bulb and sent the permit again and I receive the same error:
2018-09-22 13:27:06 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform zha
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/src/app/homeassistant/components/light/zha.py", line 45, in async_setup_platform
async_add_entities([Light(**discovery_info)], update_before_add=True)
File "/usr/src/app/homeassistant/components/light/zha.py", line 55, in __init__
super().__init__(**kwargs)
File "/usr/src/app/homeassistant/components/zha/__init__.py", line 312, in __init__
slugify(model),
File "/usr/src/app/homeassistant/util/__init__.py", line 46, in slugify
text = normalize('NFKD', text)
TypeError: normalize() argument 2 must be str, not bytes
If the bulb shows in the output of bellows devices
could you PM me your zigbee.db and I would take a look?
Do you mind testing it with latest 0.79.0? I think as side effect PR #16485 fixes this behavior.
0.78.3
fails exactly as yours, but 0.79.0
successfully initializes light.zha
platform
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.appdb] Loading application state from /home/lex/.ha-dev/zigbee.db
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zigpy.quirks.xiaomi.TemperatureHumiditySensor'>
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: dict_keys([1, 2, 3]) {1}
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zigpy.quirks.xiaomi.AqaraTemperatureHumiditySensor'>
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Fail because device_type mismatch on at least one endpoint
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zigpy.quirks.xiaomi.AqaraOpenCloseSensor'>
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Fail because device_type mismatch on at least one endpoint
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zigpy.quirks.xiaomi.AqaraWaterSensor'>
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Fail because device_type mismatch on at least one endpoint
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zigpy.quirks.smartthings.SmartthingsTemperatureHumiditySensor'>
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Fail because device_type mismatch on at least one endpoint
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Considering <class 'zigpy.quirks.kof.CeilingFan'>
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.quirks] Fail because device_type mismatch on at least one endpoint
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.appdb] Attribute id: 4 value: b'2.1.0_16d_YF05'
2018-09-28 23:47:33 DEBUG (MainThread) [zigpy.appdb] Attribute id: 5 value: b'\x00\x02\x00\x04\x00\x0c]\xef\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e'
... blah-blah-blah ...
2018-09-28 23:47:33 INFO (MainThread) [homeassistant.setup] Setting up light
2018-09-28 23:47:33 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=turn_on, domain=light>
2018-09-28 23:47:33 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=turn_off, domain=light>
2018-09-28 23:47:33 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=toggle, domain=light>
2018-09-28 23:47:33 INFO (MainThread) [homeassistant.setup] Setup of domain light took 0.1 seconds.
2018-09-28 23:47:33 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=light>
... blah-blah-blah ...
2018-09-28 23:47:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=permit, domain=zha>
2018-09-28 23:47:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=remove, domain=zha>
2018-09-28 23:47:34 INFO (MainThread) [homeassistant.setup] Setup of domain zha took 2.0 seconds.
2018-09-28 23:47:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=zha>
2018-09-28 23:47:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event platform_discovered[L]: platform=zha, service=load_platform.light, discovered=discovery_key=dd:16:ab:ff:f1:a2:14:b9-1>
2018-09-28 23:47:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=zha.zha_210_16d_yf05__f1a214b9, old_state=None, new_state=<state zha.zha_210_16d_yf05__f1a214b9=offline; nwk=0xd87a, rssi=None, lqi=None, ieee=dd:16:ab:ff:f1:a2:14:b9, friendly_name=2.1.0_16d_YF05 @ 2018-09-28T23:47:34.559039-04:00>>
2018-09-28 23:47:34 INFO (MainThread) [homeassistant.loader] Loaded light.zha from homeassistant.components.light.zha
2018-09-28 23:47:34 INFO (MainThread) [homeassistant.components.light] Setting up light.zha
2018-09-28 23:47:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.210_16d_yf05__f1a214b9_1, old_state=None, new_state=<state light.210_16d_yf05__f1a214b9_1=off; supported_features=33, friendly_name=2.1.0_16d_YF05 @ 2018-09-28T23:47:34.563998-04:00>>
2018-09-28 23:47:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=62db1e89b7f84a6bbc34b4d3dea12df1, service=set, domain=group, service_data=name=all lights, visible=False, object_id=all_lights, entities=['light.210_16d_yf05__f1a214b9_1']>
2018-09-28 23:47:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=group.all_lights, old_state=None, new_state=<state group.all_lights=off; hidden=True, auto=True, entity_id=('light.210_16d_yf05__f1a214b9_1',), order=1, friendly_name=all lights @ 2018-09-28T23:47:34.565968-04:00>>
2018-09-28 23:47:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=62db1e89b7f84a6bbc34b4d3dea12df1>
2018-09-28 23:47:34 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 8.99s
That fixed it. I have successfully added other bulbs as well! Thatâs for the help!
Does anyone have any idea when battery levels may be added officially. I have a custom component with battery additions that some provided above a while back. And although I do have âbatteriesâ reporting now, Iâm not convinced its actually working. All 8 of my devices have shown 100% battery for months, and they are not new devices, Iâm pretty sure that at least some of them should be less than 100%. Just curious if anyone was actuallty getting valid battery reporting?
Iâve been poking around on this. Newer devices support the battery percent attribute so they would be easy to add, however many older devices only support battery voltage, and as each device could have a different voltage signature, this would need to be device specific.
I looked at trying to build a quirk for older smartthings devices (newer ones have the percentage) to basically emulate the battery percentage attribute but couldnât quite figure out how the quirks would work here and didnât get any response to some of my questions.
Iâm not a expert at how to do that, but would be happy to help if you gave me some steps. I have Iris open close, iris motion, Smartthings (older gen) motion, and Smartthings (older) open/close.
that all work, just no battery reporting. The iris sensors are great and pretty popular on here. Mostly I like the size vs any zwave oneâs i;ve come across
Here is an update I made to the zha sensor to support battery percentages. I cancelled the PR because of a conflicting merge to fix some exception handling, but will likely create a new PR soon to get this change in.
Basically you can see I created a new BatterySensor which uses attribute 33 or the âbattery_percentage_remainingâ. This would at least work for new Smartthings sensors and maybe other that use this attribute.
The second part I was looking at was to add a quirk to emulate this attribute on devices that didnt support it. My attempt is here in the SmartthingsPowerCluster but it never really worked so I assume Iâm doing something stupid.
Bosch ISW-ZPR1-WP13
Any chance someone could look at these again.
They show up in the ZHA Card and have sensors but show offline.
Looks like everything is there just missing something.
ThanksâŚ