dot3k loading radio.py on boot


#1

Hi Folks,

have a little issue I cant get my head around,

I have installed everything and when i change to the relevant directory

python /home/pi/dot3k/python/examples/dot3k/advanced/radio.py

it works :-)

now when I try and add the above to either
/etc/rc.local
python /home/pi/dot3k/python/examples/dot3k/advanced/radio.py &
or
crontab - e as @reboot python /home/pi/dot3k/python/examples/dot3k/advanced/radio.py & neither will work at boot. I have also tried adding sudo to the beginning of both scripts and still nothing.
i should note I only ever use one at a time.

any help greatly appreciated


#2

The best thing to do is create a startup script that looks something like this:

#!/bin.bash
cd /home/pi/dot3k/python/examples/dot3k/advanced/
sudo python radio.py

And save it as something like /home/pi/radio.sh

Then add to your /etc/rc.local:

/home/pi/radio.sh

The cd step is important, since Python will look for plugins, and the vlc.sh in the directory that the script is run.

Good luck!


#3

Unfortunately that hasn’t worked for me.
hhmmm stumped


#4

oops, I forgot to ad the

sh

in front of the /home/pi/radio.sh

so it appears to work now :-)


#5

Ooh. So did I! Had a feeling I’d missed something. Friday brain frazzle!

Glad you got it working. Enjoy!


#6

:-) great product and examples love it!.

Just need to work out how to add a shutdown & reboot to the menu structure and execute it.


#7

Someone contributed a plugin for that, I think, so it should be really straight forward!


#8

I have had a good look around the github but cant seem to find any examples within the plugins, is there a separate repository for contributions?

also where is the rgb default set? i.e. when I first boot up its a blue colour, i prefer a yellow / green :-) can this be defaulted?

any guidance much appreciated

I am loving the screen and radio :)


#9

I’ll have to have a look and see if I can find the plugin.

The screen colour can be changed in, if I remember correctly, Settings -> Backlight. It should remember what you set and load it on startup.

You can also edit dot3k.cfg directly to get the same effect.


#10

Fantastic! Thank you.


#11

I have tracked down the shutdown plugins :-) they were in graph.py plugin.

Great plugins :-)

Many Thanks