After logging in, I double confirmed if the serial command of controlling the output is executed correctly.
Then I will test out most of the commands in this Comfort Serial Command Interface.
- start R-Pi and Comfort
- Open LXTerminal and type the following:
minicom -b 9600 -o -D /dev/ttyAMA0
CTRL+A Z to turn on local Echo
CTRL+C LI1234 to log into Comfort ( where CTRL+C is the STX and Comfort will reply LU01 to indicate log in success as user 1)
- Arming the security system
M!sscccccc – remote arming (where ss is security mode and cccc is the 4 or 6 digit user code)
M!001234 – remote arming to security off mode
M!011234 – remote arming to away mode
M!021234 – remote arming to night mode
M!031234 – remote arming to day mode
M!041234 – remote arming to vacation mode
All were executed correctly with a reply SM00000000
m!001234 – local arming to security off mode ((reply: SM000000000000120000)
m!011234 – local arming to away mode
m!021234 – local arming to night mode
m!031234 – local arming to day mode
m!041234 – local arming to vacation mode
Wait. This will take forever and a bit redundant because the serial commands have been tested to work fine, so there should not be any problems.
So, it would be good if I can come up with an idea on how to make use of R-Pi to use serial commands to control Comfort through web server and a browser. Time to recall what I have learnt in the last 2 weeks.
To use web2py to create a web app seems to be a good start but it is using python script so I have to figure a way out to allow communication between pySerial and UCM.
Spent half the day finding the right format to transmit serial data using pySerial but to no avail.
I got sleepier while browsing the net for no information. So my supervisor gave me a new task: use Ethernet to communicate between R-Pi and UCM. But it sounded clueless to me. My senior colleague recommended Netcat and PackETH for me to try out.
Today I’m not in the good state and my brain isn’t working. Sigh.