Tuesday, June 27, 2017

Auto arm moved from zone to group

After improving auto arm, I have realized that auto arm flag should be moved into group instead of zone. That is, it make no sense to have just one zone flagged as auto arm in a group. The algorithm then would not work, if user will not flag all zones in auto arm group, it will not consider all zones.  And most probably gateway will auto arm group that still has some movement detected. To prevent this possible human error, I have moved the auto arm flag to Group setting.

Changes are pushed into GitHub.

The use of auto arm feature can be greatly extended. For example, it can be easily used to lock an electromagnetic locks when authentication node will receive arm packet. As easy as wiring a pair of cable to node, but of course you have to have the electromagnetic locks installed first :).

Monday, June 26, 2017

Improved auto arm

I have just committed to github new improved part for auto arm feature. Previous code mapped the auto arm to zone with oldest alarm, and that was impractical when there was more then one zone in a group. Now the gateway selects it by taking newest alarm from any zone that is in the group. That is, if there is someone moving in at least one zone in a group, the group will not get auto armed.

I will not yet release it as new version, as I have in mind some other improvements.

Saturday, June 3, 2017

SIM800 vs. SIM900

Well it actually looks like there are some differences in SIM800 comparing to SIM900. Echo and command routines are working just fine, but reply to SMS send function is different. SMS is actually sent, but the function is not able detect successful sent. There seems to be two reasons. First, the reply looks little different. That is the echo of SMS text is not preceded with empty line and "> ", but there is simply one line with echo. Second, the reply time of SIM800 is significantly slower then SIM900. It looks like "CMGS:#", the acknowledgement of SMS, comes after the SMS is delivered to actual number.

First problem is relatively easy to solve, on beginning we can ask GSM modem for the version and then branch the SMS send function depending on model. But the second must be investigated. I've seen some command that can make difference in how the SMS sending is handled, but the setting in SIM800 looks right already, interesting :).