Git Product home page Git Product logo

homebridge-sector's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

homebridge-sector's Issues

Configuration missing

Hi there @frli4797 ,

I have installed the plugin in Homebridge, but you have not yet added the configuration to the readme, so I can't get this up and running. This is the one that they use for the verisure plugin, I assume it is something very similar, but if one do not figure out the exact wording for the platform key, then the homebridge service goes into a continous reboot during startup. Can you enlighten me what to use?

"platforms": [
  {
    "platform" : "verisure",
    "name" : "Verisure",
    "email": "[email protected]",
    "password": "yourT0p5ecre7Passw0rd",
    "alarmCode": "0000",
    "doorCode": "000000",
    "pollInterval": 60
  }
]

"Error Loading Plugin" after adding the example accessory to the config

I have added your full example, change the email, password and panel code. After removing the inline comments I then hit Save. But the log is filling up with the below errors.

[2018-11-21 21:43:43] ====================
[2018-11-21 21:43:43] ERROR LOADING PLUGIN homebridge-sector:
[2018-11-21 21:43:43] Error: Cannot find module 'polling-to-event'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/homebridge/node_modules/homebridge-sector/index.js:3:22)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Plugin.load (/usr/local/lib/node_modules/homebridge/lib/plugin.js:72:23)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:149:14)
    at Array.forEach (<anonymous>)
    at Server._loadPlugins (/usr/local/lib/node_modules/homebridge/lib/server.js:141:22)
[2018-11-21 21:43:43] ====================
[2018-11-21 21:43:43] Loaded plugin: homebridge-config-ui-x
[2018-11-21 21:43:43] Registering platform 'homebridge-config-ui-x.config'
[2018-11-21 21:43:43] ---
[2018-11-21 21:43:43] Loading 4 platforms...
[2018-11-21 21:43:43] [LiFx] Initializing LifxLan platform...
[2018-11-21 21:43:43] [Harmony Hub] Initializing HarmonyHub platform...
[2018-11-21 21:43:43] [homebridge-plex-sensors.Plex] Initializing homebridge-plex-sensors.Plex platform...
[2018-11-21 21:43:43] [Ringklocka] Initializing ring-video-doorbell platform...
[2018-11-21 21:43:43] Loading 2 accessories...
[2018-11-21 21:43:43] [Agaton Sax] Initializing HomebridgeAutomower accessory...
[2018-11-21 21:43:43] [Agaton Sax] myAutoMower
[2018-11-21 21:43:43] [Agaton Sax] authenticate
[2018-11-21 21:43:43] [Agaton Sax] getServices

/usr/local/lib/node_modules/homebridge/lib/api.js:64
      throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
            ^
Error: The requested accessory 'Sector-SecuritySystem' was not registered by any plugin.
    at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:64:13)
    at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:286:42)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:87:38)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:45:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

Homebridge-sector can provide more HomeKit data, but doesn't

The sectoralarm-package used by homebridge-sector has APIs to obtain sensor-data, namely temperatures in various rooms. From https://github.com/perbrage/sectoralarm#usage-example:

        await site.temperatures()
            .then(console.log);

        await site.temperatures(sensorId)
            .then(console.log);

As seen in some other Homebridge packages, taking this kind of info and publishing it as a HomeKit Thermometer is actually really simple:

https://github.com/YinHangCode/homebridge-raspberrypi-temperature/blob/17dbf7c89ec777a450a1d8aa6cca9fb783c3df99/index.js#L72-L80

Maybe this functionality could be added to homebridge-sector too?

Additional comments

Great work so far. I recommend adding an additional comment to the config. I have yet to figure out how to find my "site ID" which you mention. I can't find it in the manual, on the panel itself (have not removed it from the wall to check the backside though as I am afraid to trip some kind of alarm), nor by logging into minasidor.sectoralarm.se. How did you find yours? Is it the 8 digits in the URL after I login to Mina Sidor?

Homebridge-sector breaks due to outdated version of sectoralarm-package

Homebridge-sector breaks on start with an error-message about an API error which seems to be resolved in latest sectoralarm-package:

[11/2/2019, 11:43:05 AM] [Home security] Cannot create property 'lastInteractionBy' on string 'INVALID_VERSION'
[11/2/2019, 11:43:05 AM] [Home security] undefined
(node:1763) UnhandledPromiseRejectionWarning: TypeError: Cannot create property 'lastInteractionBy' on string 'INVALID_VERSION'
    at /usr/lib/node_modules/homebridge-sector/node_modules/sectoralarm/lib/site.js:30:40
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:1763) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1763) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Using the default boilerplate/example for sectoralarm directly I get the expected output:

$ node index.js 
{ siteId: '234798432',
  name: 'Mitt alarmsystem',
  partialArmingAvailable: true,
  annexArmingAvailable: false,
  locksAvailable: false,
  smartPlugsAvailable: false,
  temperaturesAvailable: true,
  camerasAvailable: false,
  locks: [],
  temperatures: [ {}, {} ],
  smartPlugs: [],
  cameras: [] }
{"siteId":"234798432","name":"Mitt alarmsystem","armedStatus":"disarmed","annexArmedStatus":"unknown"}
{ siteId: '234798432',
  name: 'Mitt alarmsystem',
  armedStatus: 'disarmed',
  annexArmedStatus: 'unknown' }
[ { time: '2019-11-02 06:44:17', action: 'disarmed', user: 'M' },
  { time: '2019-11-01 22:04:41', action: 'partialArmed', user: '' },
  { time: '2019-10-30 06:49:49', action: 'disarmed', user: '3' },
  { time: '2019-10-29 21:40:31', action: 'partialArmed', user: '' },
  { time: '2019-10-29 16:21:21', action: 'disarmed', user: '3' },
  { time: '2019-10-29 07:19:48', action: 'armed', user: '' },
  { time: '2019-10-29 06:03:34', action: 'disarmed', user: 'M' },
  { time: '2019-10-28 22:17:42', action: 'partialArmed', user: '' },
  { time: '2019-10-28 16:19:13', action: 'disarmed', user: '3' },
  { time: '2019-10-28 07:11:48', action: 'armed', user: '' } ]
[ { sensorId: '2250103710E', name: 'stue', temperature: '23' },
  { sensorId: '2250103711D', name: 'kjeller ', temperature: '24' } ]

Basically, the underlying package works 100% for all my use-cases, which are more use-cases then the ones currently used by homebridge-sector.

This leads me to believe that simply upgrading the sectoralarm-package to the latest version (and fix up API-invocations where required) might be sufficient to fix this error.

No response from alarm

Hi @frli4797
I'm trying to get the plugin to work with my home alarm but I only get "No response" from the device in my Home app.
Are there anything logged or any way of trying to figure out why the connection is not working?

No update found after your latest changes

Hey there,

I see you made some changes today, but the version in the package is still 0.0.1, so Homebridge does not give me an update option. Was the changes so small that no update is needed, or did you forget to increment the version number?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.