I was thinking the same level as groundcontrol is under software, but the
important thing is to have a category somewhere (and if we can move the existing
webcontrol topics there, all the better)
David Lang
I was thinking the same level as groundcontrol is under software, but the
important thing is to have a category somewhere (and if we can move the existing
webcontrol topics there, all the better)
David Lang
I know, but my concern is that people won’t actually using the subtopic… I don’t generally use them. If it’s a high level topic, it’s more likely people will use it. But anything is better than status quo.
@madgrizzle, This evening I installed webcontrol 0.925-win64-singlefile. The same happened, I opened the nc file but nothing showed on the board. Then I thought let me try it on another laptop, also windows chrome. Same result nothing shows.
Went back to my first laptop and updated my Firefox browser which I almost never use. I copied the link with webcontrol from my chrome browser to Firefox. It opened webcontrol, I then opened the nc file and…. Success!!! It showed the nc file on the board.
But it also appeared in my chrome browser, it’s working! I restarted my laptop to see if it would continue to work and it does. Every time I open a nc file in my chrome browser it shows it on the board.
I hope this helps you in debugging.
To make sure I understand, everything appears to be working now? If so, it could have been an issuing with caching of the javascript file on the chrome browser, though I would have expected the second laptop with chrome not to have had that issue. Let me know if I’m correct that things are working.
@madgrizzle Yes things are working great! I just made a small test with my maslow connected and it works. I used my pen holder and it drew a perfect square.
I checked my other laptop and it still does not show the nc file.
Somehow the Firefox work around fixed the issue with my chrome browser.
It didn’t download or extract the file, so is there anything to look at perhaps to understand why?
Do you have it set to run on startup? If so, try killing the process and then manually starting it from a terminal session. See if there are any error messages that popup when you try to do the upgrade.
it runs as a systemctl service and auto restarts. I copied the link from the release site and wget downloaded it and manually expanded it, the restarted and it is now at the latest version… so the upgrade button is greyed out now and I can’t look at the terminal to see why it isn’t working. I’ll check the next upgrade.
I takes about two minutes to do the upgrade (just did it to make sure it worked). It first downloads, shuts itself down while launching a script to extract the downloaded file and restart webcontrol. So after you press upgrade, everything will look normal until the download is complete. Then, you’ll see “No Connection” in the top right corner indicating your browser isn’t communicating with webcontrol. After a couple of minutes (to extract the downloaded file) you’ll see it change back to connected.
If it’s not working for your install, I wonder if there’s a permission issue or something. Where webcontrol installed?
running as a systemctl service, it autorestarts, so it can’t shut down without restarting automatically. Just for fun I tried killing it (repeatedly - like a bad fps) while the process was enabled and it wouldn’t stop. webctontrol is installed in the pi user directory with pi as the owner.
oh, well that sounds like it would probably stop the upgrade since the extraction would fail because files that are trying to be replaced are being in use.
so next time to upgrade: stop service, run manually, select upgrade -> watch for download messages in terminal?
yes. but if you want to test it, you can ‘downgrade’ back to a previous version.
I just rolled it back to 0.922 and it auto updated when webcontrol was running manually started from the command line. After clicking upgrade from the web page, it is again back at 0.925 after a few minutes. the service is nice for starting it up, but doesn’t let it upgrade. Do you think it would be better to run it as a cron job on start rather than a service?
That’s being my skill set
no, a cron job runs it periodically.
you can set restart=no in a systemd config file so that it won’t keep
restarting. but starting it from init.d/rcX.d/rc.local is probably better.
David Lang
actually a cron job will start a program only at startup if you do this:
@reboot python /home/pi/webcontrol
I thought systemd was the replacement for deprecated rc.local on rpi (debian-based) systems?
systemd is replacing init.d, but it hasn’t eliminated it yet.
what cron file do you put that @reboot line in? that doesn’t match any cron
syntax I know of
raspian still has a rc.local that you can start things in.
David Lang
in your user cron file
$ crontab -e
you can put in the regular timed entries or the @reboot command to only run when the system restarts. My friend google showed me that a couple years ago and it has worked pretty reliably on my other systems. I typically have to consult google for syntax when I make new cron entries anyway. Systemd / systemctl is a more recent thing for me I’m trying to learn, so I could very well be doing it wrong trying to get webcontrol to run automatically. It seemed if webctl was going to autorestart the webcontrol if it stopped, it made sense (at least to me) that setting the system daemon to auto restart would be a good idea, but it doesn’t work with the upgrade script, so maybe it was not the ideal approach. Someone on stack exchange or a similar forum mentioned that with that deprecation looming, it might be best to use systemd instead of init.d. Thanks for the response!
I don’t think that support for init.d will ever completely go away. I was not
aware that cron supported @reboot
you may want to look at using /etc/crontab instead of crontab -e, /etc/crontab
has one extra column to specify the userid to run the command as (so one file
instead of lots) and it can be edited by normal tools (which makes it much
easier to put it under version control)
I understand that the systemd unit file can let you set restart=no so it won’t
restart webcontrol. if it’s on a dedicated Pi, it’s not a big deal to reboot it
if it crashes and you need to restart it.
David Lang