To avoid the known issue on Raspberry pi of multiple notifications when a trigger is met I have created a script as per the “Send data on Trigger” thread. I can run this script manually via ssh and created the appropriate triggers in Cayenne. When the script runs the “device” shows as online on the dashboard and I receive a single text when the trigger is made. So that element seems to be working.
I want this script to run on boot as the pi runs headless.
I have followed the “5 ways to run on boot” instructions - using first the rc.local method and also have tried the init.d method. Neither seem to work. On reboot - the device shows as offline and activiating the trigger i do not get the notification.
I am suspecting could the script be running too early - do I need to delay the script running until after Cayenne and pretty much everything else has started? How do I delay the script running please?