Coder Social home page Coder Social logo

Comments (24)

ToddGreenfield avatar ToddGreenfield commented on July 1, 2024

@durosity What does your config file look like? Can you attache or paste it in. Also, are you able to use an iOS app like AllSecure and see/verify which zones are where. Also, what if anything is in your logfile? Any errors or oddness?

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

@ToddGreenfield

Yeah i can confirm the zones, i also connect my primary HA controller (Indigo) via an IT100 so i can log what zones are doing exactly as it happens.

Nothing beyond the usual logging appears in the terminal - each zone, regardless of being listed in the config shows up as they open and close and the panel reports its new status.

Relevant part of config file:

            {
              "platform": "Envisalink",
              "host": "192.168.1.014",
              "deviceType": "DSC",
              "password": "XXX",
              "pin": "1234",
              "suppressZoneAccessories": false,
              "partitions": [
                {
                  "name": "House"
                }
              ],
              "zones": [
                {
                  "name": "Front Door",
                  "type": "door",
                  "partition": 1,
                  "zoneNumber": 1
                },
                {
                  "name": "Living Room Motion",
                  "type": "motion",
                  "partition": 1,
                  "zoneNumber": 3
                }
              ],
              "userPrograms": [
                {
                  "name": "Living Room Window",
                  "type": "window",
                  "partition": 1,
                  "zoneNumber": 5
                }
              ]
            }
    ]

}

from homebridge-envisalink.

ToddGreenfield avatar ToddGreenfield commented on July 1, 2024

@durosity Do you have any legitimate non-consecutive zones? What happens when you put all your active zones in the config.json? Does each report accurately?

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

Yes, Zone 2 is disabled at the panel. And yes, when all are listed they all show up and activity is associated with the correct zones on home kit devices. As best i can tell it's just ignoring the "zoneNumber" field. Behaviour is identical regardless of it being present or not, at least to the best of my knowledge.

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

Snippet of log from terminal:

Zone 005 is open
Partition 1 is Ready and Force Arming is Enabled
[26/10/2017, 23:39:03] [Envisalink] Partition status changed to: { partition: 1, code: '653' }
[26/10/2017, 23:39:03] [Envisalink] Getting current ready state...
[26/10/2017, 23:39:03] [Envisalink] Current ready state is {"zone":{"1":{"send":"restore","name":"Zone Alarm Restore","code":"61000128"},"2":{"send":"restore","name":"Zone Alarm Restore","code":"61000229"}},"partition":{"1":{"send":"readyforce","name":"Partition Ready - Force Arming Enabled","code":"6531CF"}},"user":{}}
Set status on accessory House to {"name":"Partition Ready - Force Arming Enabled","pre":"Partition","bytes":1,"post":"is Ready and Force Arming is Enabled","send":"readyforce","action":"updatepartition"}
Zone 005 is restored
Partition 1 Ready
[26/10/2017, 23:39:13] [Envisalink] Partition status changed to: { partition: 1, code: '650' }
[26/10/2017, 23:39:13] [Envisalink] Getting current ready state...
[26/10/2017, 23:39:13] [Envisalink] Current ready state is {"zone":{"1":{"send":"restore","name":"Zone Alarm Restore","code":"61000128"},"2":{"send":"restore","name":"Zone Alarm Restore","code":"61000229"}},"partition":{"1":{"send":"ready","name":"Partition Ready","code":"6501CC"}},"user":{}}
Set status on accessory House to {"name":"Partition Ready","pre":"Partition","bytes":1,"post":"Ready","send":"ready","action":"updatepartition"}
^C[26/10/2017, 23:39:38] Got SIGINT, shutting down Homebridge...
aardvark:~ BOB$ npm view homebridge-envisalink version
0.2.0

In that example opening the window (zone 5) will show up in the home app as Lounge motion (Zone 3) and i can confirm via my other system that Zone 5 does open, not zone 3.

It's not a crucial issue for me, i can just list all the zones then dump the unused one in a folder - I just wanted to report the issue in case it caused problems for other users. (Of course it would be nice to not have to do that for tidiness reasons)

from homebridge-envisalink.

dstapleton92 avatar dstapleton92 commented on July 1, 2024

@durosity I noticed you said you upgraded. I tested the non-consecutive zone code thoroughly for a from-scratch setup. My suspicion is that this may have something to do with persisted accessories / already being in the Home app. Does anyone have any thoughts on this?

from homebridge-envisalink.

ToddGreenfield avatar ToddGreenfield commented on July 1, 2024

@durosity @dstapleton92 Sounds plausible to me. I tested mine on a brand new build as well since I did not want to mess up my production system. I have not had a chance to apply the new version yet but should be able to do it this weekend, and that would give me a chance to test the theory as I have 3 unused zones in my config (and associated dead sensors in homekit).

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

Never thought about the persistence. I could try removing the bridge from Home app, delete the files and start afresh (most of my homebridge devices come from a separate install so it wouldn’t cause much trouble)

from homebridge-envisalink.

ToddGreenfield avatar ToddGreenfield commented on July 1, 2024

I just updated a number of components, mainly node to v8.9. I had to uninstall homebridge and all plugins and reinstall do to the newer version of node needing a recompile. After fixing a few items, I updated the config.json and removed the non-consecutive zones and added the new zone parameter. The plugin works as intended. I can also confirm activity for zones before and after the non-consecutive zones work as well.
@durosity the only thing I can think of now is to verify you have the correct version of the envisalink plugin... otherwise delete the persist/accessories directory and start fresh.

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

Alas tried that and still no joy. It’s version 0.2.0:

aardvark:~ Mike$ npm view homebridge-envisalink version
0.2.0

Homebridge itself is up to date. I’m plumb outta ideas. It’s not important, I can list all the zones and just stick the unused ones in another folder.. it’s more just the oddity of it that bugs me.

On a side note what is this UserPrograms section of the config file all about as anything I list in there is completely ignored?

from homebridge-envisalink.

ToddGreenfield avatar ToddGreenfield commented on July 1, 2024

Is it installed globally? With the -g flag? Be sure you check that one-

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

Aha I think you’re onto something, I realised a copy had been installed without -g. I’ve removed that and now it does appear to be starting up using the global copy, but I’m now getting this error:

[11/11/2017, 20:16:01] [Envisalink] Initializing Envisalink platform...
[11/11/2017, 20:16:01] [Envisalink] Configuring Envisalink platform, Host: 192.168.1.014, port: undefined, type: DSC
[11/11/2017, 20:16:01] [Envisalink] Starting node alarm proxy...
[11/11/2017, 20:16:01] [Envisalink] Zones: 2
[11/11/2017, 20:16:01] [Envisalink] User Programs: 1
[11/11/2017, 20:16:01] [Envisalink] Node alarm proxy started. Listening for connections at: 0.0.0.0:4026
/opt/local/lib/node_modules/homebridge-envisalink/index.js:252
callback(this.platformPartitionAccessories.concat(Object.values(this.platformZoneAccessories)).concat(this.platformProgramAccessories));
^

TypeError: Object.values is not a function
at EnvisalinkPlatform.accessories (/opt/local/lib/node_modules/homebridge-envisalink/index.js:252:62)
at Server._loadPlatformAccessories (/opt/local/lib/node_modules/homebridge/lib/server.js:363:20)
at Server._loadPlatforms (/opt/local/lib/node_modules/homebridge/lib/server.js:307:16)
at Server.run (/opt/local/lib/node_modules/homebridge/lib/server.js:85:36)
at module.exports (/opt/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/opt/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

from homebridge-envisalink.

ToddGreenfield avatar ToddGreenfield commented on July 1, 2024

Upgrade node to > 7.x

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

Aha, I thought I had but I hadn’t.

Working now… except.. it doesn’t seem to recognise any zones in double digits. so 1-8 work fine, but I’ve got 45 zones and none of the ones I’ve tried over 10 report as triggered in the home app. (they do report in Homebridge:

Zones listed in the config report in Homebridge as:
Zone 037 is open
Partition 1 is Ready and Force Arming is Enabled
Setting Obstructed false

Zones that aren’t listed in the config file just report as:
Zone 025 is open
Zone 025 is restored

from homebridge-envisalink.

ToddGreenfield avatar ToddGreenfield commented on July 1, 2024

Let’s see your config-

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

Current config. I’ve also tried listing them under userPrograms but no difference.

           {
              "platform": "Envisalink",
              "host": "192.168.1.014",
              "deviceType": "DSC",
              “password": "Xxx",
              “pin": "xxx",
              "suppressZoneAccessories": false,
              "partitions": [
                {
                  "name": "House"
                }
              ],
              "zones": [
                {
                  "name": "Front Door",
                  "type": "door",
                  "partition": 1,
                  "zoneNumber": 1
                },
                {
                  "name": "Hall Motion",
                  "type": "motion",
                  "partition": 1,
                  "zoneNumber": 3
                },                 
                {
                  "name": "Lounge Motion",
                  "type": "motion",
                  "partition": 1,
                  "zoneNumber": 5
                },
                {
                  "name": "Lounge Window",
                  "type": "window",
                  "partition": 1,
                  "zoneNumber": 6
                },
                {
                  "name": "Garage Motion",
                  "type": "motion",
                  "partition": 1,
                  "zoneNumber": 7
                },
                {
                  "name": "Dining Patio Door Lock Sensor",
                  "type": "door",
                  "partition": 1,
                  "zoneNumber": 16
                },
                {
                  "name": "Landing Motion",
                  "type": "motion",
                  "partition": 1,
                  "zoneNumber": 25
                },
                {
                  "name": "Study Motion",
                  "type": "motion",
                  "partition": 1,
                  "zoneNumber": 37
                }
              ],
              "userPrograms": [
              ]
            }
    ]

}

from homebridge-envisalink.

ToddGreenfield avatar ToddGreenfield commented on July 1, 2024

Not sure what to suggest next. It should work.
The user programs are programmed in your panel, if you don’t have any I don’t think putting an entry in the config will do anything. I do not use them-

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

Indeed it’s odd.. I’d expect it to work for all of them, not just the first few.. could it be something to do with double digits? I’ll try removing the zone number field tomorrow and create entries for all the zones 1-20 and see if it reports those correctly then I’ll post my results.

from homebridge-envisalink.

dstapleton92 avatar dstapleton92 commented on July 1, 2024

I'm not sure what could be going on here. My setup includes double-digit zones and I have skipped zone numbers as well. I'm not running into the issue you described. On another note, I have submitted a pull request for this project to merge in some updates I've made:

  • Fixes a date/time issue where the plugin sets the wrong date on the alarm panel (visible on full-text keypads)
  • Accomplishes non-consecutive zone handling without the use of Object.values, thus supporting older versions of Node.

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

FYI I’ve changed my file to remove the zoneNumber parameter and it works flawlessly for all zones up to and including 45. I can leave it like this and just stick the unused zones in a misc folder but of course won’t satisfy my curiosity as to whats causing it.

from homebridge-envisalink.

ToddGreenfield avatar ToddGreenfield commented on July 1, 2024

@durosity what are you running on? Rpi or Mac? Curious if you may have any odd special characters inadvertently in your config, perhaps from a cut/paste...?
Also, I am unable to do this now but you could try and insert logging lines where the zone assignment happens and display both the value and type for the zoneNum, maxZone and zone.zonenumber variables- in and around where “if (!config.suppressZoneAccessories)” is found (I am on my phone so no line nums). My guess is something could be awry there for you...

from homebridge-envisalink.

dstapleton92 avatar dstapleton92 commented on July 1, 2024

@durosity I found it! I have opened a pull request to solve this issue (hopefully!) once and for all. If you're curious, there is an explanation of the cause in the pull request: #24

from homebridge-envisalink.

dustindclark avatar dustindclark commented on July 1, 2024

from homebridge-envisalink.

durosity avatar durosity commented on July 1, 2024

@dstapleton92 aha most excellent. I thought i was going crazy!
@ToddGreenfield thanks for all your assistance, i had a lot wrong with my config that's fixed now thanks to you!

from homebridge-envisalink.

Related Issues (20)

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.