No more videolan.html

I'm a little unclear on what you are recommending.
I have
camera_http_webroot="./www-octopi"
and
camera_usb_options="-d /dev/logitech9000 -r 640x480 -f 10"
in my octopi2.txt that was copied from my original octopi.txt and uncommented per the directions on hatoum.com.
are you suggesting that I change the ./www-octopi to simply ./www
and insert a v4l into the folder path for my device_id? a
Also did you mean for the octopi2.txt to be in the /boot/conf.d instead of just in /boot like octopi.txt?
Also what do you mean about not needing the second service? webcamd2?

Yes, that will enable the default mjpg-streamer web interface on the back end.

Yes

Correct, with this approach you don't need the webcamd2 service described in step 5, the main webcam service will run both. If you made changes to default webcamd you will want to revert those changes.

you can keep this -d /dev/logitech9000 since you've already setup the dev rules for it, assuming that's working.

Quick correction on this one - the directory is /boot/octopi.conf.d.

Does that mean I don't do Hatoum steps 5 , 6 or 7? So I should go in and remove the webcamd2 changes in haproxy.cfg as well?

Yeah, sorry that was a typo.

The reconfiguration of haproxy is optional, you may want those if you are using any tunneling services like octoeverywhere or ngrok plugins for remote access.

ok I've got it where the status shows both the raspi and the USB cam. Now my browser is not recognizing the octoprint IP but I can still ssh into it Mmmmm. I'm also still seeing the
/.www-octopi come up in the status. See below
webcamd.service - the OctoPi webcam daemon with the user specified config
Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-03-28 11:01:08 EDT; 26s ago
Process: 446 ExecStart=/root/bin/webcamd (code=exited, status=0/SUCCESS)
Tasks: 12 (limit: 1939)
CGroup: /system.slice/webcamd.service
β”œβ”€489 ./mjpg_streamer -o output_http.so -w ./www-octopi -p 8082 -i input_uvc.so -d /dev/logitech9000 -r 320x240 -f 5 -d /dev/vid
└─492 ./mjpg_streamer -o output_http.so -w ./www-octopi -p 8080 -i input_raspicam.so -fps 10

Mar 28 11:00:29 octopi mjpg_streamer[489]: MJPG-streamer [489]: www-folder-path......: ./www-octopi/
Mar 28 11:00:29 octopi mjpg_streamer[489]: MJPG-streamer [489]: HTTP TCP port........: 8082
Mar 28 11:00:29 octopi mjpg_streamer[489]: MJPG-streamer [489]: HTTP Listen Address..: (null)
Mar 28 11:00:29 octopi mjpg_streamer[489]: MJPG-streamer [489]: username:password....: disabled
Mar 28 11:00:29 octopi mjpg_streamer[489]: MJPG-streamer [489]: commands.............: enabled
Mar 28 11:00:29 octopi mjpg_streamer[489]: MJPG-streamer [489]: starting input plugin input_uvc.so
Mar 28 11:00:29 octopi mjpg_streamer[489]: MJPG-streamer [489]: starting output plugin: output_http.so (ID: 00)
Mar 28 11:00:34 octopi mjpg_streamer[489]: MJPG-streamer [489]: select() timeout
Mar 28 11:00:34 octopi mjpg_streamer[489]: MJPG-streamer [489]: cleaning up resources allocated by input thread
Mar 28 11:01:08 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.

I've uncommented the camera_http_webroot="./www-octopi" in octopi2.txt and changed it to just just ./www to see how that goes.

Very weird, now I can not access octopi. I can ssh into it by the IP address but through the browser on Chrome, Brave or Edge cannot get to octopi by octopi.local or IP address. Now here is the really weird thing i can now get to http://octopi.local:8080/stream.html again and http://octopi.local:8082/stream.html shows up again but with a white screen for my logitech 9000 but after awhile I lose http://octopi.local:8082/stream.html and I get a " This site can’t be reached octopi.local refused to connect." message. I'm thinking something is up with the ./www vs ./www-octopi thing

Curiouser and curiouser......

the only difference between the two is the web pages that the mjpg-streamer uses to display information. If you want the videolan.html and control.html pages you have to change that. I'd lean more towards that your haproxy configuration is messed up if you are no longer able to access the web interface of octoprint.

You may be right. I decided to "put another nickel in the machine" and start fresh once again. So I reflashed 0.18 octopi and I could once again access octopi through the web browser.

I followed Hartoum up to step five but putting octopi2.txt in a directory called octopi.conf.d.

When I then did the IP address:8080 in the browser I got a a simple white page with a snapshot and a stream. When I did IP address:8081 I got a the white screen with only the titles Snapshot and Stream but no image from the logitech.

I then uncommented the "camera_http_webroot="./www-octopi" line and changed it to only "./www" in both octopi.txt and octopi2.txt. Then the browser brought up the mjpg-streamer webpages for both addresses with 8081 one being blank. When I tried to use the "controls" tab on the webpage to change the image it crashes and will no longer access the webpage until i reboot.

I'm now trying to learn how to send the Logitech camera settings by the command line thru ssh that will give me an image. I do not have another webcam to try but I'm hoping I'll be able to find settings that work for the Logitech 9000 that I could then have preloaded I a script file.

I know the Logitech camera works because I had it running under 0.17

using " v4l2-ctl --set-ctrl=whatever parameter=some value" I was able to cycle through the available parameters without luck. The mjpg-streamer seems to hang on the IPaddress:8081. I also lowered the res to 320 x 240 -f 5 without luck. The Logitech 9000 on the 8081 port will not work on either the multicam or octolapse plugin. So although I can't get the Logitech to work under 0.18 that perhaps belongs on another thread since this one was about videolan.html working and I got that back. I look for a more appropriate thread. Thank you @jneilliii and @Charlie_Powell .

2 Likes

Thanks to a post I found by @Scruff_R in GitHub I can get the Logitech 9000 working again as the second cam to the Raspi cam by
"sudo systemctl restart webcamd".

Now I need to figure out how I can use the System Command Editor to put in the command with password to execute the sudo command. That way I won't have to open SSH after any reboot.

1 Like

I don't think you need to supply a password for sudo service webcamd restart, you just need to add it to your config.yaml for system commands. This is because of the sudoers config in octopi, unless you have a manual install.

I must be missing something. I put this in the command line "sudo systemctl restart webcamd". Or should I put that in the action line?

I get this error when its in the command line :

Command for custom:Restart Webcam failed with return code 1:
STDOUT:
STDERR: sudo: no tty present and no askpass program specified

try with sudo service webcamd restart

Nope. I tried various combinations in both the action field and the command field. Maybe if @Scruff_R sees this he can tell us what he put in the System Command Editor.

I do remember also having some issues to get the command working as expected at first, but I finally found the solution.
Unfortunately I since have switched to another cam and didn't need that command anymore and forgot what I once knew :blush: :man_facepalming:

But I'll dig up the Logitech 9000 again and see if I can jog my memory.

The other service commands can be run because octopi updates the sudoers file stuff to allow it. You may be able to adjust for a similar thing, but looking at my octopi, it seems that "service" should not require a password.

cat /etc/sudoers.d/octoprint-service
pi ALL=NOPASSWD: /usr/sbin/service

This is the system commands I have set up for restarting other services, maybe it will help you figure it out.

system:
  actions:
  - action: octodash_start
    command: sudo service octodash start
    name: Start OctoDash
  - action: octodash_stop
    command: sudo service octodash stop
    name: Stop OctoDash

That rings a bell :+1:

Yup. Showing me that octoprint-service file I realized I was using systemctl vs service. When I changed to sudo service webcamd restart it worked. Thanks once again.

Don't forget to mark the solution...