Beiträge von Mcnemisis
-
-
I'm trying to authenticate with the Rpc service i've tried many varations of the following code but nothing seems to click.
Python
Alles anzeigen#!/usr/bin/python import requests from requests.auth import HTTPBasicAuth import json url = "http://192.168.0.29/rpc.php" headers = {'content-type': 'application/json'} payload = {'service':'login','method': 'getInformation','params':[]} ### AUTH Attempt s = requests.Session() print s s.auth=('admin','admin') s.headers.update({'x-test': 'true'}) r = s.get(url,data=json.dumps(payload),headers=headers)
this is only test code but it's bugging the hell out of me..
-
-
thanks I've switched to using the python requests library and been able to get some kind of connection although i keep coming up against this error,
Code{"response":null,"error":{"code":1000,"message":"Failed to get RPC parameters","trace":"exception 'OMVException' with message 'Failed to get RPC parameters' in \/usr\/share\/php\/openmediavault\/rpcproxy.inc:63\nStack trace:\n#0 \/var\/www\/openmediavault\/rpc.php(32): OMVJsonRpcProxy->handle()\n#1 {main}"}}
i suspect this is a caused by a big hole in my knowledge of RPC calls.
-
Not sure if this is the right area but I'm trying to talk to the omv-engined via rpc calls. I'll'll admit I'm new to the whole Rpc area but what I'm trying to work out is where to point my client.
I've found the java code for the web gui's rcp implementation but can't see any kind of address or url for me to point to...I hope that makes sense to someone and fingers crossed someone know the answer...
Matthew -
another quick tip.
pretty sure sensors-detect and pwmconfig will only work as root
so you could try
sudo pwmconfig see if that works -
have a look at this
https://wiki.archlinux.org/index.php/Lm_sensorsit's not specific to omv but is still very a very good guide
-
this will just allow you to see the speeds.
although not for OMV this guide should point you in the right direction that is all depending if your motherboard will support you changing the fan's
https://wiki.archlinux.org/index.php/Fan_Speed_ControlThanks
Matthew -
welcome, just a quick note but it's not recommended to insall omv on a usb stick, i'm pretty sure it kills them fast.
-
I've made the modifications. this now works with fanspeed.
enabled disable are still not hooked in yet, will get on that later -
just out of interest who runs omv-plugins then they have a stable and glass setup,
-
that been going through my mind as well, not 100% sure how i should host any plugins that I make,
something like Arch linux's Aur repo would be cool
-
Hi all,
This is my current testing release of a sensors plugin,
it uses the work from the wiki about one-stop-install of sensor graphs for omv but with an added gui for setting which sensors to use.it's still in testing and so far fanspeed is not implemented i've tested this on a vm and on my working omv-server and not had any issues.
enable is working yet just a place holder.
if you do test it I'm interested in if you can see all of your sensors not including fan sensors.
after testing a dpkg -r openmediavault-sensors should clean you up nicely
Thanks
Matthew -
sweet slight mod and it's working
-
i'll try that now
-
i've fixed that, the script runs but only returns one set of results, just happens to be the last of the loop.
i can't seem to work out how to make the array with the following example contents
array (
"uuid" "1",
"description", "Value from find",
"uuid" "2"
"description" ,"2nd value from find" etc etcThanks
Matthew -
Hi all,
I'm working on another plugin this time it's the gui front end for the all-in-one sensors script.
I've got most of it in place but i've been trying to work around this for a bit and was hoping for some insite / helpi'm trying to use the find command to get a list of all avalable sensors this works will need some tweaking but what i can't do is make an array that contains all the returned results from find.
Code
Alles anzeigenpublic function getSensors() { $cmd = "find /var/lib/collectd/rrd/localhost -name *temp1*"; $temp = array( "uuid" => "12345", "description" => "Test" ); OMVUtil::exec($cmd, $output, $result); $a=0; foreach ($output as $value) { $a == $a + 1; $temp = array ( "uuid" => $a, "description" => $value); # var_dump($temp); # var_dump($temp2); } #var_dump($temp2); #var_dump($temp); return $temp; }
that's my dev code at the moment just to give an idea of what i'm trying to-do.
Basicly i need to return an array containing a uuuid and description of each value that was found in the find cmd
any ideas?
it's a pain when you know what you want todo and getting it to work, very rusty with php. -
do you know if your CPU has the VT extensions etc?
i know my little atom and unfortunately my laptop don't have either so Vm's are always poor -
have you tried apt-get -f upgrade?
-
New version all seems to work I've chewed 3 albums testing,
Still only Lame support at the moment but I'll fix that very soon.