Page 1 of 2

Smartthings Integration

PostPosted: Sun Oct 11, 2020 9:38 am
by mgreinke
Sorry if this is answered somewhere else but does AlarmDecoder work anymore with SmartThings - either the old SmartThings app or the new SmartThings app? I used to get zone changes (faults/restore) to show up as events in SmartThings and use for Webcore pistons but this stopped working. The smartapp is installed correctly as far as I can tell. It was working. I can see events being logged in the WebApp. I have UPNP push notifications setup as always and and my API keys match. I see there is a forum read for the new SmartThings app which I know is broken right now but I don't see any forum posts about the old app being broken. Did Samsung deprecate something in their API recently that has totally broke AlarmDecoder integration? I count on being able to integrate my alarm system sensors into my smart home automations and now with SmartThings integration broken, none of my automations work anymore.

Thanks in advance for any info.

Mark

Re: Smartthings Integration

PostPosted: Sun Oct 11, 2020 10:41 am
by mathewss
Hay Mark.
Yes they are closing down the old system so all of the code I did for ST that I use every day is about dead.

I have been frantically working to get my setup at home with the new Samsung environment.

If you have a AD2Pi then you will be able to migrate and start using it now but to be clear its not ready for production and I have no Zone faults or for that matter much else.

I am about to push a new update I hope tonight with some more big improvements.
https://github.com/nutechsoftware/Alarm ... K/tree/dev

Signup for the DEV program and get yourself a $10 ESP32 DevKit board from amazon and you can start using what code is ready and help me test. The code supports connecting from the ESP32 to your Pi for AD2* signals and connects to your local Wifi.

Currently it supports my key requirements
- I can see FIre and Alarms on the new ST app.
- I can trigger a fire alarm from the app. ( Must press the button 3 times )
- I can toggle Chime
- I can disarm but currently Arming is not working due to a bug in the ST cloud. I will likely be adding my own button since the one they have for alarms is not working.
- I get notified from Twilio for alarms etc.
- OTA Over the Air updates. Once you have it flashed the first time updates are over https to my servers.

Anyway signup and I will send you the needed secrets to configure to your ESP32 with the firmware loaded.

Best
Sean M.

Re: Smartthings Integration

PostPosted: Sun Oct 11, 2020 8:45 pm
by mathewss
I just pushed version 1.0.2 of the ESP32 firmware tested with ESP32 DevKit board.

Some highlights of current features.

    * Supports connecting the the AD2* over ser2sock or UART on GPIO pins. See ad2source command.

    * Supports configuration to local Wifi AP if SmartThings SDK is disabled. See netmode command.

    * Reporting Smoke Alarms to New SmartThings app and ability to trigger fire panic from app with protection for accidental pressing fire trigger. Requires 3 in 5 seconds.

    * Report basic alarm signals to Twilio. TODO configuration of events to send.

    * Supports direct interaction to AD2* device over UART or ser2sock with 'ad2term' command. Escape this mode with '...'. Nice for programming the alarm or configure the AD2* settings.

I was able to tested raw firmware loading on the new release starts with network mode disabled and is ready for configuration to SmartThings and or Twilio.

Best
SM

Re: Smartthings Integration

PostPosted: Mon Oct 12, 2020 6:10 am
by hudoh
Hi Sean - I got the latest drop you put up yesterday. I am stuck when building the project. It gets about to the end, but end up with the blow error.

[91/91] Generating binary image from built executable
esptool.py v2.9-dev
Generated C:/Users/bruce/Desktop/esp-idf/examples/AlarmDecoder-STSDK-dev/build/bootloader/bootloader.bin
ninja: build stopped: subcommand failed.
ninja failed with exit code 1


Feel free to email me directly too, just posting here in case others have the same issue.

Re: Smartthings Integration

PostPosted: Mon Oct 12, 2020 7:23 am
by mathewss
Thanks! I need more help! :)

OK I have not setup a new build environment in a while its the same one I have been using for a few weeks now.

I have STSDK installed into a folder and I can build the switch_example.
Code: Select all
foo:~/esp/st-device-sdk-c-ref
$ ./build.sh esp32 switch_example
Toolchain path: /home/mathewss/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
WARNING: Toolchain version is not supported: crosstool-ng-1.22.0-80-g6c4433a
Expected to see version: crosstool-ng-1.22.0-96-g2852398
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
Compiler version: 5.2.0
WARNING: Toolchain version is not supported: crosstool-ng-1.22.0-80-g6c4433a
Expected to see version: crosstool-ng-1.22.0-96-g2852398
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
CC /home/mathewss/esp/st-device-sdk-c-ref/apps/esp32/switch_example/build/bootloader/bootloader_support/src/bootloader_flash.o
CC /home/mathewss/esp/st-device-sdk-c-ref/apps/esp32/switch_example/build/bootloader/bootloader_support/src/flash_qio_mode.o


Then I place all of this project in this folder. In my case I used a symbolic link.
Code: Select all
foo:~/esp/st-device-sdk-c-ref/apps/esp32
$ ls -l
total 21444
drwxr-xr-x 1 mathewss mathewss       35 Sep  2 18:46 AlarmDecoder-STSDK
drwxr-xr-x 4 mathewss mathewss     4096 Aug 29 12:23 light_example
drwxr-xr-x 3 mathewss mathewss     4096 Sep 15 20:46 ota_demo
drwxr-xr-x 5 mathewss mathewss     4096 Oct 12 08:20 switch_example


Please confirm if this is how your build is setup.

I can build directly with espidf but I know it wont be usable as it has some issues I need to fix :(

Best
SM

Re: Smartthings Integration

PostPosted: Mon Oct 12, 2020 9:08 am
by hudoh
I am using windows environment. I was able to build the previous version you had last week and flash it. I will confirm the example codes are still working and try again.

I'm also working in setting up a Pi to do this since it may be slightly different, so trying that path also. Will keep you posted.

Re: Smartthings Integration

PostPosted: Mon Oct 12, 2020 9:34 am
by mgreinke
Thanks for the prompt response Sean. Not sure I'm tech savvy enough to assist with your testing. I currently have a AD2PI Network Appliance. Will that eventually work again with Smartthings on its own or will this require an addon interface in the future?

Re: Smartthings Integration

PostPosted: Mon Oct 12, 2020 10:04 am
by mathewss
Got it. Ya for you just download the pre compiled files on the "Release" page on github to any ESP32 DevKit compatible board ~$10 online and it will be able to connect to your existing Pi and can be added to the New SmartThings app. You will need to create a developer account with my company Id's as described in the Readme.MD for the project. I will then accept your request and send you the 3 keys that you can program to your ESP32 running this firmware and then you can Onboard the AD2IOT to your new SmartThings app and being using it.

Yes the existing Pi will work directly connected to the ESP32 or just run using my Pi image with ser2sock enabled and you can share it to the ESP32 over local WiFi network.

Best
SM

Re: Smartthings Integration

PostPosted: Mon Oct 12, 2020 2:29 pm
by hudoh
Sean - I switched to Pi and got the switch_demo to work. But when I try to build the Alarmdecoder, I get some errors which I sent to you via email. Let me know what you think I need to do. I feel like I'm pretty close to getting this set up to test.

Re: Smartthings Integration

PostPosted: Mon Oct 12, 2020 3:59 pm
by mathewss
Thanks sent you a detailed reply.
I am concerned that making this build environment I have now is a oneoff :) that would suck. Lets figure it out.

Best
SM