hnap
hnap
Synopsis
Hnap protocol client.
Usage
(hnap connection operation value)
Returns
result
Where
-
connection is (url username password): a list representing the connection parameters.
-
operation is string: any of the following: "setSocketSettings", "getSocketSettings", "getCurrentPowerConsumition" or "getCurrentTemperature".
-
value is object[0..1]: the value to send (for some operations).
-
url is string: url of the HNAP interface.
-
username is string[0..1]: the username to access the HNAP interface.
-
password is string[0..1]: the password to access the HNAP interface.
-
result is object[0..1]: the result of the operation.
Description
This function calls the HNAP web service interface implemented in some network devices like the wifi smart plug DLink DSP-W215.
Examples
(hnap
("http://192.168.2.33/HNAP1" "admin" "111111")
"getCurrentPowerConsumition"
)
3.5
jmx-get
jmx-get
Synopsis
Gets an atribute value from a JMX server bean.
Usage
(jmx-get url object attribute)
Returns
result
Where
-
url is string: the JMX service url.
-
object is string: the object name.
-
attribute is string[0..1]: the attribute name to read.
-
result is object: the value of the specified attribute of the object.
Description
Gets the value of the specified attribute of the given JMX object bean.
Examples
(jmx-get
"service:jmx:rmi:///jndi/rmi://hiperio:8888/jmxrmi"
"java.lang:type=MemoryPool,name=PS Old Gen"
"Usage"
)
(
"committed" => 517996544
"init" => 179306496
"max" => 1048576000
"used" => 515042368
)
snmp-get
snmp-get
Synopsis
Read object via SNMP protocol.
Usage
(snmp-get ip_port oid ... oid)
Returns
result
Where
-
ip_port is string: the address and port of the SNMP device with this format: address/port.
-
oid is string[1..N]: the oid which value is to be obtained.
-
result is list: a list that contains the value for each oid.
Description
Returns the values of the specified oids.
Examples
(snmp-get "10.1.1.1/161" "1.3.6.1.2.1.1.1.0")
(
"1.3.6.1.2.1.1.1.0" =>
"Cisco Catalyst 4500 L3 Switch"
)