GPSTracker Region Trigger - Second transition Workaround

In the notes for the GPSTracker Add On (at the very bottom), there is a comment that states " If the binding was restarted only the second transition update will trigger event as the binding has to know the previous state".

Does anyone know of a good workaround for this? I restart my Pi everynight and that first trigger in the morning is always missing. These triggers don’t appear to be something you can use persistence to store. Thank you!

Link to GPS tracker documentation.
GPSTracker Documentation

  • Platform information:
    • Hardware: Raspberry Pi
    • OS: Raspian
    • openHAB version: 2.4 - Package Install

Welcome to the openHAB Community :heart:

Why tho :confused:?

Hi Elias.
I have been using a Pi for about 4 years now running a python script to log temperatures from 4 DS18B20 temp sensors throughout my house. Every once in a while (once a month or so, but not on a consistent basis), that script would hang, and the easy solution was to simply restart the Pi every night.

Oh dear.
Fix your script instead or write a watchdog/wrapper around your script or if all else fails move your script to another Pi, but don’t keep restarting the openHAB machine.
That’s like jumping from the frying pan into the fire (den Teufel mit dem Beelzebub austreiben).
Forgive me but helping you in the way you’re asking for would really be bad advice.
openHAB is designed to run 24/7.

1 Like

@dsturzy since I develop mainly in python3 I could take a look at the script if I spot anything obvious :wink:

Hi Markus/Elias,
Thank you for saving me from myself. The nightly reboot was implemented back when I first started messing around Pi’s and Python, and it just stuck. My script has been through hundred’s of revisions since I first got it going. I’ll comment out the reboot, and see what happens. Thanks again.

If just the python3 script gets stuck, why you don’t restart the script instead? (systemctl etc.)
Or just fix it :rofl: easier said then done I know!
But reading 4 sensors and posting the data to the openHAB RESTAPI should not get the whole system get stuck.

I coded it up with Python 2.7…because… well, that is what the example code I was modifying was in. By commenting out the reboot, i’ll see if the issue causing it to hang still exists and fix it if it does.

I just starting playing around with OpenHAB a week ago in preparation for when stringify goes down, so I haven’t integrated this data with OpenHAB at all yet. One thing at a time…