commit d978918b7d510d211460d7a4dfe56432cca2b489 Author: Meliox <5264368+Meliox@users.noreply.github.com> Date: Mon May 27 21:53:30 2024 +0200 Initial Home page diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..09b16e1 --- /dev/null +++ b/Home.md @@ -0,0 +1,17 @@ +Welcome to the PVE-mods wiki! + + +#Development note: +## Debug external sensor -j out, +In /usr/share/perl5/PVE/API2/Nodes.pm +Replace +`$res->{sensorsOutput}` +with +` my $json_file_path = '/tmp/sensordata.json'; # Ensure this path is correct and file has chmod 777` + + `# Read JSON data from the file` + `open my $fh, '<', $json_file_path or die "Cannot open $json_file_path: $!";` + `my $json_text = do { local $/; <$fh> };` + `close $fh;` + + `$res->{sensorsOutput} = $json_text;`