Sector Alarm

@mgejke I just tried to run the Sector app on my phone at it could not get status from my central at home so I quickly gathered that this was not a HA issue but an issue with the alarm system itself. When I called Sector I complained about their app, no info about HA at all :roll_eyes: Good secrets are best kept well hidden imho :smiley: :smiley:

The stated that my central was ā€œofflineā€. Whatever that means. The central is GSM based. What they did I do not know but suddenly it worked again. The probably booted it or something similar.

Mains and mainsrestore might be if the central looses power from the mains in the house. I know that the system puts out alarms on both loosing power, low battery on devices and more. This data is relayed to Sector and not to the user/app or similar. Not sure if the log entries you see could be related?

Just tried this on Hass.io with 0.59.2 and works fine so far.
Does not need any hacks or add-onsā€¦

Instructions for hass.io:

  1. Download hass-sectoralarm and asyncsector
  2. Create a new folder in hass io config folder called custom_components
  3. Put the content from hass-sectoralarm and the folder asyncsector from asyncsector in to the newly created folder.
  4. Edit configuration.yaml and add the settingsā€¦ here is an example
    sector_alarm:
      email: [email protected]
      password: 12345678
      alarm_id: 12345678
      code: 00000
      thermometers: true
      alarm_panel: true

This is how the custom_components folder look:
hass-sector

2 Likes

Great that it works!
However, you shouldnā€™t have to download asyncsector, home assistant should handle that dependency by itself.

I have tried this too and it works! I have been looking for this functionality a long time, thanks!
However, I can confirm that asyncsector folder needs to be in custom_components on a hass.io install.

One questions though:
How do I show the attributes last_changed and changed_by in the UI?
I have added the following to my customize.yaml, but nothing shows.

  show_last_changed: true
  show_changed_by: true

Ok, my bad. Forgot state-card-custom-ui. But now I am trying to show both last_changed and changed_by like this:

  custom_ui_state_card: state-card-custom-ui
  extra_data_template: ${attributes.last_changed} av ${attributes.changed_by}

But it show ā€œundefined by [username]ā€, so last_changed doesnā€™t work.

Havenā€™t actually tried hass.io, I just assumed it would resolve dependencies like a plain HA-install would, but if you say asyncsector-folder is needed Iā€™ll trust you :slight_smile:

There is no last_changed attribute on the alarm component. Where did you get that from? I guess it could be addedā€¦

Hi!
@mgejke great addon to HA!

Must admit that Iā€™m a bit new to this but appreciate if any help can be provided.
Iā€™ve added the components according to @endor instructions but get the following error:

Error during setup of component sector_alarm
Traceback (most recent call last):
File ā€œ/usr/lib/python3.6/site-packages/homeassistant/setup.pyā€, line 190, in _async_setup_component
result = yield from component.async_setup(hass, processed_config)
File ā€œ/config/custom_components/sector_alarm.pyā€, line 83, in async_setup
CONF_CODE: config[DOMAIN][CONF_CODE]
KeyError: ā€˜codeā€™

Iā€™m running Hassio, 0.60.1 and added asyncsector to the custom_components folder as well.

Any thoughts on how to get this fixed?

Thanks!

Have you entered the configuration.yaml data. Seems like something could be wrong with that and specifically the content or lack of code: parameter?

@endor Thanks, now it works! As it was set as ā€œoptionalā€ I pressumed that I could leave it out completely.

Hmm yes, that is strange.
You could enter 0000 as code if you donā€™t plan to use homeassistant for arming or disarming your alarm, that way you will never expose your pin in a text file.

It should be optional, Iā€™ll fix that!

1 Like

Hi!
Would be very very nice! ā€¦If only I could get it to work. :slight_smile:

No AlarmPanel on first page. No Entities under states-page. Only visible i could find is ā€˜Sector Alarm 1234567ā€™ under History with status ā€˜unkownā€™. Zero errors in home-assistant.log

Running Hass.io 0.60 and since today 0.60.1.
Have been following endorā€™s instructions.

configuration.yaml contains the following:
sector_alarm:
email: [email protected]
password: zxczxc
alarm_id: 0987654
code: 1234
thermometers:
alarm_panel:

Files in config/custom_components/:
image

Files in config/custom_components/asyncsector/

Files in config/custom_components/asyncsector/asyncsector/:
image
I Copied this files to the previous folder just to be on the safe side.

Iā€™m sure the alarm_id is the right one. Any idea what i can try next?

@Jesperj
Donā€™t know whatā€™s wrong really, but you can try this:

Remove thermometers and the alarm_panel lines from your config.

Also, dont copy the files from config/custom_components/asyncsector/asyncsector/ to the upper folder.

Thanks for a great component, I have been looking a long time for a way to integrate Sector Alarm into HA!
Would it also be possible to add door sensors?

I have the same issue as @Jesperj. Tried on both HA and Hass.io.

I donā€™t think so, from what Iā€™ve seen thereā€™s no information about the door sensors on their homepage(might have changed). And anyhow, since it keeps up with Sector Alarm by polling, it might as well miss that a door was open(unless thereā€™s some kind of history).

What kind of sensors and equipment from Sector Alarm do you have?

Hi,
Iā€™m new to HASS and decided to go the hass.io way. However I canā€™t get this to work. The home-assistant.log has some entries:
https://pastebin.com/amLWm7xd

In the supervisor log
https://pastebin.com/s6EdWwvz

Iā€™m running Hass.io version 0.62.0.

I have copies the files into custom_components folder. Added the configuration into configuration.yaml.

Any ideas?

@Browall
Seems to be trying to fetch temperatures but failing, try setting
thermometers: false
in your config.

@Jesperj, @donjohann
Does your alarm_id start with a zero?
Try:
alarm_id: ā€œxxxxxxxā€