BeaconThings / iBeacon integration with SmartThings

presence

(Davood Bonyad) #1

Hi all,

I’m using iBeacons to get accurate presence sensing in SmartThings, which works great.

I’m currently using BeaconThings to talk to SmartThings and tell it about the presence of a nearby iBeacon. The BeaconThings app seems to work really well and always has my correct location, but the reporting to SmartThings doesn’t seem to be as robust.

For example, sometimes I’ll arrive home and BeaconThings will know that, but the change won’t be reflected in SmartThings (even though the iBeacon is definitely in range). In other words, often everything works great but sometimes ST and BeaconThings seem to get a bit out-of-sync.

Does anyone have any tips on increasing the robustness of this communication? Or any other solutions for integrating iBeacons into SmartThings reliably.

Thanks.


(Tim Slagle) #2

@obycode

Thoughts?


(Paul) #3

I’ve had this also, and reported it to Bryce. This seems like the same problem some users are seeing where virtual devices (switches, mostly) forget their state. With all that’s been going wrong with ST, it’s hard to troubleshoot.


(Brice; SmartRulesApp.com) #4

I’ll take a look. If you catch anything in your live logging (https://graph.api.smartthings.com/ide/logs) that looks suspicious, or if nothing shows in the logging when a beacon should change state, please let me know.


(Davood Bonyad) #5

Hi,

Thanks for your help both. I’ve got an example currently where it’s actually happened.

So I left the house this morning, my BeaconThings app updated straight away when I went out of the iBeacon range. However, the beacon item in the SmartThings app did not update and has still not updated. It still shows me as present when I’m definitely not present.

I can even double check in the BeaconThings app and it says “not present”.

I’ve checked the logs as you suggested and there are no entries at all at the time where I exited (normally BeaconThings presence updates would show in the log).

My theory is that when I leave, BeaconThings needs to rely on cellular data to update the ST system, sometimes this connection is less reliable than wifi and the update transmission fails (even though I live in a 4G area so it should always work, I guess it’s still not as reliable as wifi). Would it be possible to modify the app so it tries to update the status in SmartThings three times instead of just once?

It seems that if the BeaconThings transmission to SmartThings fails at the time of the event occurring, it doesn’t retry…

Sorry for the long message, hope this helps!

Thanks.


(Davood Bonyad) #6

Hi!

I’ve done some more testing and can confirm that it always works and updates ST when I’m at home and on the wifi network. I did the tests by switching on and off the iBeacon.

It’s when I leave home and the BeaconThings app tries to update ST to “not present” when I’m not on wifi. I do still have a connection, so it should work, I guess it’s just a little bit slower and less reliable. Again, I’d say if BeaconThings tried the transmission three times (with maybe 10 seconds between each try) it should work.

Thanks.

Davood


(Brice; SmartRulesApp.com) #7

Thanks for the info Davood. The app is not doing any retrying right now, so that could definitely be the problem. Improving the handling of errors is on the todo list.


(Paul) #8

Well that could definitely explain what I’m seeing too!


(Davood Bonyad) #9

Hi Brice,

Thanks for the reply. Sounds good. If you need a hand with anything please let me know, I’m happy to do any beta testing since I know that my situation is leading to known failures at the moment.

In terms of re-trying, my preference would be:

When reporting present: retry sending this message multiple times in quick succession since you are probably waiting for something to happen, e.g. turn lights on so you can see what you’re doing.

When reporting not present: retry multiple times over a longer period (e.g. once every 30 seconds) since it not quite as urgent to make any changes when you’re away from home (i.e. it doesn’t really matter if that light shines for an extra couple of minutes when I’m not there). Also, it might be that the phone is moving away from a wifi network, so it’ll take a few seconds for the phone to realise there is no longer a wifi signal and to default to 3G/4G.

Thanks a lot.

Davood


(Paul) #10

Can the BeaconThings Smart App see the state of the virtual presence sensor? I’d say keep retrying until the SmartApp reports the presence sensor matches the state the iOS app thinks it should be. (Within reason, of course…)


(Sal Marano) #11

I am having the same issue the status on st will not change until u force a refresh on beacon things AP . I can see it change on beacon things but not on smart things. Would pollster have a positive result if used?