Ok, I'm getting somewhere. Seems as soon as I logged into the jail it wasn't putting me into the correct folder. I've got it all installed but it still wont start up automatically or via the octoprint menu.
When I try service octoprint start or service octoprint status its stating:
root@OctoPrint:/ # service octoprint status
/etc/rc.d/octoprint: WARNING: $command_interpreter /root/OctoPrint/venv/bin/python2.7 != /root/OctoPrint/venv/bin/python3.8
/etc/rc.d/octoprint: WARNING: $octoprint_enable is not set properly - see rc.conf(5).
Cannot 'status' octoprint. Set octoprint_enable to YES in /etc/rc.conf or use 'onestatus' instead of 'status'.
root@OctoPrint:/ #
I have added the line octoprint_enable="YES" to the /etc/rc.conf and also made the script (octoprint) executable. I also noticed the usbconfig also gives an error: no device match or lack of permissions But this maybe because I'm putting the usb ports to my VM, but not sure on that.
I've never been able to get the octoprint menu start/restart to work - but I rarely use it - so I just accepted the limitation of my skills . Once you get the jail to autostart it - you should be good.
Based on the first warning - I'm guessing you have python 3.8 installed, but there's a mismatch to python2.7
The second warning should have been addressed by your edit to rc.conf.
IIRC, if you've defined allow_mount_devfs in your jail definition - you should be okay regarding the USB ports. But this will be pretty obvious if you're able/not able to connect to your printer.
root@OctoPrint:/usr/local/etc # service octoprint status
/etc/rc.d/octoprint: WARNING: $octoprint_enable is not set properly - see rc.conf(5).
Cannot 'status' octoprint. Set octoprint_enable to YES in /etc/rc.conf or use 'onestatus' instead of 'status'.
root@OctoPrint:/usr/local/etc #
Yep I have the 'iknowwhatimdoing' in the server command
I thought I would give the enable command ago and it stated it changed it from YES -> YES but now shows that theres no octoprint in the directory or not executable:
service ocotoprint start
ocotoprint does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
lol, its in the folder its stating it isnt, I've just copied the file from where it says it isn't into /usr/local/etc/rc.d/ folder and its gone back to the message:
root@OctoPrint:/usr/local/etc/rc.d # service octoprint restart
/etc/rc.d/octoprint: WARNING: $octoprint_enable is not set properly - see rc.conf(5).
Cannot 'restart' octoprint. Set octoprint_enable to YES in /etc/rc.conf or use 'onerestart' instead of 'restart'.
root@OctoPrint:/usr/local/etc/rc.d #
I've just deleted the OctoPrint file from that folder and restarted the jail.
Heres the details of the octoprint file from the /etc/rc.d/ folder
-rwxr-xr-x 1 root wheel 427 Jan 16 17:24 octoprint
Using the 'service octoprint onestart' or onestatus or onerestart all work, but not from the menu part of octoprint and if I install a plugin I have to restart the service from within putty or the truenas shell
Yes, I haven't been able to get service restart to work from the Octoprint menu - but for me, it's a small nuisance since normally, I'm not needing to restart it after it's all setup.
Maybe there was a conflict with the two rc scripts - if onestart works, then your service is defined - what about restart at the command line?
Well I think I’ve solved my issues, I did have a usb pci card pass through to Ubuntu where I had octoprint installed which is why octoprint in the jail couldn’t see the printer. But after I disabled that passthrough and reinstalled a brand new jail and then installed everything from the guide it’s now all working, well except the menu part which will turn octoprint off but won’t restart it even with the onerestart command. To restart octoprint I have to login to the jail and use the service command that way, but it does seem rare to have to reboot it after I’ve got everything installed.
For those interested, after setting OctoPrint up I installed all the plugins I normally use and one was causing issues PrintTimeGenius, as it was trying to find a marlin calculator for the OS which there wasn’t one. But with the help of the creator of the plug-in I’ve made a calculator for freebsd (TrueNas) and shared it with the creator.
From what I've read its all to do with the permissions within freebsd. Unfortunately I've been unable to get any webcam working following all different guides even those from freebsd.
Well I’ve gone a funny way about it, but I’ve got a webcam working on octoprint.
For what I got working I made a Ubuntu VM as I needed it for a CCTV program and from there I was able to get a feed from that program to feed into Octoprint. The program I’m using is AgentDvr which allows a MJPG feed in the format of:
192.168.0.2/video.mjpg?oids=1&size=1280x720
The ‘oids=1’ is the camera feed of which camera you want to appear. So if you have for example 5 cameras and your printer camera is on feed 5 you’d change it to ‘oids=5’