Remotely waking up your device

Remotely waking up your device

When your vehicle is parked and ignition is off, your device will go to sleep to save power. But if you are working on a project remotely and want to access your device, its possible to wake up your device from sleep.

To do so, simply send a TEXT/SMS to the phone number associated with your SIM card. This will wake up the device.

Its also possible to list the TEXT/SMS send to the device (if you are using a pre-paid plan and want to check status). This can be done from the ec2x module:

Try this command from the terminal:

ec2x.list_sms

If you find your device not to respond to the SMS wake up, then there is two things you can check:

  1. Check if the modem is “Power save” mode, during sleep. If you go to settings->dongles->advanced->power there is a new section called “modem”
    “Put modem into lower power mode during sleep? When enabled it is no longer possible to wakup device on SMS.”

  2. The modem/SIM has a limit on how many unread messages it can contain. To clear the message you can use this command:
    ec2x.query 'AT+CMGD=1,4'

Please note: Remotely waking up the device is not possible if your device is in hibernation/deep sleep. This will happen if your battery is in poor condition and voltage drops below 12.2V. This is a precausive measure, to ensure that the AutoPi will never drain your battery.

4 Likes

That’s very nice!!
Just a question… can we send commands to the autopi via SMS ? and which type of commands?
Thanks

Hi Fabio

Not at the moment no, it’s currently only for waking up the device.
Do you have a specific use-case?

Best regards
/ Malte

Hi!

Sending SMS from the AutoPi would be nice, then you can check amount of data in your subscription

/Mats

2 Likes

Hi,
For instance, I can set time to switch on the air in my car.
If I forgot to do it, it’s a goo option to send an sms setting clock time to switch on the air.
Thank you.

1 Like

Hi Malte

This thread caught my eye, as one project I had in mind to develop or my AutoPi between now and winter was a remote starting system. Being able to wake up the AutoPi via SMS is a good start, but if I have to then communicate with it by another means to launch the remote-start script, that seems messy, when the command could be initiated by the contents of the SMS.

Simon

Hi Simon, I completely agree with you - and it is definitely possible, but as mentioned, we will need to find a good way to ensure not everyone can text commands to the car.
I first thought that maybe a whitelist of phone numbers, but i’m not sure how easy it is to spoof a sender number.

This is on our backlog, but I can’t say exactly when we will get to it
If you have any ideas etc, about how it could work, we’d love to hear about it :slight_smile:

Best regards
/ Malte

1 Like

Hi Peter,

I read that it goes to sleep after 30 minutes after ignition is off, but if a wake it up sending a text, i think it is going to sleep again after 5 minutes or so, is ok?

Thank you,
Pablo

Hi Pablo,
5 minutes sounds too quick.
I don’t remember if it should wait for 10 or 30 minute, but 5 minutes sounds a tad too quick.

Can you take a look at the events from the device? (see the events on my.autopi.io) - That should give some insight into what is going on.

Feel free to create a topic in troubleshooting.

Best regards
/Malte

One make of car alarms deals with SMS control this way: If a command comes from whitelisted number, no extra code is required. To unlock alarm just send DISARM. If you want to control it from any other number, there must be a code entered prior the command: 1234 DISARM. Works well :slight_smile:

1 Like

can we also remote wakeup via a command over an GPIO pin? (analog/digital)

i saw this config file that no gpio pin is defined only uart:

a saw I2C is shared and i would like to use a GPIO pin to trigger power up/down or use I2C.

Since the last update i can not wake up the device with sms anymore.
Try many times and it is hibernate,
Only in light sleep
Regard Jörgen

Hi @jorgeli,

In the latest release we introduced further power save of the device during sleep. One of the unfortunate sideeffects of this is that wake on SMS feature was disabled. We will make this feature configurable from the next release, so that you can wake on SMS again.

Sorry for the inconvinience and thank you for your patience with us :slight_smile:

Best
Peter

1 Like

Hi,

We’ve made it configurable to enable this feature again.

If you go to settings->dongles->advanced->power there is a new section called “modem”

“Put modem into lower power mode during sleep? When enabled it is no longer possible to wakup device on SMS.”

Just disable this if you want to wake up your device from SMS

best
Peter

2 Likes

aaaah … that explains everything. My device still works perfectly fine but I was indeed unable to wake up device from SMS.

Looking forward to this next release.

Thanks Peter.

Hi Peter,

Unfortunately I have to come back on the given solution earlier.
I have disabled the power save feature (set to = false). But now I can not wake up the device anymore by sending an sms .

Please advice,

Best regards,
Pravin Heera

Can you check the 12 V battery voltage? If it dropped too much, the device will go into Hibernate mode and that turns off the GSM/4G module.

For example, I have set that AutoPi will go to hibernate at 12,1 V. I get an e-mail (I’ve set up triggers for waking up, going to sleep and going to hibernation) and I get e-mails that AutoPi went to hibernation because of low battery voltage ({“event.system.power.reason”:“battery_level_critical”}).
My 12 V battery is in a pretty bad shape but Hyundai refuses to exchange it. I guess it has to come to a state when my car won’t start anymore :frowning:

I cant wake up the device with sms either. Power is fine, modem power save = false.

Have you tried deleting old SMSes? There’s a thread somewhere here where this was the problem.
2G/3G/4G modem couldn’t save any more SMSes (apparently it saves 255 messages) and then it stops responding.

Also on second note, try calling the number. If that works, it may be a full inbox.

Thx for the advice, I have tried deleting SMS, but still no luck. I will have to test the Sim in my phone again.