Coder Social home page Coder Social logo

Comments (53)

kieranmjones avatar kieranmjones commented on September 4, 2024 5

It sounds like there is a fairly good integration working here, I'm happy to integrate that into a release if others are? I kind of wanted full integration with ability to control arming but if you're happy with it being status only then I am as well. Perhaps submit a PR with some documentation and clear caveats that it's status only at this time?

from homebridge-texecom.

nathsea avatar nathsea commented on September 4, 2024 2

Hi guys don’t suppose there has been any update on this ? Moving to an “official” release 😬👍

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024 1

Amazeballs. Am looking at this now and it's starting to work. What's that "U" status update between the "A" and the "D" I wonder? Does the A definitely mean armed rather than arming?

[4/4/2019, 8:41:56 PM] [Texecom] IP data received: "Z0110
[4/4/2019, 8:41:56 PM] [Texecom] Zone update received for zone 11 active: false
[4/4/2019, 8:41:56 PM] [Texecom] Zone match found, updating zone status in HomeKit to false
[4/4/2019, 8:41:56 PM] [Texecom] Dwell = 1000
[4/4/2019, 8:41:56 PM] [Texecom] Changing state with changeHandler to false
[4/4/2019, 8:42:04 PM] [Texecom] IP data received: "A0011
[4/4/2019, 8:42:04 PM] [Texecom] Area 0 armed
[4/4/2019, 8:42:11 PM] [Texecom] IP data received: "U0010
[4/4/2019, 8:42:14 PM] [Texecom] IP data received: "D0011
[4/4/2019, 8:42:14 PM] [Texecom] Area 0 disarmed

from homebridge-texecom.

kieranmjones avatar kieranmjones commented on September 4, 2024 1

I do actually have working code to do a lot of this properly, let me find a way to share what I have

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024 1

Thanks for sharing the code. Was the reason for trying to parse the LCD text purely to get part arm status, or were you doing it anyway for something else?

@max-christian - Have you managed to integrate any more of the Kieran code into your branch with IP support ?

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024 1

Hi Kieran, thanks, I'm hopefully going to get time to improve this further in the next few days and then we can look to pushing out a release.

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024 1

Now supports triggering of the alarm: https://github.com/max-christian/homebridge-texecom

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

Now you mention it, that would be really handy. Would the idea be just expose a switch that's on when the alarm is on and off when it's off? Can you get the triggers you need for your lights from that? Anyone know whether the Texecom sends anything over the Crestron protocol when the alarm is set and unset?

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

Hi,
Yes a switch that shows "on" or "off" would be good enough for me to do what I want.
In an ideal future world it would be implemented as a "security system" which I think is a HomeKit thing.

Anyway, what gets sent when you arm is like a zone update but with a "A" instead of a "Z" and the number instead of being a Zone is an Area.

When you disarm, it sends the same with a "D".

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

I don’t know what the U one is.
It seems to relate to area 001 and is something “not set”.

The A is definitely armed and the D disarmed.
I believe you can call ASTATUS and it will send you back the zone by zone armed status.

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

Actually. Maybe it’s “user”.
So the U is sent when you put your code in ?
And the D when you choose to disarm.

Does that fit.
If you delay after putting your code in before choosing disarm. Do the timestamps fit ?
Have you got it linked to a switch in HomeKit yet ?

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

Got this mostly working now, with it coming up as an actual security system:
https://github.com/max-christian/homebridge-texecom

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

Config is like this:

     {
		"platform": "Texecom",
    	"ip_address": "192.168.0.17",
    	"ip_port": 10001,
    	"zones": [
               <your zones here>
        ],
        "areas": [
        	{"name": "Texecom Alarm","area_number": "1","area_type": "securitysystem","dwell": 1000}
        ]
    }

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

@B-Hartley Yep, I'm sure you're right about the U being user! Good thinking.

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

Here's what it looks like in the Home app:
https://imgur.com/gallery/zL4Yj8P

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

@kieranmjones Maybe have a look at the diff and let me know if you want me to create a pull request? It's all working except for setting the target armed status (only sets the current armed status at the moment). I can only test on IP and it needs testing on a serial connection as I have adjusted a few things that could break serial.

from homebridge-texecom.

kieranmjones avatar kieranmjones commented on September 4, 2024

My code created the alarm system and could handle status, setting and unsetting to away, home, and night modes. The problem I was having was keeping track of modes, the only method I was able to use to determine if it was in night vs home vs full armed away mode was by using LCD text and string matching for that part arm text description on the LCD. It worked well, apart from if you were in away mode and tried to go to disarmed. Also it would get very confused and status get out of sync if the alarm went off and was disarmed via HomeKit as the messages on screen are wrong and it has to keep track of alarms.

The status aspect worked well really it was only when implementing control that things went awry. I can send over the code I have which is pre support for IP so would probably not merge well into a fork or something.

I'm happy to send it over via email and you can take a look and see what you think of what I did vs what you have?

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

Kieran.
Have you tried calling ASTATUS

It will then send you back a string that shows the armed status of each area.

Could be the piece of the puzzle you need ?

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

How did you detect that it had been “part set” for night mode?
I can’t figure that out?

Also, status viewing in HomeKit is really 99% of what I want.
No particular need to be able to set and unset the alarm through it.
So it sounds like what you have, with the network stuff linked in. Would work a treat.

I’ve got the max version running at the moment although it seems to stick on “arming:

Going to bed now, will look more tomorrow / weekend.

Thanks guys !

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

I've just updated it to fix getting stuck on "arming...". The only two states you should see now are "Off" and "Away". (I was intending to use the "Home" state, but having had a look at the docs it appears to be for when the alarm is armed, people are at home, and they are not asleep?)

The plugin assumes the current state is Off when Homebridge starts up; it doesn't yet read the status using ASTATUS.

@kieranmjones How were you reading the LCD, is that possible via Crestron or are you using a Texecom protocol? I'd say a cool Homebridge-y thing to do with the LCD text would be to dump it into the log each time it changes — people like to see a log of what their home's been up to in there.

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

Sending "LSTATUS" will give you back what is shown on the LCD.

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

any thoughts on how you can detect a "part set" status ? does it show different areas armed? or would you have to read the screen, (which would need to be in the config file to match whatever the user had as their part set name) ?

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

@max-christian - have you had Kieran's latest code yet for comparison with what you have written ?

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

also.... I think when you do
var updated_area = Number(S(S(data).substring(2,5)));

That you should actually only be taking 3 digits.
I think 3 digits are the area and the last two digits are the user that armed or disarmed.
You could log the user who has armed / disarmed ?

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

I'm guessing you have seen this (or similar info)

// The value property of SecuritySystemCurrentState must be one of the following:
Characteristic.SecuritySystemCurrentState.STAY_ARM = 0;
Characteristic.SecuritySystemCurrentState.AWAY_ARM = 1;
Characteristic.SecuritySystemCurrentState.NIGHT_ARM = 2;
Characteristic.SecuritySystemCurrentState.DISARMED = 3;
Characteristic.SecuritySystemCurrentState.ALARM_TRIGGERED = 4;

As far as I can tell, there is no notification when the alarm is actually triggered ? need to do more testing on that though.

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

.substring(2,5) is three digits :)

There's only one digit after that so probably not the user?

I was about to ask what comes through when the alarm is triggered, as it really ought to support that. And get ASTATUS polling implemented as well.

from homebridge-texecom.

kieranmjones avatar kieranmjones commented on September 4, 2024

I have just sent over my code to you Bruce via email, for each type of part arm you can set an LCD text to display on screen, so I had a config option for what text the user had chosen for each part arm, I for example have one set to "Night Arm" and one set to "Home Arm" which the code then matches and determines from that which part arm state it's in. If I recall the ASTATUS tells us it's armed but doesn't differentiate the type of arming?

// Home arm text has been observed on LCD output } else if(S(data).contains(home_arm_text)) { for(var i = 0; i < zoneCount; i++){ if(zoneAccessories[i].zone_type == "area"){ if(currentState != "STAY_ARM"){ debug("Updating area status in HomeKit to home armed"); zoneAccessories[i].changeHandler("STAY_ARM"); currentState = "STAY_ARM"; } break; } } // Night arm text has been observed on LCD output } else if(S(data).contains(night_arm_text)) { for(var i = 0; i < zoneCount; i++){ if(zoneAccessories[i].zone_type == "area"){ if(currentState != "NIGHT_ARM"){ debug("Updating area status in HomeKit to night armed"); zoneAccessories[i].changeHandler("NIGHT_ARM"); currentState = "NIGHT_ARM"; } break; } } // Full arm text has been observed on LCD output } else if(S(data).contains('FULL ARMED')) { for(var i = 0; i < zoneCount; i++){ if(zoneAccessories[i].zone_type == "area"){ if(currentState != "AWAY_ARM"){ debug("Updating area status in HomeKit to full armed"); zoneAccessories[i].changeHandler("AWAY_ARM"); currentState = "AWAY_ARM"; } break; } } // Area status indicating no areas armed observed } else if(S(data).contains('NNNN')) { for(var i = 0; i < zoneCount; i++){ if(zoneAccessories[i].zone_type == "area"){ if(currentState != "DISARMED" && currentState != "ALARM_TRIGGERED"){ debug("Updating area status in HomeKit to disarmed"); zoneAccessories[i].changeHandler("DISARMED"); currentState = "DISARMED"; } break; } } // LCD text indicating an alarm state has been observed } else if(S(data).contains('Area in Alarm') || S(data).contains('Alarm from Zone')) { for(var i = 0; i < zoneCount; i++){ if(zoneAccessories[i].zone_type == "area"){ if(currentState != "ALARM_TRIGGERED" && AlarmTriggerSuppress == false){ debug("Updating area alarm status in HomeKit to triggered"); zoneAccessories[i].changeHandler("ALARM_TRIGGERED"); currentState = "ALARM_TRIGGERED"; } break; } }

from homebridge-texecom.

kieranmjones avatar kieranmjones commented on September 4, 2024

Well, that formatted well... apologies! It should be properly formatted in what I emailed over.

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

Thanks for sharing the code. Was the reason for trying to parse the LCD text purely to get part arm status, or were you doing it anyway for something else?

from homebridge-texecom.

kieranmjones avatar kieranmjones commented on September 4, 2024

I believe it was specifically to determine the type of arming, i.e. full, or one of the part arms, also I think I may have used it for determining faults but I can't recall right now as I've not looked at that code in a while. I believe that string matching is the only way to do that with the LCD text so as I say it looks for a config defined string for the night arm etc.

In terms of status reading it works great, that code just breaks down when trying to sync status with actually changing the alarm state through simulated keypad entry which is sadly the only way to do it on the alarm which sucks.

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

.substring(2,5) is three digits :)

There's only one digit after that so probably not the user?

Oh! you can tell I don't do a lot of javascript. I thought that meant take 5 chars, not take them from 2-5.

If there is a single "1" then I think it just means "armed" or "disarmed" or whatever.
If it is 2 digits, then I think it is the user. Probably depends on which firmware you are running.

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

@max-christian - have you had the code via email ?

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

@kieranmjones - Just found your email, my email system had blocked it due to it having a .js attachment. Any chance you could send it over without a file extension, or with a .txt extension so I can get it. Thanks.

from homebridge-texecom.

paskovitch avatar paskovitch commented on September 4, 2024

Could there be some progress in the case? :P

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

I’m not clear what progress is expected? I still have it running on my home system and it seems solid.

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

Which version are you running ?
Your version ? Or Kieran’s latest version with networking added ?

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

I’m using the version linked above: #8 (comment)

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

Ok. Good stuff.
Me too.
If you ever feel like integrating Kieran’s latest code for detecting part sets etc.
I look forward to that.
Otherwise. It does the job pretty much as it is.

from homebridge-texecom.

paskovitch avatar paskovitch commented on September 4, 2024

Is it necessary to arrange the panel language in English?

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

No, I don’t think so.

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

Hi guys, I've just set my alarm off to see what output there is when the alarm sounds. I got L0010. Can anyone confirm from docs that's correct for alarm triggering, 001 being the area number?

If so I'll get that implemented. I also want to change it so that the status of the alarm is always queried live from the alarm instead of being cached by the plugin. Went on holiday recently and that would have been more reassuring.

(I also got an X0010 just after the usual U0010 when I entered my code, anyone know what that means?)

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

Found the meaning of the letters in another project on github:

const char *msgZoneUpdate = "\"Z0";
const char *msgArmUpdate = "\"A0";
const char *msgDisarmUpdate = "\"D0";
const char *msgEntryUpdate = "\"E0";
const char *msgArmingUpdate = "\"X0";
const char *msgIntruderUpdate = "\"L0";

from: https://github.com/JumpMaster/TexecomManager/blob/master/src/texecom.h
(interestingly that project is parsing the LCD display as well)

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

Cool, I look forward to your updates. So you'll pull the status using "ASTATUS" and "LSTATUS" ?

from homebridge-texecom.

kieranmjones avatar kieranmjones commented on September 4, 2024

That's great! Remind me what the current feature set is for this then?

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

I'd like to add polling using ASTATUS next but wondering if I might be too busy at the moment. If nobody else wants to do it, might be worth testing this version for a few days then thinking about a release. Needs a bit of documentation.

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

(I mean it supports reporting alarm triggers to HomeKit of course... not it setting your alarm off!)

from homebridge-texecom.

nathsea avatar nathsea commented on September 4, 2024

Hi guys just wondering where this is at now , any recent updates ?
Cheers
Nath

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

Hi Nath, I’ve had the latest version on my account running for a couple of months without trouble. There’s no documentation yet but there’s a config example above.

from homebridge-texecom.

B-Hartley avatar B-Hartley commented on September 4, 2024

That's good. Any chance of getting it merged and released on the "official" page so it can be installed more easily ?

from homebridge-texecom.

max-christian avatar max-christian commented on September 4, 2024

I ought to update the instructions before Kieran does a release, but it won't be any time soon unfortunately.

from homebridge-texecom.

nathsea avatar nathsea commented on September 4, 2024

Thanks max , not sure I have the skills to install it , but I’ll have a good look at it 👍

from homebridge-texecom.

rshnthmb avatar rshnthmb commented on September 4, 2024

Wow its really good to see that progress has been made on this feature.
Anyone tested whether this works on smartcom, or will i need to purchase a comIP as well?

Thanks

from homebridge-texecom.

nathsea avatar nathsea commented on September 4, 2024

@max-christian @B-Hartley Gents, have managed to get this working using this fork, with a com-ip on port three , with SmartCom taking up the first two ports.
It shows arm / disarmed well.
So is there any chance now that we would be able to tell who has disarmed. Or maybe able to set the alarm via HomeKit?
Loving this, thanks for all your hard work

Nath

from homebridge-texecom.

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.