polling outputs/sending commands

v1rtu0s1ty

Senior Member
I don't have an Elk ethernet module. I would like to know if we can send an HTTPS POST action to the ethernet module and query for a status of an output or maybe send a TURN ON command to an output.

Thanks!
 
I don't have an Elk ethernet module. I would like to know if we can send an HTTPS POST action to the ethernet module and query for a status of an output or maybe send a TURN ON command to an output.

Thanks!
I'm confused. You say you don't have the ELK M1XEP, but want to know if you can communicate with the ELK M1XEP using a POST over SSL?
 
I don't have an Elk ethernet module. I would like to know if we can send an HTTPS POST action to the ethernet module and query for a status of an output or maybe send a TURN ON command to an output.

Thanks!
I'm confused. You say you don't have the ELK M1XEP, but want to know if you can communicate with the ELK M1XEP using a POST over SSL?

Yep. I'm sorry, I should have been clearer. I would like to know if ELK M1XEP can do it. It's one of the features I am looking for. If it does, then there is a greater chance for me to buy it. This way if it does, I'll be able to create my custom simple webpage say a map of my whole property and the lawn sprinkler as an example, or maybe my contacts inside the house or garage and be able to see the status in a swf image. Or maybe, if we can do this rule

WHENEVER OUTPUT 106 STATE IS TURNED OFF
.....
.....
HTTP SEND http://192.168.1.1/submit.php?output=106&state=off

Then on my isolated webserver, I have a submit.php which uses $ GET[output] and $ GET[state]. I'll just take care of the image processing via gd manipulation library.

Actually, I've been searching of a serial programming on ELK but I cannot find one. I tried connecting to my M1 via hyperterminal but I don't see any string/garbage chars being echoed back. :)
 
I don't have an Elk ethernet module. I would like to know if we can send an HTTPS POST action to the ethernet module and query for a status of an output or maybe send a TURN ON command to an output.

Thanks!
I'm confused. You say you don't have the ELK M1XEP, but want to know if you can communicate with the ELK M1XEP using a POST over SSL?

Yep. I'm sorry, I should have been clearer. I would like to know if ELK M1XEP can do it. It's one of the features I am looking for. If it does, then there is a greater chance for me to buy it. This way if it does, I'll be able to create my custom simple webpage say a map of my whole property and the lawn sprinkler as an example, or maybe my contacts inside the house or garage and be able to see the status in a swf image. Or maybe, if we can do this rule

WHENEVER OUTPUT 106 STATE IS TURNED OFF
.....
.....
HTTP SEND http://192.168.1.1/submit.php?output=106&state=off

Then on my isolated webserver, I have a submit.php which uses $ GET[output] and $ GET[state]. I'll just take care of the image processing via gd manipulation library.

Actually, I've been searching of a serial programming on ELK but I cannot find one. I tried connecting to my M1 via hyperterminal but I don't see any string/garbage chars being echoed back. :)

I am going with not possible via a simple POST. The current web interface for the elk launches a java applet which controls the ELK using telnet commands over SSL via the secure port. So it looks like the only way to control the elk is via telnet either through the unsecure port or tunnelled over SSL through the secure port. So to do it you will need some complex scripting on your web server.

And there is definitely no way to do it via rules.
 
Where can I find the commands that I can use for TELNET on M1XEP? I think I can use NET::Telnet module and capture the output using waitfor then store it to a variable rather than STDOUT, then have that output feed my submit.php.

EDIT:
When you telnet to the unsecure port, is it like a unix login?
 
You can find the current protocol documentation here. You basically establish a TCP connection to the insecure port, and send/receive ASCII commands in order to interface the M1. Keep in mind that there is a CRC checksum involved, but the documentation mentions this. It's actually one of the better documented protocols I have seen.
 
Thanks Dan. I saw it earlier while doing search. I have been doing some test but nothing is happening. I connected my laptop to the M1 via serial and am using hyperterminal. I'm seeing tons of M1 messages being displayed on my hyperterminal software. I was thinking that I might be able to send the command as well. However, M1 isn't responding. The documentation says that any software can be used to send command via com port as long as it can send ascii.

Here is the command I sent. Based from bullet 4.9.2, it will turn on output 108 for 90 secs.
0Ecn1080009000D8(CR-LF)

I'm actually confused about (CR-LF). I changed it to 0x0D0X0A
0Ecn1080009000D80x0D0X0A

pressed Return key on both but output 108 was still off
 
I think I can start some light development for now since I am able to capture state changes via serial. Here is what I captured when I triggered my motion sensor.

0AZC005900C4
0AZC005200CB
0AZC005900C4
0AZC005200CB
0AZC005900C4

I searched the string 0AZ and found item 4.38 Zone Change Update (ZC) on the pdf. :)

It matches my zone 5. This is pretty cool! :D The problem I see with this is that I will have to remove the cable since the machine that will be polling is a *nix machine and my ELK RP is on XP.
 
You need to calculate the CRC and include it in the command data, especially for sending commands, or the M1 will not respond. Check the my.Elk script for an example how to calculate this.
 
You need to calculate the CRC and include it in the command data, especially for sending commands, or the M1 will not respond. Check the my.Elk script for an example how to calculate this.

Awesome! Thanks for sharing this info! :)

EDIT:
I remember I installed a demo serial over ip app on my XP 3 weeks ago. Here is what I executed on my linux box :D I'll just have to do some screen scraping. Perl should be perfect for this job.
elk_rs232_polling.png
 
Brad of Elk Products assisted me with sending the command. It worked!!! :)

Here is the command Brad gave to me. 0Ecn1080009000C8.

elk_rs232_sendcommand.png


elk_output108.jpg
 
There is also a CRC tool ELK released, which helps you build the 'string', it's on their website somewhere.
 
Back
Top