taligentx / dscKeybusInterface

An Arduino/esp8266/esp32 library to directly interface with DSC security systems.
GNU General Public License v3.0
504 stars 126 forks source link

TinyGSM-SMS for Arduino/esp8266, KeypadInterface send LCD msg and support PC2550 keypad, KeybusReader fits on Uno #242

Closed kricon closed 2 years ago

kricon commented 3 years ago

Added TinyGSM-SMS Arduino and ESP8266 examples:

PS: In wiring, Bell+ and COM/Aux- isn't a typo. Bell- triggers only in alarm state but Bell+ is always active and can provide 2-3A short term (from backup battery) as requied by SIM800L module.

KeypadInterface changes:

KeybusReader changes:

taligentx commented 2 years ago

Hi @kricon - this is still marked as being in "Draft" status, are there any other changes to make to this PR? I know it's been a while but I'd like to make sure your work is included in the next release, thanks!

kricon commented 2 years ago

Hi @taligentx ! Sorry that it took so long - life things got in, doing some housework... I need somebody to review TinyGSM-SMS examples as I'm not sure that dropping baud rate was right thing to do. Also I'm not sure if I choose good pins, the examples works fine (except "buffer overflow" thing on Arduino) but needs more testing and feedback before merging into master branch.

KeybusInterface/KeybusReader are now ready to be merged. I've started doing some 0x8D and 0x94 decoding locally but got stuck with nibbles and bitshifting, and with all requied checks I need to make (for different modules, versions, etc) it would be one hell of a mess, I'm sure that it can be made in more optimised way. I'll look into it when having some spare time.

I have some Teensy 3.1 boards laying around (they have Arduino IDE support with teensyduino), I will see and try to convert some examples onto it, atleast that's the plan. I don't have compatible ethernet module yet, just SIM800L and basic examples (local serial only) stuff. Better than nothing.

taligentx commented 2 years ago

Hi @kricon,

Sorry that it took so long - life things got in, doing some housework...

No worries at all, thanks for your work on this and all of your previous work, especially protocol decoding work can be very time consuming, merged! (but just now getting a chance to comment)

I need somebody to review TinyGSM-SMS examples as I'm not sure that dropping baud rate was right thing to do.

For TinyGSM-SMS, I'm fine with merging as-is because I don't have the hardware for testing and rely on folks who need to use these features to post any issues that crop up. It's great to have the examples in place for Arduino and esp8266.

I've started doing some 0x8D and 0x94 decoding locally but got stuck with nibbles and bitshifting, and with all requied checks I need to make (for different modules, versions, etc) it would be one hell of a mess

Thanks for the logs on those commands, especially 0x8D is extensive - it's great to see parts of the protocol for these modules. Also thanks for flagging those functions in dscKeybusPrintData.cpp to skip Arduino/AVR, it's been an interesting challenge to try and keep the KeybusReader sketch size small enough to fit on all platforms but at this point it's fair to take advantage of the esp8266, esp32, etc to decode more of the protocol.

I have some Teensy 3.1 boards laying around (they have Arduino IDE support with teensyduino), I will see and try to convert some examples onto it

More architectures are always welcome - it should mostly be a matter of setting up the timer interrupts in the library code and adding Teensy wherever there's currently code selecting for different architectures between AVR, esp8266, and esp32. From a quick look at Teensyduino, IntervalTimer should work to trigger dscDataInterrupt() in src/dscKeybusInterface.cpp. The example sketches ideally would be simple to update, just need updated documentation for whichever pins work best for wiring on that microcontroller and networking configuration.