Updated Home (markdown)
parent
dcb536b27e
commit
3f31a4ee4f
11
Home.md
11
Home.md
@ -5,14 +5,17 @@ Welcome to the PVE-mods wiki!
|
|||||||
## Debug external sensor -j output
|
## Debug external sensor -j output
|
||||||
In /usr/share/perl5/PVE/API2/Nodes.pm
|
In /usr/share/perl5/PVE/API2/Nodes.pm
|
||||||
Replace
|
Replace
|
||||||
|
```
|
||||||
|
...
|
||||||
$res->{sensorsOutput}
|
$res->{sensorsOutput}
|
||||||
|
....
|
||||||
|
```
|
||||||
with
|
with
|
||||||
|
|
||||||
`
|
```
|
||||||
my $json_file_path = '/tmp/sensordata.json'; # Ensure this path is correct
|
my $json_file_path = '/tmp/sensordata.json'; # Ensure this path is correct
|
||||||
open my $fh, '<', $json_file_path or die "Cannot open $json_file_path: $!";
|
open my $fh, '<', $json_file_path or die "Cannot open $json_file_path: $!";
|
||||||
my $json_text = do { local $/; <$fh> };
|
my $json_text = do { local $/; <$fh> };
|
||||||
close $fh;
|
close $fh;
|
||||||
`
|
$res->{sensorsOutput} = $json_text;
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue
Block a user