Core: Keen Smart Vents and Smartthings Intregration

Created on 19 Feb 2019  路  7Comments  路  Source: home-assistant/core

Keen Smart Vents are seen as Lights with the new SmartThings intregration. On/Off work, but dimming from within Home Assistant result in the following error in Smartthings:

2b15b2d2-3526-4279-8b6e-9e06abce031a  7:08:40 AM: error groovy.lang.MissingMethodException: No signature of method: script_dth_d5c37af63c334241606af16f6b7541fb0b787fe92ca27700ae094c8083260d6b.setLevel() is applicable for argument types: (java.lang.Integer, java.lang.Integer) values: [100, 0]
Possible solutions: getLevel(), setLevel(java.lang.Object), ventLevelUp()

And this error happens in Home Assistant:

DEBUG (MainThread) [homeassistant.components.smartthings] Unable to update status for device: Hassio (6622a384-c542-4c6b-b0de-aef8e4cd5675), the device will be ignored
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/smartthings/__init__.py", line 71, in retrieve_device_status
    await device.status.refresh()
  File "/usr/local/lib/python3.6/site-packages/pysmartthings/device.py", line 234, in refresh
    data = await self._api.get_device_status(self.device_id)
  File "/usr/local/lib/python3.6/site-packages/pysmartthings/api.py", line 79, in get_device_status
    return await self.get(API_DEVICE_STATUS.format(device_id=device_id))
  File "/usr/local/lib/python3.6/site-packages/pysmartthings/api.py", line 314, in get
    return await self.request('get', self._api_base + resource, params)
  File "/usr/local/lib/python3.6/site-packages/pysmartthings/api.py", line 310, in request
    resp.raise_for_status()
  File "/usr/local/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 942, in raise_for_status
    headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden'
2019-02-17 11:40:00 DEBUG (MainThread) [homeassistant.components.smartthings] Unable to update status for device: Keen (930d7078-a711-4a7a-9a6f-3120c18737cd), the device will be ignored
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/smartthings/__init__.py", line 71, in retrieve_device_status
    await device.status.refresh()
  File "/usr/local/lib/python3.6/site-packages/pysmartthings/device.py", line 234, in refresh
    data = await self._api.get_device_status(self.device_id)
  File "/usr/local/lib/python3.6/site-packages/pysmartthings/api.py", line 79, in get_device_status
    return await self.get(API_DEVICE_STATUS.format(device_id=device_id))
  File "/usr/local/lib/python3.6/site-packages/pysmartthings/api.py", line 314, in get
    return await self.request('get', self._api_base + resource, params)
  File "/usr/local/lib/python3.6/site-packages/pysmartthings/api.py", line 310, in request
    resp.raise_for_status()
  File "/usr/local/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 942, in raise_for_status
    headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden'

Changing levels in Smartthings accurately reflects 'light brightness' in Home Assistant

smartthings

All 7 comments

Can you log in to the SmartThings Groovy IDE and tell me the Type (device type handler) being used? If it's a custom handler, please paste a link to the source code.

we don't want these showing up as lights. There's an open PR to add the Cover platform for the integration. Based on how the DTH is defined, it may show up as a Cover in release 0.89.

In looking at the source code of the handler, it will be indistinguishable from that of a light and it doesn鈥檛 implement the switch level correctly, same problem as #21173.

Apply the workaround described there to fix the issue. As for making it show up as a cover, we鈥檒l have to think about how best to do that, as ST does not have a vent control capability. We could do it with valve, shudder, or even door, but that will require large changes to the handler.

Let me consult with the ST devs and see what their recommendation is, meanwhile you have a mitigation.

Also if you notice, the traceback is unrelated to your issue鈥攊t鈥檚 about devices called Hassio and Keen that aren鈥檛 supported by the integration and is being ignored because we can鈥檛 query their current status.

Thank you!

Also if you notice, the traceback is unrelated to your issue鈥攊t鈥檚 about devices called Hassio and Keen that aren鈥檛 supported by the integration and is being ignored because we can鈥檛 query their current status.

Thanks for pointing this out. Hassio was the old MQTT bridge. Keen is the Keen Bridge which is used as a repeater for the vents. It is connected to Smartthings but has no other values or setups and is of 'Unknown' type.

One last comment -- I got a hold of the dev that created the DTH and he will fix the implementation of switchLevel.

SmartThings doesn't have a more appropriate set of capabilities to use for vents, so for now they are going to leave it using switch and switchLevel knowing that those are meant for dimmers. It will continue to show up in HASS as a light until this changes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Konstigt picture Konstigt  路  3Comments

flsabourin picture flsabourin  路  3Comments

kirichkov picture kirichkov  路  3Comments

aweb-01 picture aweb-01  路  3Comments

piitaya picture piitaya  路  3Comments