Jump to content

Featured Replies

Posted

So our own @plonkster was so kind to write this script that you can run on the Color Control of the Victron in order to upload your data to PV Output. It is working quite well and so far I haven had any problems with the script it self. 
The only thing that I cannot get going is to load the script at start up , when the Color Control reboots. Currently you need to log in via terminal and then start the script. 
From all the Linux forms I figured that you need to make the script executable and then add it to the rc.local file. 
In Victrons case the rc.local file must be in the /data/ folder and I can confirm that the file is running on startup - I added " echo "running rc.local" > /data/rc_test.txt" and the file was created after boot. 
But the Python scrip just does not run at all - Any one here have a clue as to what I am doing wrong? 

Here is the contents of the rc.local file :

 

sleep 10

/usr/bin/python /data/dbus-pvoutput.py & >/data/pvo_output.log &

echo "running rc.local" > /data/rc_test.txt

exit 0

 

I also attempted :

 

sleep 10

python /data/dbus-pvoutput.py & 

echo "running rc.local" > /data/rc_test.txt

exit 0

 with no luck either , now I assume that I am missing some silly comma or space but if you dont know you dont know.  ;)

 

 

 

My apologies Paul. I saw your message on Whatsapp. It has to do with rc.local running too early, or rather, some of the services it attempts to talk to only comes up a bit later. Vebus is quite a bit slower.

The code needs to be adapted to find services as they come up. It also needs a service directory so daemontools can manage it, like all the other services. There is no answer other than "I need to get to it some time".

  • Author

Ok , I know that @plonkster will work on our script but I could not resist to fiddle a bit more with it. So a hack , for now , will be to add a sleep of 120 sec in the rc.local file that way it will give the Vebus time to start up. So for now it will work and can be adapted later. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...