3dprint: update mjpg-streamer to use pseyecam

This commit is contained in:
makefu 2024-01-18 00:59:05 +01:00
parent fffe49760d
commit ba1565adba
No known key found for this signature in database
GPG key ID: 36F7711F3FC0F225

View file

@ -1,6 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
let let
#dev = "/dev/web_cam";
dev = "/dev/web_cam"; dev = "/dev/web_cam";
in in
{ {
@ -8,13 +7,13 @@ in
enable = true; enable = true;
# new camera # new camera
#inputPlugin = "input_uvc.so -d ${dev} -r 1280x960"; #inputPlugin = "input_uvc.so -d ${dev} -r 1280x960";
# inputPlugin = "input_uvc.so -y -d ${dev} -r 640x480";
# ps eye came # ps eye came
inputPlugin = "input_uvc.so -y -d ${dev} -r 640x480 -f 5";
inputPlugin = "input_uvc.so -d ${dev} -r 640x480 -y -f 30 -q 50 -n";
# outputPlugin = "output_http.so -w @www@ -n -p 18088"; # outputPlugin = "output_http.so -w @www@ -n -p 18088";
}; };
users.users.octoprint.extraGroups = [ "video" ]; users.users.octoprint.extraGroups = [ "video" ];
users.users.mjpg-streamer.extraGroups = [ "video" ];
# allow octoprint to access /dev/vchiq # allow octoprint to access /dev/vchiq
# also ensure that the webcam always comes up under the same name # also ensure that the webcam always comes up under the same name
@ -37,21 +36,19 @@ in
# octolapse # octolapse
(buildPlugin rec { (buildPlugin rec {
pname = "OctoPrint-HomeAssistant"; pname = "OctoPrint-HomeAssistant";
version = "3.6.2"; version = "3.7.0";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "cmroche"; owner = "cmroche";
repo = pname; repo = pname;
rev = version; rev = version;
hash = "sha256-oo9OBmHoJFNGK7u9cVouMuBuUcUxRUrY0ppRq0OS1ro="; hash = "sha256-R6ayI8KHpBSR2Cnp6B2mKdJGHaxTENkOKvbvILLte2E=";
}; };
}) })
]; ];
extraConfig.plugins.mqtt.broker = { extraConfig.plugins.mqtt.broker = {
url = "192.168.111.11"; url = "192.168.111.11";
# TODO TODO TODO
username = "hass"; username = "hass";
password = "lksue43jrf"; password = "lksue43jrf";
# TODO TODO TODO
}; };
}; };
} }