Hello, i keep trying to pair my device and the smarthings program keeps opening a webpage which gives me an error and then nothing happens.
I have read all of the pages and wonder is the server down or did i messup somewhere. I have device handler etc all working and have both the android google play software loaded and patched etc…
So that error is a connection error. Most of the time that happens because it tries to update while your phone is in the middle of switching networks. It does retry though so it is nothing to really worry about unless you notice it isn’t updating.
At some point I’m going to update the app to not show those errors unless it has like 10 failed attempts.
I assumed it was during the transition of networks. I noticed during my testing that it queued the actions/requests/status while it couldn’t contact your sever. Once it re-established comms my light (which I was controlling based on presence) turned on and off a few times in quick succession lol
The errors are just annoying, but I can live with them
I’m been testing your app(s) a bit more and not having much luck
I am simulating arriving/leaving by turning my wi-fi on/off on my phone (so with switches between wi-fi and 4G). The android app detects the change (icon goes from purple to grey) but throws and error “Update error #3: Error setting presence” and ST doesn’t detect the change.
After a while I re-enable my wi-fi, again the app detects this but throws a different error “Update error 2: No address associated with hostname” .
So the error setting presence is a server error (should be fixed now) but for future troubleshooting the is what the errors mean:
Update error #1: Error within app before being able to attempt a connection to the server (should never happen)
Update error #2: Error when contacting the server (most of the time due to being between networks - not much to worry about unless you see like 10 or them and it’s not syncing)
Update error #3: Server side error (These can come from a few different places. If it says anything about a token or authentication then update smartapp and device handler, open smartthings app, go to presence sensor smartapp, hit save. If it says anything else, let me know and I will look into it)
As far as the error you were getting, that was an issue on my server caused by my internet not working. This wouldn’t normally be an issue except it wasn’t reporting the errors correctly (normally it would report the error and traffic would get routed to a different server). I was also getting that error and it appears to be good now. Let me know if you have any other issues
I do seem to get Error 2 quite a bit, is it more a name resolution issue during the switch or the fact the IP address is not allocated to the phone yet? If the former, could your app store the IP address temporarily and only refresh/perform a hostname/dns request if it fails to get a server response?
Is there anyway of reducing the delay in retrying to send the presence update to your server once that error occurs? The network switch/dns update on the phone is quite quick (appreciate there will always be some outage) but it looks like your app takes a while longer to retry and send the update?
I think I set it to retry after like 30 seconds. It is also only supposed to try to sync when there is an active internet connection. The name resolution and other stuff will fail when it is between networks due to not being able to contact the DNS server so it wouldn’t really help to cache the IP addresses.
Most of the delay you are seeing is probably smartthings not sending the notifications quickly. If you are wanting to see the exact timing on it, you can turn on the status notifications in the settings on the presence sensor app. The status notification will tell you once the update actually goes through to smartthings instead of only notifying you of errors.
It was from experience of dealing with other OSs and apps with networks where I had fun and games with name resolution even when connectivity was working.
I did have status notifications turned and there was a delay. I’ll do so timings and see.
This might sound a stupid idea/feature request, but…
Would it be possible to get your Android app to check the presence of a paired Bluetooth device and if not present then notify ST?
I’m not quite sure how Bluetooth on android works, whether it’s event driver or you’d need to poll the device? I’m not sure of the battery implications either, but hopefully BLE negates them.
Do you mean showing Bluetooth devices with the WiFi networks and if you are connected to a Bluetooth device or on one of the WiFi networks then you are at that location?
Hi @johndc7 - thanks for all of your hard work on this project! I just ran through all of the installation instructions and everything seems to be working except for one major thing - I see my device listed in “My Devices” but it’s not listed in webCoRE’s physical device(s) list, so I can’t click on it and use it for conditions within my pistons. I tried going to the webCoRE app in Automations and checked under Available devices to add it as an actuator in the setup, but my device isn’t listed there either. I must be missing something here… help!