Securitas Direct (Verisure EU) Custom Component [TESTERS WANTED]

Hi,

i ran a test to see if V102 was working with my config and got the following error message:
Failed config
General Errors:
- Component error: securitas_direct - No module named ‘xmltodict’

I’m deferring the update of HASSIO…
This component is great, my wife has been using it a lot and she prefers Hassio to the Securitas app.

Thanks

M

Thanks @Marco_Elgordo

Maybe error only appear first time because start entity before required packages are installed.

I like lovelace card too. I am changing worst securitas keyboard for a tablet in kiosk Mode with HA

from today i have this error.


Fri Nov 22 2019 14:04:22 GMT+0100 (hora estándar de Europa central)
Error during setup of component securitas_direct
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 176, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/securitas_direct/init.py”, line 64, in setup
HUB.update_overview()
File “/usr/src/homeassistant/homeassistant/util/init.py”, line 240, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/securitas_direct/init.py”, line 107, in update_overview
self.overview = self.session.last_state()
File “/config/custom_components/securitas_direct/securitas.py”, line 111, in last_state
regs= res[‘PET’][‘LIST’][‘REG’]
KeyError: ‘REG’

worked pefectly yesterday… something change??

Working again!

Hi,

Are you able to let me know exactly where i need to update. I just want to make sure i have done all correct as i am still facing issues.

I am wondering if it is because i have multiple sites within the same app?

Cheers

Ross

@jezzard
Maybe the integration can fails with more than one home alarm. I cant test it, to work with multiple alarm. If you want, you could send me private message to debug how a multi-home account (more than one alarm) can work.

I have intended to get only the first alarm found, but maybe it can fails somewhere.

Hi,

Just put your username and password and whatever code you want

securitas_direct:
username: marco
password: tomorrowmorning
country: GB
code: 1234

I did have country and code the opposite way but that made no difference.

image

Hi,

Have you downloaded the latest version from Github and pasted it in /Custom_components/securitas_direct?
Regards,

M

Yes i did that just before i replied to you to be 100% sure

Hi,

The component did not work for me when I upgraded to HASSIO V103
I reverted back to 102.3 as I cannot live without this component :slight_smile:
Cheers.

M

Mine is not working neither after the 103 hassio release. :sleepy:

Hi,
Mine worked like a charm until I upgraded Hassio to 0.103.
As Marco, I had to downgrade to 0.102.3 to get it back online :face_with_raised_eyebrow:
Cheers

Sorry about that.
Maybe I can try v.103 next week to see what has broken. Meanwhile, downgrade to v.102

Here you are the release notes:

Log error message:

Error while setting up platform securitas_direct
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/securitas_direct/alarm_control_panel.py”, line 41, in setup_platform
alarms.append(SecuritasAlarm())
TypeError: Can’t instantiate abstract class SecuritasAlarm with abstract methods supported_features

Hello.

It seems last HA version breaks a lot of the alarms from custom components.

You can also check the same issue in the Alexa Media Player custom component post:

And also the Visonic component that I use:

By the way, the new custom component works as a charm… the only request I have (if possible) is to enable the repository to be added to HACS integration, that way we can update, downgrade or keep track of this component from there.

Best regards.

1 Like

Hi,

great work and great idea to use the mobile API!

Question to all of you testers, how responsive is this?
Is it “sometimes instant sometimes 28 seconds” or it it “almost live”?

I’m asking since automations when entering the house and/or disarming is quite time sensitive. No one wants to wait 28 seconds for the light to turn on in the hallway :slight_smile:

This looks great! are you able to integrate this in HACS so we can pull it from there?

As the breaking change of 103 release on the alarm_control_panel impacted all projects based on such component I was able to find the fix in other component and applied that successfully to our Securitas one. Changes in “alarm_control_panel.py” are as follows:

  • Add inmediately below of the STATE_ALARM const import:
    from homeassistant.components.alarm_control_panel.const import (
        SUPPORT_ALARM_ARM_AWAY,
        SUPPORT_ALARM_ARM_HOME,
        SUPPORT_ALARM_ARM_NIGHT,
    )
  • Add at the bottom:
    @property
    def supported_features(self) -> int:
        """Return the list of supported features."""
        return SUPPORT_ALARM_ARM_HOME | SUPPORT_ALARM_ARM_AWAY | SUPPORT_ALARM_ARM_NIGHT

If you do not have a minimal code skill it is probably better to wait until our friend @segalion make the change in the code in github and you can download the fixed version.

I also vote for the inclussion of our Securitas component in HACS. Unfortunately now I do not have time to look to that and contribute.

2 Likes