Sector Alarm


#21

@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?


#22

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


#23

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


#24

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

#25

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.


#26

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…


#27

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!


#28

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


#29

@endor Thanks, now it works! As it was set as “optional” I pressumed that I could leave it out completely.


#30

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.


#31

It should be optional, I’ll fix that!


#32

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?


#33

@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.


#34

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?


#35

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


#36

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).


#37

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


#38

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?


#39

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


#40

@Jesperj, @donjohann
Does your alarm_id start with a zero?
Try:
alarm_id: “xxxxxxx”