I am searching for a way to reboot my BalenaSound Device once a day via cron automatically.
The device dissapears from the airplay device list from time to time and a reboot brings it back.
Therefore I want to reboot it once a day automatically.
I do not care about fixing the real issue, a reboot works and does the job so the quick and dirty solution is fine for me.
What about a simple crontab entry somewhere? Is this not possible?
If not then please tell me more about the container solutions. Sounds complicated to me.
Hey there, you don’t actually need cron if you have a separate service container that will sleep for 24 hours and reboot. As an example, adding something like this to your docker-compose.yml file should work.
Don’t get it. I give up.
Balena is installed on a normal raspberry pi, why is there not simply a cron option to start a reboot.
No idea where I should place that and why it is different from other linux methods but I thank you very much for your answer. I am pretty sure its an easy stuff for someone having enough knowledge and that the problem is me not having that.
The device is dissapearing from airplay from time to time and a reboot often solved the issue so I thought I could easily add a line to a crontab somewhere and its done.
I understand the above might not be looking straight forward. I’ll try and fill in the gaps here for you to give the above solution a try. Please do reach out if anything is still unclear.
Where does this docker-compose.yml is on my local system?
Where in this file I enter the time of the reboot? I see “sleep 1d” but not way to specify a time when I want to have the reboot.
Pretty sure I still think to complicated and I am dare to ask but do you have screenshots of what you suggest?
Hey! Just to be sure, did you deployed balenaSound from balena Hub ? Let me know if thats the case so I can provide some further assistance as to implement this solution.
What you can do is download the balena Sound project from GitHub - using the releases section on the right. This will give you a .zip file that you can download on your machine. Once you extract that zip archive, you can navigate to that from Command Prompt app, and use the balena CLI to push that to your device.
That way you’d get the latest release on your device - and you’d also be able to make changes to the files that you push on your device - as mentioned in the previous answers.
Hey @jolu1705 did you have a chance to look into what Anuj typed?
I assure you what Anuj and Kyle described about modifying the dockerfile is not as complex as it might sound like.
Having said this, if you have the time and motivation, we appreciate understanding the issue more. It’d be great if you could note the errors you see on the balena dashboard. I wonder if you are experiencing the same error reported here: AirPlay crashing after some time · Issue #379 · balenalabs/balena-sound · GitHub
Once we understand what the root cause here, we might be able to resolve it for good for all the balenaSound users. So no one needs to keep restarting their device.
Sorry to necropost but I just followed these instructions to try to get my balena sound fleet to restart daily, but they’re not restarting. Any ideas what to check first?
I did the following:
Add the dbus entry to the very bottom of docker-compose.yml
Is there any sensitive formatting of this file?
Added a dbus folder in the directory with other folders like .github, core, docs, plugins, etc. Create a file called dockerfile.template with the text provided.
Push the updated version of the balena sound project to my fleet using balena cli.