Integration with Texecom Alarm Panel via either IP or USB?

Here is the Log file too.

Thanks again

Simon

Just looking through the log myself I assume it useful for you to know that the Alarm Panel is “Unit 75”

A few different problems that will need to get sorted out:

a) IP Addresses are Strings, and need quotes.
[tt] luup.io.open (lul_device, 192.168.0.2, 10001)[/tt]
becomes
[tt] luup.io.open (lul_device, “192.168.0.2”, 10001)[/tt]

b) I think you’re trying to write bytes…
It’s hard to tell, as I cannot find the protocol guide for the Texe, but I think you’re trying to write a byte sequence when you do this:
[tt] luup.io.write (5C57313233342FE8)[/tt]

If that’s what you’re trying to do, then it would look like this:
[tt] luup.io.write (string.char(0x5C,0x57,0x31,0x32,0x33,0x34,0x2F,0xE8))[/tt]

Otherwise, if you’re trying to write it as a String then it would need quotes, and look like this:
[tt] luup.io.write (“5C57313233342FE8”)[/tt]

This typo is what’s causing you to see this in your [tt]LuaUPnP.log[/tt] output:

[tt]01 05/08/11 10:19:51.988 eLuaInterface::LoadCode: [string " local RequestAccess_SID='urn:micasaverde-com:serviceId:Texecom…"]:5: malformed number near '5C57313233342FE8’e <0x400>[/tt]

c) The default [tt][/tt] is CR, is that ok?
When doing IO within a Plugin, the default [tt][/tt] is CR. You’d have to check to see how your panel wants it’s “lines” terminated, this is typically “CR”, “CRLF”, “RAW”, or “STXETX”.
If you’re ok with the default, then no changes are needed. If you need to terminate differently, then specify the [tt][/tt] tag as is done in the Onkyo Plugin.

d) You have 3x Services, you could probably do it with one
If you want to simplify things, and I recommend you do when you’re just starting, you could “merge” the 3x [tt]S_xxxxx.xml[/tt] files into one, with multiple [tt][/tt] blocks inside a single [tt][/tt] block.

This will make inclusion into the [tt]D_xxxxx.xml[/tt] file easier, as well as keeping it simpler in your head, and easier when you get to writing the [tt]D_xxxxx.json[/tt] file for Events and Scene handling (later)

Guessed thank you so so much for taking the time to look into my issue.

I have made the amendments as you suggested for which I am very greatful but I still have an issue.

I now get the follwing entry in my log file and “lua failed to start”

Can you please tell me that this enrty means

01 05/08/11 19:20:34.336 e[31;1mLuaInterface::CallFunction_Startup-1 device 75 function luup.io.open (lul_device, “192.168.0.2”, 10001) failed attempt to call a nil valuee[0m <0x402>
01 05/08/11 19:20:34.337 e[31;1mLuImplementation::StartLua running startup code for 75 I_Texecom.xml failede[0m <0x402>

I have attached my I D and shiny new 1 S file.

Thank you for all your assistance thus far and thank you for all the trouble you went to with your last post, I am affraid at the moment that was just perfect.

Regards

Simon

Sorry the message in UI4 is actually
Alarm System[75]:
Startup Lua Failed

Yup, just missed the problem as I only eyeball the code during my reviews and don’t attempt to load it.

The [tt][/tt] element is designed to contain the name of a [public] function to run, and appears not to handle chunks of Lua code.

You have this:

[tt]

local FullSet_SID = ‘urn:micasaverde-com:serviceId:TexecomFullSet1’

luup.io.open (lul_device, 192.168.0.2, 10001)
[/tt]

and it needs to be more like this:

[tt]

local FullSet_SID = ‘urn:micasaverde-com:serviceId:TexecomFullSet1’

    function texecomStartup(lul_device)
        luup.io.open (lul_device, 192.168.0.2, 10001)
    end
</functions>
<startup>texecomStartup</startup>[/tt]

note that startup functions cannot be declared “local”, so I’ve left off that designation.

Thanks Guessed I will continue to play.

I have also fathomed out that when you open a connection to this panel that it gives you 20seconds to send it a command otherwise it closes down the connection.

To that end I have created another funtion called OpenPort and given that the lupp.io.open command, this way I have to run three commands to part arm. Firstly I open the connection, then request access to the panel and then send the part arm command.

I have got a whole heap further with your help as now when I send any command my alarm panel goes into Com fault so at least they are starting to talk ha ha.

Oh its never easy is it.

Cool. Mind if I merge this thread with your original Texecom one from January?

not at all so long as i can find it.

Still getting a com fault but I think that might be to with the Protocol bit which I don’t understand. Looking through the whole protocol they sent me it does not say anything about terminating lines. Basically I can either fire HEX at the panel i.e 5C 41 03 2F for example or ASCII \A–/

further to this I have figured out I don’t think I need a startup line at all do I??

If when I call an action the first action being Open the port and then send the request to access etc etc.

[quote=“smarttechnology, post:29, topic:167224”]not at all so long as i can find it.

Still getting a com fault but I think that might be to with the Protocol bit which I don’t understand. Looking through the whole protocol they sent me it does not say anything about terminating lines. Basically I can either fire HEX at the panel i.e 5C 41 03 2F for example or ASCII \A–/

further to this I have figured out I don’t think I need a startup line at all do I??

If when I call an action the first action being Open the port and then send the request to access etc etc.[/quote]
Given what you’re sending contains chars in the 00-1F range, it’s got a lot of “control” characters, so I’d guess they’re looking for a raw stream. Look at both the D_ and I_ files of the Onkyo plugin, since it works with RAW streams, and declares that to Vera so you can just copy the blocks from it.

Then use the [tt]luup.io.write(string.char(0x5c, 0x41, 0x03, 0x2f))[/tt] style to write the data out. With Verbose logging enabled, you will see lines in the output that start with 51 and 52 that show the data read/written on the channel. You can use this to see how the panel itself is responding when you make requests.

Note that [tt]luup.io.open(…)[/tt] doesn’t actually open the command channel (aka “Socket”) at that moment, it really just preps Vera to know how to when it needs to. You should only have to do this once, at startup, and Vera should [technically] re-establish the connection on every [tt]luup.io.write(…)[/tt] call if the Socket has been dropped in the meantime.

That said, I’ve seen that re-connect behavior be a little buggy in recent builds…

Hi right now I have a moment to update you on this and a little time to play this is the stage I am at now.

I now have a plugin that does not crash nor does it report a Lua failed to start fault or anything of the sort… deep joy.

Also it does not cause my Alarm panel to go into coms fault either.

However, it does not actually control my panel and I am trying to figure out what string or code is actually being sent to the panel. Guessed was kind enough to point out that you can see what codes are being sent in the Log, well here is a snippet from my log but I can not determine what is being sent.

Can you help??

08 05/10/11 20:35:38.714 JobHandler_LuaUPnP::HandleActionRequest device: 75 service: urn:micasaverde-com:serviceId:RequestAccess1 action: e[36;1mRequestAccess1e[0m <0x2c0c>
08 05/10/11 20:35:38.715 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=75 <0x2c0c>
08 05/10/11 20:35:38.715 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:RequestAccess1 <0x2c0c>
08 05/10/11 20:35:38.716 JobHandler_LuaUPnP::HandleActionRequest argument action=RequestAccess1 <0x2c0c>
01 05/10/11 20:35:38.717 e[31;1mluup_io_write NULL port 0x8a9ab0 size 7e[0m <0x2c0c>
08 05/10/11 20:35:40.233 JobHandler_LuaUPnP::HandleActionRequest device: 75 service: urn:micasaverde-com:serviceId:PartArm1 action: e[36;1mPartArm1e[0m <0x2c0c>
08 05/10/11 20:35:40.234 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=75 <0x2c0c>
08 05/10/11 20:35:40.234 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:PartArm1 <0x2c0c>
08 05/10/11 20:35:40.235 JobHandler_LuaUPnP::HandleActionRequest argument action=PartArm1 <0x2c0c>
01 05/10/11 20:35:40.236 e[31;1mluup_io_write NULL port 0x8a9ab0 size 4e[0m <0x2c0c>

It looks almost like the [tt]luup.io.open[/tt] failed, or there’s no data being written. If it were successful, and Vera’s Verbose logging is enabled, I’d expect to see lines starting with [tt]51[/tt] and [tt]52[/tt]… showing the raw [Hex] versions of the data.

In most panels, this data will come by even if you’re not “writing” to the Panel, it happens for Zone opening/closing events (etc), but not sure how your panel does this.

Guessed… what can i say man you are a legend.

I have manged to with SQ remote part arm and disarm my panel. I have not managed to fully arm the system as yet but I a sure that is a bug in my code.

Thank you so so much for taking the time to assist me.

When I have a fully working interface that works to a level i am happy with I will gladly post it on here for other UK users whom own Texecom.

Regards

Simon

Good to hear you got it going.

Can you publish the “latest” version of whatever you have so others can trackback as needed?

Dear friends!
i found this topic searching in the web.
I are making a personal project to integrate my Texecom premier panel alarm with my microcontrollers home control design via the serial port integrated in panel alarm.
The problem is that i need the command list (or comunicacion protocol explanation) of texecom premier panel alarm.
Someone have this commands list?
is very important for my because i found this, i don’t need the remote keypads to control the panel alarm, only a personal desing remote control.
(sorry for my english and thaks to all). :smiley:

Hi Mate, I would love to assit you but I had to sign a non disclosure agreement with Texecom in order to obtain the full protocol listing. The form is nothing special and is available by emailing support@texe.com

Once you sign and return this to them they will email over the protocol. Once you have it I would be interested in talking to you to find out what it is you are trying to do with your panel as I am trying to remotely control mine too.

Is it a 24 or a 48 panel you have?

Dear Friend.
Thanks for you fast answer!!!.
I have one 412 Premier panel control, one Speech Dialer and two RPK8 keypads (some PIR detectors, fire detectos, open gate detectors…etc)
I want remove all keypads and actual wires (detectors to panel, to keypads…) for integrate all system (with domotic control) in only one RS485 network.
I working in this proyect and actualy is nearly finished.
Another question (out of this post) is if the RS485 network can work in small “start” connection desing.

You can view the beginning test of RS485 and microcontrollers in my youtube page.
In some days, i will upload the advances.

Thanks again!!!

Hello again…

Another question…

Premier 412 have a port for connect a PC serial interface.

this port is a standar RS232, TTL or…? ???

thanks and sorry for ask in this post!

As I understand it there are two protocols. A 485 one and a TTL one to use the TTL you have to assign the port on the panel as using a crestron interface.

Dear.

Thanks for you fast answer and help :smiley:

I unknow Cestron interface. I will try read data from this pins in rs232, ttl and 485. I pray for the pins are electrical protect! :-\

If finaly get the communication with panel, i need rebuild a new PBC and discard much hardware and software work to integrate with Premier panel :(.

I’m doing all hardware parts and software programs… more thath one year ago.

thanks again. :smiley: