Webcam on MB6HC with SBC
-
I am running a Duet 3 with SBC and would like to have a webcam to view prints in progress. According to the docs, something called motion is included with the 3.4 firmware, which I have. I can't figure out how to get this set up, though. I have hooked up a camera (Logitech C270) to the RPi, and I put http://duet3.local:8081/0/stream in the webcam URL in DWC General>Settings. What other steps do I need to take? Is there a better/easier solution to setting up a webcam with the duet?
-
Do you have the motion webcam plugin installed?
https://github.com/Duet3D/DSF-Plugins/releases
https://docs.duet3d.com/en/User_manual/Reference/DWC_webcam#motion-on-a-raspberry-pi-running-dsf
-
@phaedrux When I try and install the plugin it fails because the plugin service is not started. How do I start it?
-
Can you send M122 in the gcode console and copy and paste the results here?
Have you recently run sudo apt update and sudo apt upgrade on the Pi?
How are you trying to install the plugin?
-
@phaedrux This is a new duet I've been setting up for the last couple of weeks. I ran sudo apt update and upgrade on the pi last week.
The plugin I'm trying to install is the motion webcam plugin, and I'm trying to install it through DWC - where it says install plugins. Is this not the right way?
Here's M122:
m122 === Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.4.0 (2022-03-15 18:57:24) running on Duet 3 MB6HC v1.01 or later (SBC mode) Board ID: 08DJM-956BA-NA3TN-6J9F6-3SN6N-TB8UU Used output buffers: 1 of 40 (12 max) === RTOS === Static ram: 151000 Dynamic ram: 66204 of which 164 recycled Never used RAM 133304, free system stack 218 words Tasks: SBC(ready,0.4%,478) HEAT(notifyWait,0.0%,327) Move(notifyWait,0.0%,352) CanReceiv(notifyWait,0.0%,944) CanSender(notifyWait,0.0%,374) CanClock(delaying,0.0%,333) TMC(notifyWait,7.7%,92) MAIN(running,83.9%,923) IDLE(ready,8.1%,30), total 100.0% Owned mutexes: HTTP(MAIN) === Platform === Last reset 00:00:19 ago, cause: software Last software reset at 2022-05-30 00:02, reason: User, GCodes spinning, available RAM 132704, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task SBC Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 129 MCU temperature: min 40.3, current 40.7, max 41.1 Supply voltage: min 23.9, current 23.9, max 23.9, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 12.0, current 12.0, max 12.0, under voltage events: 0 Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Events: 0 queued, 0 completed Driver 0: standstill, SG min 0, mspos 776, reads 41911, writes 14 timeouts 0 Driver 1: standstill, SG min 0, mspos 504, reads 41911, writes 14 timeouts 0 Driver 2: standstill, SG min 0, mspos 456, reads 41911, writes 14 timeouts 0 Driver 3: standstill, SG min 0, mspos 88, reads 41912, writes 14 timeouts 0 Driver 4: standstill, SG min 0, mspos 8, reads 41915, writes 11 timeouts 0 Driver 5: standstill, SG min 0, mspos 8, reads 41915, writes 11 timeouts 0 Date/time: 2022-05-30 00:02:51 Slowest loop: 1.11ms; fastest: 0.06ms === Storage === Free file entries: 10 SD card 0 not detected, interface speed: 37.5MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === DMs created 125, segments created 0, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 Heater 1 is on, I-accum = 0.0 === GCodes === Segments left: 0 Movement lock held by null HTTP* is doing "M122" in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger* is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty === Filament sensors === Extruder 0 sensor: no data received === CAN === Messages queued 134, received 0, lost 0, boc 0 Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 50 (min 50), ts 97/0/0 Tx timeouts 0,0,96,0,0,36 last cancelled message type 30 dest 127 === SBC interface === Transfer state: 4, failed transfers: 0, checksum errors: 0 RX/TX seq numbers: 854/854 SPI underruns 0, overruns 0 State: 5, disconnects: 0, timeouts: 0, IAP RAM available 0x2b880 Buffer RX/TX: 0/0-0, open files: 0 === Duet Control Server === Duet Control Server v3.4.0 Code buffer space: 4096 Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 0 Full transfers per second: 61.95, max time between full transfers: 366.9ms, max pin wait times: 97.1ms/12.3ms Codes per second: 3.52 Maximum length of RX/TX data transfers: 3120/812
-
Okay, after some searching I found the instructions here: https://github.com/Duet3D/DuetSoftwareFramework/wiki/Changelog-DSF-3.x#version-330. Took a couple of tries, but I finally got the webcam plugin installed.
I've restarted both the SBC and the duet, but still no video stream. I also tried running this again from the console, but still nothing:
sudo systemctl enable duetpluginservice && sudo systemctl enable duetpluginservice-root
What should I try next?
-
Following the instructions on setting up a webcam, I ran
journalctl -u duetpluginservice -f
Here's the results of that:
-- Logs begin at Thu 2019-02-14 04:11:59 CST. -- May 30 09:17:22 duet3 systemd[1]: Starting Duet Plugin Service... May 30 09:17:24 duet3 DuetPluginService[921]: Duet Plugin Service v3.4.0 May 30 09:17:24 duet3 DuetPluginService[921]: Written by Christian Hammacher for Duet3D May 30 09:17:24 duet3 DuetPluginService[921]: Licensed under the terms of the GNU Public License Version 3 May 30 09:17:27 duet3 DuetPluginService[921]: [info] DuetPluginService.Program: Settings loaded May 30 09:17:28 duet3 DuetPluginService[921]: [info] DuetPluginService.Program: Connection established May 30 09:17:30 duet3 DuetPluginService[921]: [info] DuetPluginService.Program: Plugin MotionWebcamServer loaded May 30 09:17:30 duet3 systemd[1]: Started Duet Plugin Service.
I'm not an expert, but I don't see anything unusual there.
-
What do the settings on the webcam section of DWC look like now?
Are you getting any errors anywhere? -
@phaedrux The settings are the same. I have http://duet3.local:8081/0/stream in the webcam URL, and 0 in the update interval. I have nothing in the URL to open field and everything else is blank or off.
I don't see any errors in DWC.
-
Whew! Figured it out - had to go to the plugins tab and start Motion Webcam Server. All working now.
I might eventually want to change over to using this camera for timelapses, but for now this will work.
Thanks for the help!
-