¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

The alerts from IBKR app are easy to miss ... my solution


 

In my automated setup, I'm restarting IBC/TWS with a cron job every Sunday so that the 2FA session lasts throughout the week.? I'm also attempting a restart every 5 minutes in case TWS is down for an unknown reason.

However, I find the alerts on the phone from IBKR for 2FA are very easy to miss.?

What I did in my script is add (very obnoxious) alert to get my attention in the cases where my script needs to restart TWS and 2FA is needed using Pushover (? I think it's one-time $5 app) which allows for alarm like messages that beep until you physically acknowledge them on the phone and can be set up to override "do not disturb".? ?


if [[ -n $(/usr/bin/pgrep -f "ibcstart.sh") ]]; then
? ? ? ? >&2 echo -e "process is already running"
else
? ? # send an alert through pushover
? ? curl -s \
? ? ? ? ?--form-string "token=**" \
? ? ? ? ?--form-string "user=***" \
? ? ? ? ?--form-string "message=IB Login required" \
? ? ? ? ?--form-string "priority=2" \
? ? ? ? ?--form-string "retry=60" \
? ? ? ? ?--form-string "expire=300" \
? ? ? ? ?https://api.pushover.net/1/messages.json > /dev/null

? ? DISPLAY=:9 && /opt/ibc/$IBC_VERSION/twsstart.sh -inline?
fi
Putting this here in case anyone runs into the same issue


 

many thanks for this. I used your approach and it works great.


 

Have also added the python version script which sends to my my phone - thanks for the tip up Jonathan.?

If anyone knows how to change the volume and priority settings through python, would be grateful. I have tried changing the volume settings for critical alert and defaulting to to critical on the app but to no avail.


 

Mark, I've played with the following:

I use "emergency priority" (2) to make it always play a sound until the user acknowledges receipt.? Defined .? Note for emergency prio, you need to define retry and expire parameters too (see the doc)
{
....
"priority" : 2,
"retry" : 60,
"expire", 300
....
}

There's also an option in the app (not on the python side) to play high priority as an alarm instead of a notification sound.? This will bypass volume settings.

Also note that it doesn't play if the Pushover app is open and visible:??

On Fri, Dec 16, 2022 at 9:27 AM Mark Murari <markm00001@...> wrote:
Have also added the python version script which sends to my my phone - thanks for the tip up Jonathan.?

If anyone knows how to change the volume and priority settings through python, would be grateful. I have tried changing the volume settings for critical alert and defaulting to to critical on the app but to no avail.


 

Thanks Jonathan, I?will play around with the extra settings.