Page 1 of 1

Going abroad trigger

Posted: 30 Jul 2020 19:55
by Micky Micky
Hello,

What system setting changes when going abroad?

I want to disable flows when in another country., so I want a trigger that's definitely due to being in a different country. There's many country related settings to choose from. Some I think are to do with my language settings.

I think it's 'country_code'. Currently set at 011 for Great Britain.

Any help would be appreciated.

Micky

Re: Going abroad trigger

Posted: 31 Jul 2020 18:58
by Desmanto
I can't find any value for that. But if you SIM Card abroad, you can init Variables Phone Info, and take the {network_country_iso}. In my case, Indonesia is id.

The other way if you have internet connection, you can init your current location and check the address using API. example here to init city : viewtopic.php?f=5&t=7457&p=21779&hilit=init+city#p21779
You can get the country by js["address"]["country"] or js["address"]["country_code"].


I do have some flow which I want to disable when I am on trip (not necessary abroad). I create Flow timer, which allow me to register some flows, and choose to disable/enable them for a set period of time, before it auto enabled/disabled back. This way, I don't afraid that I forgot to enable back the flows those I disabled before going for the trip.

Re: Going abroad trigger

Posted: 31 Jul 2020 20:52
by Micky Micky
Hello

The problem with the phone info is that it doesn't have a trigger.

I have 6 flows watching for system setting changes. One of them should give a result.

cmc_country_code
country_code
homecity_timezone
homecity_timezone_city
system_locales
wifi_wcm_country_code_from_scan_result

I think the homecity ones won't change.
My money is on country_code.

The thing about your timer method is that it's universal. My idea is to have a bespoke setup for each country.

I'll know the results soon.

Micky

Re: Going abroad trigger

Posted: 09 Aug 2020 19:42
by Micky Micky
Hello

None of mine triggered.

Yours did. I use Mobile Data Type as the trigger as it seems to always drop the data connection when changing networks as the country changes.

Thanks for your help.

Micky