Yeah. I tried that. No luck.
Now, I tried starting over completely. Re-flashed Pi. Followed instructions in readme. Uninstalled and re-installed driver. However, the app is not finding the Alarm.com device when I scan for nearby devices. Any suggestions?
I am trying a new approach for the proxyā¦ Try this oneā¦ Just download the file and config file and run for this one. Even the config file is optional and for support of future services. No python, no docker, etc. You have to download the appropriate file for your machineā¦
That usually means that it was unable to automatically find the proxy. In that case, I would enter the IP address of where the proxy is running manually in settingsā¦ I also checked in one more fix to the driver to handle the error in not finding proxy better. I need to test that case more.
99% of the time this fixes issues. Thatās what Iāve done when the ST app device screen shows as itās not connected.
yeah thatās all I see. I donāt think itās even trying to login to alarm.com. I have it setup in alarm.com where I get a push notifications for failed and successful logins.
I tried logging the request body in server.py but it wasnāt much help (there was obfuscated content, though).
Iāve verified that I can login using the same credentials on alarm.com. I havenāt been asked for 2FA in a long time (and, your old integration is working fine). Any other things I can look at?
I have checked in another fix to the code - it was only looking at the first response - and if you have Hue bridges/lights in the house they respond to ALL requests and create ānoiseāā¦ So I am now looking through all responses to see if one of them is the proxy. Hopefully this is more resilient to Hue lamp homes.
There is a line commented out that will also log the header and the bodyā¦
server.py:82
server.py:84
Can you uncomment them and run the server and DM me the contents (sanitized for usernames, passwords, etc.)
Typing command āuname -mā on my rapsberry pi returns āaarch64ā which is not listed on your GitHub architecture list. I attempted to use both the stproxy-linux-arm, and the stproxy-linux-arm64 on my pi and couldnāt get either to work.
I then typed in command ālscpuā and it returned the following cpu architecture and cpu data. I have the 64bit pi os currently running on it:
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Vendor ID: ARM
Model: 4
Model name: Cortex-A53
Stepping: r0p4
CPU max MHz: 1200.0000
CPU min MHz: 600.0000
BogoMIPS: 38.40
L1d cache: 128 KiB
L1i cache: 128 KiB
L2 cache: 512 KiB
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fp asimd evtstrm crc32 cpuid
I can get this to work on my Windows PC, but I prefer to run it on the pi so I donāt encounter issues when the Windows PC updates. Any suggestions/
Thanks for all your time helping me to get this goingā¦
aarch64 is the same as arm64ā¦ So stproxy-linux-arm64 should work - it is interesting that it is not working. On my own rpi, I am using the stproxy-linux-armā¦
What happens when you run either of those on your raspberry pi?
file stproxy-linux-arm64
stproxy-linux-arm64: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=CL2AaLQaL7zmur9ObhXX/7U7vAbnru0b_wK3zC-yI/XUFUQh-_xR7m2x3o2-yt/p4d13ZZ2kUBupD7Z-mle, with debug_info, not stripped
Thanks. I donāt have Hue lights so I donāt need to worry about that. Also, weāre out of town for a week, so Iāll try it again when I get back.
Okay I need to come cleanā¦ I am a total Raspberry Pi / linux rookie. My pi was given to me as a Christmas gift years ago and it was only used as a Nintendo emulator for me to play Super Nintendo games. I stole the pi from the Nintendo case, determined what version of pi i had, and totally wiped the MicroSD card with the Nintendo emulator and reinstalled a fresh install of the Pi OS. soā¦
In the pi terminal I am sitting in the home āsmartthingsā directory I created and copied your files into. I have typed in āstproxy-linux-arm64ā, and āstproxy-linux-arm64 -d smartthingsā, and I it keeps returning ābash: stproxy-linux-arm64: command not foundā.
What do I need to type into the terminal window to make it invoke your proxy program. Please put it into quotes for me so this rookie canāt screw it up. : )
Thanks
LOLā¦ First you need the full path to where you areā¦
pwd
will give you the full pathā¦ Most likely something like /home/pi/smartthings/
Then you can type inā¦
/home/pi/smartthings/stproxy-linux-arm64 -d /home/pi/smartthings
You could also do
./stproxy-linux-arm64 -d /home/pi/smartthings
but that would only work when you are exactly in that directory, whereas the prior command will work from anywhere
okay we are making progressā¦ assuming the āpiā in the command string is my system user name minus the ā@rapsberrypiā (made that assumption by typing the āpwdā command), I have tried both suggestions, the first by being at the terminal prompt as it was when I opened it, the second after navigating to my āsmartthingsā folderā¦ and in both cases i get ābash: <the directory and / or command> Permission deniedā. Dang!
Ah you need toā¦
chmod +x stproxy-linux-arm64
Bingo!
Thanks for all your help and patience. Youāre a Stud!
@schwark all of a sudden it started working on my Synology NAS, without me doing anything!
I see a couple recent changes to the driver code - do driver updates auto-update through Smartthings?
Okay I did it againā¦ wanting to have a fresh install of the edge driver and the proxy, I had deleted the Alarm Panel device in Smarthings app, uninstalled the driver from the SmartThings Hub device, and unenrolled from the invite. I proceeded to setup the proxy server on the raspberrypi per your instructions above, and was successfu in doing so. Then I went back to re-enroll under the device invite and download the driver, then confirmed under the SmartThings Hub device in the app that the driver had been reinstalled and I was newly enrolled under your invite in the SmartThings Hub device. Both showed fine. When I scanned for new devices within the app I could no longer pickup the Alarm Panel device. It would just report no device found. I nothiced in pi the terminal window that it would say ā[SSDP] 2022/09/20 17:40:48 failed to handle message: unexpected EOFā when I initiated the scan for device in the SmartThings appā¦
I then closed down the pi and ran the proxy exectuable in Windows. The very same thing was happening. I then ensured both the pi and windows proxys were both dead and tried to get the SmartThings app to scan for the Alram.com Panel deviceā¦ still no luck.
Bottom lineā¦ clearing app cache, uninstalling the app and reinstalling, once again deleting the edge driver and unenrolling, and once again starting both the pi and windows proxys (not at the same time), and a ton of misc combinations of all the proceeding, there seems to be a problem that I can no longer get the Alarm.com Panel device back into my Smarthings app.
I know have already been a pain in your side because of my ingorance, but could I indulge you one more time for some help?
Thanks
Ok it turns out there are a number of things that were broken in between my adding the executable proxy and some other changes I made. Also, Smartthings seems like it gives you garbage when the username and password are not set which causes alarm.com to go into a tizzy.
Either way, I have fixed a bunch of those issues and tested adding the panel for first time with both the python and the executable proxies.
So try the latest versions of the proxy and the driver. There is a new version of the driver up now.
Before you ask, I donāt know if the drivers update automatically. Unenroll and reenroll should probably get you the latest driver.
That solved my problem of SmartThings not adding back in the Alarm.com Panel device. I will play with it and hopefully everything goes well.
Thank you for all your efforts on thisā¦ it really is appreciated.