home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.06k stars 29.73k forks source link

Clearpass Integration not working #47225

Closed jonare77 closed 3 years ago

jonare77 commented 3 years ago

The problem

Trying to set up Aruba Clearpass with Home Assistant. Get token error, API user setup is correct. Clearpass version is: 6.9.5.131053 (latest).

What is version of Home Assistant Core has the issue?

core-2021.2.3

What was the last working version of Home Assistant Core?

unknown

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Aruba ClearPass

Link to integration documentation on our website

https://www.home-assistant.io/integrations/cppm_tracker/

Example YAML snippet

# Put your YAML below this line
device_tracker:
  - platform: cppm_tracker
    host: our_cppm_host
    client_id: HA
    api_key: token_generated_in_cppm

Anything in the logs that might be useful for us?

# Put your logs below this line
Logger: homeassistant.components.device_tracker
Source: components/cppm_tracker/device_tracker.py:40
Integration: Enhetssporing (documentation, issues)
First occurred: 13:54:46 (1 occurrences)
Last logged: 13:54:46

Error setting up platform legacy
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 231, in async_setup_legacy
    scanner = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/cppm_tracker/device_tracker.py", line 40, in get_scanner
    cppm = ClearPass(data)
  File "/usr/local/lib/python3.8/site-packages/clearpasspy.py", line 10, in __init__
    self.get_access_token(data)
  File "/usr/local/lib/python3.8/site-packages/clearpasspy.py", line 103, in get_access_token
    self.access_token = json_response['access_token']
KeyError: 'access_token'

2021-03-01 14:23:18 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 329, in async_device_tracker_scan
found_devices = await scanner.async_scan_devices()
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 795, in async_scan_devices
return await self.hass.async_add_executor_job(self.scan_devices)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/cppm_tracker/device_tracker.py", line 57, in scan_devices
self.get_cppm_data()
File "/usr/src/homeassistant/homeassistant/components/cppm_tracker/device_tracker.py", line 72, in get_cppm_data
if self._cppm.online_status(item["mac_address"]):
File "/usr/local/lib/python3.8/site-packages/clearpasspy.py", line 51, in online_status
if endpoint['is_online'] == True:
KeyError: 'is_online'
2021-03-01 14:23:30 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.