Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abode Integration doesn't update, throws exception #86765

Closed
zim514 opened this issue Jan 27, 2023 · 22 comments · Fixed by #87498
Closed

Abode Integration doesn't update, throws exception #86765

zim514 opened this issue Jan 27, 2023 · 22 comments · Fixed by #87498

Comments

@zim514
Copy link
Contributor

zim514 commented Jan 27, 2023

The problem

The abode alarm system status no longer updates. Actions such as arming and disarming function and the actual alarm state changes, but the alarm_control_panel.abode entity does not update with the new status.

Reloading the integration via settings corrects the status, but it breaks again.

There are connection exceptions in the logs, it's the same one every time:

What version of Home Assistant Core has the issue?

2023.2.0b1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Abode

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/abode/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

'''
2023-01-26 23:23:23.114 ERROR (SocketIOThread) [jaraco.abode.socketio] Captured exception during SocketIO event callback: 'NoneType' object has no attribute 'replace'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/socketio.py", line 331, in _handle_event
    callback(event_data)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/event_controller.py", line 243, in _on_mode_change
    alarm_device = self._client.get_alarm(refresh=True)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/client.py", line 274, in get_alarm
    return self.get_device(ALARM.id(area), refresh)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/client.py", line 231, in get_device
    device.refresh()
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 97, in refresh
    response_object = super().refresh(url)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/base.py", line 111, in refresh
    self.update(device)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 104, in update
    super().update(state_from_panel(state, area=self._area))
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 26, in state_from_panel
    alarm_state['uuid'] = alarm_state.get('mac').replace(':', '').lower()
AttributeError: 'NoneType' object has no attribute 'replace'
'''

Additional information

This might be related to #80754

@home-assistant
Copy link

Hey there @shred86, mind taking a look at this issue as it has been labeled with an integration (abode) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of abode can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign abode Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


abode documentation
abode source
(message by IssueLinks)

@zim514
Copy link
Contributor Author

zim514 commented Jan 27, 2023

cc: @tradel

@soonerfan237
Copy link

I just want to add that I am also experiencing the same issue with the Abode integration since upgrading to 2023.2.0. I can successfully arm or disarm the alarm using Home Assistant, but the status displayed in Home Assistant does not change.

Log entry:

Logger: jaraco.abode.socketio
Source: /usr/local/lib/python3.10/site-packages/jaraco/abode/socketio.py:335
First occurred: February 1, 2023 at 6:02:57 PM (13 occurrences)
Last logged: 8:56:13 AM

Captured exception during SocketIO event callback: 'NoneType' object has no attribute 'replace'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/socketio.py", line 331, in _handle_event
    callback(event_data)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/event_controller.py", line 243, in _on_mode_change
    alarm_device = self._client.get_alarm(refresh=True)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/client.py", line 274, in get_alarm
    return self.get_device(ALARM.id(area), refresh)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/client.py", line 231, in get_device
    device.refresh()
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 97, in refresh
    response_object = super().refresh(url)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/base.py", line 111, in refresh
    self.update(device)
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 104, in update
    super().update(state_from_panel(state, area=self._area))
  File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 26, in state_from_panel
    alarm_state['uuid'] = alarm_state.get('mac').replace(':', '').lower()
AttributeError: 'NoneType' object has no attribute 'replace'

@imbrianj
Copy link
Contributor

imbrianj commented Feb 2, 2023

I'm experiencing the same issue. I'm not sure if it's an issue with HA or with the Abode package by @jaraco . The line throwing comes from here: https://github.com/jaraco/jaraco.abode/blob/main/jaraco/abode/devices/alarm.py#L26 . It looks like the panel_state is derived within that package.

@tradel
Copy link
Contributor

tradel commented Feb 2, 2023 via email

@evanmoses-okta
Copy link

FWIW when I run abode directly on the cli from the jaraco/jaraco.abode package, it works fine to get the state and I see the 'mac' key if I ask it to output json. So must be an interaction between HA and the python package.

Somewhat relatedly I had to re-auth the abode integration when I updated to 2023.2, I assume it's because of the new package.

@tradel
Copy link
Contributor

tradel commented Feb 2, 2023 via email

@evanmoses-okta
Copy link

evanmoses-okta commented Feb 2, 2023

I spoke too soon. If I run abode --listen --debug and I set my alarm, I see this (same error): 2023-02-02 10:07:16 INFO (SocketIOThread) [abodecl] Gateway Armed w/ Faults(s) - Home - Armed w/ Faults(s) - Home at 02/02/2023 10:07 AM 2023-02-02 10:07:16 DEBUG (SocketIOThread) [lomond] SRV -> CLI : <frame TEXT (37 bytes) fin=1> 2023-02-02 10:07:16 DEBUG (SocketIOThread) [jaraco.abode.socketio] Received: 42["com.goabode.gateway.mode","home"] 2023-02-02 10:07:16 DEBUG (SocketIOThread) [jaraco.abode.event_controller] Alarm mode change event to: home 2023-02-02 10:07:16 DEBUG (SocketIOThread) [jaraco.abode.devices.base] Device Refresh Response: {"site_id":"<redacted>","version":"ABGW-2 0.0.2.22I_6.8F_homekit_2.0.9_s2 BG_U-ITR-F1-BD_BL.A30.20201225 4.1.2.6.2","report_account":"<redacted>","online":"1","initialized":"1","net_version":"0.0.2.22I_6.8F_homekit_2.0.9_s2","rf_version":"BG_U-ITR-F1-BD_BL.A30.20201225","zigbee_version":"4.1.2.6.2","z_wave_version":"","timezone":"America\/Los_Angeles","ac_fail":"0","battery":"0","ip":"192.168.2.110","jam":"0","rssi":"1","is_real":"1","setup_zone_1":"1","setup_zone_2":"1","setup_zone_3":"1","setup_zone_4":"1","setup_zone_5":"1","setup_zone_6":"1","setup_zone_7":"1","setup_zone_8":"1","setup_zone_9":"1","setup_zone_10":"1","setup_gateway":"1","setup_contacts":"1","setup_billing":"1","setup_users":"1","is_cellular":"0","plan_set_id":"8","dealer_id":"0","tz_diff":"-8:00","model":"F1","gateway_model":"ABGW-2","has_wifi":"0","has_s2_support":"0","mode":{"area_1":"home","area_1_label":"Home","area_2":"standby","area_2_label":"Standby"},"areas":{"1":{"modes":{"0":{"area":"1","mode":"0","read_only":"1","is_set":"1","name":"standby","color":null,"icon_id":null,"entry1":null,"entry2":null,"exit":null,"icon_path":null},"1":{"area":"1","mode":"1","read_only":"1","is_set":"1","name":"away","color":null,"icon_id":null,"entry1":"60","entry2":"60","exit":"60","icon_path":null},"2":{"area":"1","mode":"2","read_only":"1","is_set":"1","name":"home","color":null,"icon_id":null,"entry1":"10","entry2":"60","exit":"0","icon_path":null},"3":{"area":"1","mode":"3","read_only":"0","is_set":"0","name":null,"color":null,"icon_id":null,"entry1":"60","entry2":"60","exit":"60","icon_path":null},"4":{"area":"1","mode":"4","read_only":"0","is_set":"0","name":null,"color":null,"icon_id":null,"entry1":"60","entry2":"60","exit":"60","icon_path":null}}},"2":{"modes":{"0":{"area":"2","mode":"0","read_only":"1","is_set":"1","name":"standby","color":null,"icon_id":null,"entry1":null,"entry2":null,"exit":null,"icon_path":null},"1":{"area":"2","mode":"1","read_only":"1","is_set":"1","name":"away","color":null,"icon_id":null,"entry1":"60","entry2":"60","exit":"60","icon_path":null},"2":{"area":"2","mode":"2","read_only":"1","is_set":"1","name":"home","color":null,"icon_id":null,"entry1":"60","entry2":"60","exit":"60","icon_path":null},"3":{"area":"2","mode":"3","read_only":"0","is_set":"0","name":null,"color":null,"icon_id":null,"entry1":"60","entry2":"60","exit":"60","icon_path":null},"4":{"area":"2","mode":"4","read_only":"0","is_set":"0","name":null,"color":null,"icon_id":null,"entry1":"60","entry2":"60","exit":"60","icon_path":null}}}}} 2023-02-02 10:07:16 ERROR (SocketIOThread) [jaraco.abode.socketio] Captured exception during SocketIO event callback: 'NoneType' object has no attribute 'replace' Traceback (most recent call last): File "/Users/evan.moses@okta.com/dev/jaraco.abode/abode/lib/python3.10/site-packages/jaraco/abode/socketio.py", line 316, in _handle_event callback(*args) File "/Users/evan.moses@okta.com/dev/jaraco.abode/abode/lib/python3.10/site-packages/jaraco/abode/event_controller.py", line 243, in _on_mode_change alarm_device = self._client.get_alarm(refresh=True) File "/Users/evan.moses@okta.com/dev/jaraco.abode/abode/lib/python3.10/site-packages/jaraco/abode/client.py", line 274, in get_alarm return self.get_device(ALARM.id(area), refresh) File "/Users/evan.moses@okta.com/dev/jaraco.abode/abode/lib/python3.10/site-packages/jaraco/abode/client.py", line 231, in get_device device.refresh() File "/Users/evan.moses@okta.com/dev/jaraco.abode/abode/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 95, in refresh response_object = super().refresh(url) File "/Users/evan.moses@okta.com/dev/jaraco.abode/abode/lib/python3.10/site-packages/jaraco/abode/devices/base.py", line 111, in refresh self.update(device) File "/Users/evan.moses@okta.com/dev/jaraco.abode/abode/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 102, in update super().update(state_from_panel(state, area=self._area)) File "/Users/evan.moses@okta.com/dev/jaraco.abode/abode/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 26, in state_from_panel alarm_state['uuid'] = alarm_state.get('mac').replace(':', '').lower() AttributeError: 'NoneType' object has no attribute 'replace'

@evanmoses-okta
Copy link

I'm gonna post this as an issue to that repo.

@SamB-GB
Copy link

SamB-GB commented Feb 3, 2023

I just wanted to chime in that I am seeing the same issue.

@whereizben
Copy link

whereizben commented Feb 3, 2023

I am having the same issue after upgrade to core 2.0, and it has persisted with core 2.1

Logger: jaraco.abode.socketio
Source: /usr/local/lib/python3.10/site-packages/jaraco/abode/socketio.py:335
First occurred: 05:54:06 (1 occurrences)
Last logged: 05:54:06

Captured exception during SocketIO event callback: 'NoneType' object has no attribute 'replace'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/socketio.py", line 331, in _handle_event
callback(event_data)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/event_controller.py", line 243, in _on_mode_change
alarm_device = self._client.get_alarm(refresh=True)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/client.py", line 274, in get_alarm
return self.get_device(ALARM.id(area), refresh)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/client.py", line 231, in get_device
device.refresh()
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 97, in refresh
response_object = super().refresh(url)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/base.py", line 111, in refresh
self.update(device)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 104, in update
super().update(state_from_panel(state, area=self._area))
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 26, in state_from_panel
alarm_state['uuid'] = alarm_state.get('mac').replace(':', '').lower()
AttributeError: 'NoneType' object has no attribute 'replace'

@wtadler
Copy link

wtadler commented Feb 3, 2023

Can also confirm this issue with 2023.2.0. Fixed it by downgrading to 2023.1.

@evanmoses-okta
Copy link

I submitted a PR that should fix this in the library, jaraco/jaraco.abode#22. Once that's merged it'll have to be pulled into HA.

@evanmoses-okta
Copy link

@jaraco Addressed this and released 3.2.2, @tradel can you pull in the new version?

@TBE4034
Copy link

TBE4034 commented Feb 5, 2023

@evanmoses-okta I have tested with 2023.2.2 and still have the same issue.

Current Version: 2023.2.2

2023-02-05 11:07:53.551 ERROR (SocketIOThread) [jaraco.abode.socketio] Captured exception during SocketIO event callback: 'NoneType' object has no attribute 'replace'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/socketio.py", line 331, in _handle_event
callback(event_data)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/event_controller.py", line 243, in _on_mode_change
alarm_device = self._client.get_alarm(refresh=True)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/client.py", line 274, in get_alarm
return self.get_device(ALARM.id(area), refresh)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/client.py", line 231, in get_device
device.refresh()
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 97, in refresh
response_object = super().refresh(url)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/base.py", line 111, in refresh
self.update(device)
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 104, in update
super().update(state_from_panel(state, area=self._area))
File "/usr/local/lib/python3.10/site-packages/jaraco/abode/devices/alarm.py", line 26, in state_from_panel
alarm_state['uuid'] = alarm_state.get('mac').replace(':', '').lower()
AttributeError: 'NoneType' object has no attribute 'replace'

@jaraco
Copy link
Contributor

jaraco commented Feb 5, 2023

It looks like you still have an older version of jaraco.abode. 3.2.2 doesn't have that behavior on that line:

https://github.com/jaraco/jaraco.abode/blob/v3.2.2/jaraco/abode/devices/alarm.py#L26

@jaraco
Copy link
Contributor

jaraco commented Feb 5, 2023

Looks like the project still depends on 3.2.1:

jaraco.abode==3.2.1

zim514 pushed a commit to zim514/home-assistant-core that referenced this issue Feb 5, 2023
@zim514 zim514 mentioned this issue Feb 5, 2023
19 tasks
@frenck frenck closed this as completed in a61e87c Feb 6, 2023
Cereal2nd pushed a commit to Cereal2nd/home-assistant that referenced this issue Feb 6, 2023
@kmechmet
Copy link

kmechmet commented Feb 7, 2023

I am very new to Home Assistant but being able to integrate my Abode system with it was a big reason for getting started with it. I know very little about coding so I don't really understand much but thank you for any and all who are keeping Abode integrating functioning. The alarm state not updating was very confusing for me as I had thought I had set everything up correctly and had a scene switcher so my wife could easily secure the house at night but it wasn't quite working unless I reloaded the integration. So far so good, and thank you. I hope to be able to contribute one day to such an amazing feat of human cooperation happening with HA

balloob pushed a commit that referenced this issue Feb 7, 2023
@nathang21
Copy link

2022.2.3 didn't seem to change anything for me, same errors. Can we re-open this?

Rolling back to 2023.1.x still sufficient in meantime.

@wtadler
Copy link

wtadler commented Feb 11, 2023

It fixed it for me...

@emoses
Copy link

emoses commented Feb 12, 2023

2022.2.3 fixed this for me. @nathang21 are you still seeing exceptions in the logs with 2022.2.3?

@nathang21
Copy link

Weird, after upgrading again, it does indeed seem to be working. Perhaps I just needed another HA restart. Thanks folks.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.