Webiopi loop doesn't work in autostart mode (sudo update-rc.d webiopi defaults)

117 views
Skip to first unread message

trilaci...@gmail.com

unread,
Feb 20, 2017, 1:03:53 AM2/20/17
to WebIOPi
I have setup a macro which helps me to update the UI of the webpage with the values read from serial. And it works perfectly when I run the program using the command: 
sudo webiopi -d -c /etc/webiopi/config

But when I enabled autostart using the command: 
sudo update-rc.d webiopi defaults

the loop() doesn't seem to work. I checked this using Inspect Element in browser, and I could see that the POST requests are all successful. Since the loop is not running, the data I receive is None. And that's why I could see no updates in my webpage. 

How can I resolve this issue?

Thanks

Toshi Bass

unread,
Feb 20, 2017, 11:46:49 AM2/20/17
to WebIOPi
I am guessing your os is jessie
enter   cat /etc/os-release  to be sure.

Jessie does not use  init; therefore, the script  /etc/init.d/webiopi or update-rc.d webiopi defaults  does not work correctly, you need to follow this link  ...

Then you need to use :

sudo webiopi -d -c /etc/webiopi/config   // to debug
sudo systemctl start webiopi                // to start in background
sudo systemctl stop webiopi                // stop 
sudo systemctl enable webiopi             // to start at boot
sudo systemctl disable webiopi            // to cancel start at boot 
tail -f -n 50 /var/log/webiopi                  // view running log info
Reply all
Reply to author
Forward
0 new messages