Download *-bin.zip distribution archive from repository. Unzip the archive in a directory and within that directory issue the following command:
$ java -cp sensnet-cli-0.9.5-SNAPSHOT.jar cythres.sensnet.cli.Console
Now you can type your commands in the console:
open "URL" "root_username" "root_password" open "https://snog.cythres.cz/sn/rest/admin" "operator_1" "4efGGb.33a"
close
quit
adduser "USER" "PASSWORD" "DESCRIPTION" adduser "voice@airport.prague.cz" "efg55ds..3" "Tel 555-345-123"
chuser "USER" [ "OLD_PASS" ] "NEW_PASS" chuser "voice@airport.prague.cz" "efg55ds..3" "efg55ds.x.3"
chudes "USER" "DESCRIPTION" chudes "voice@airport.prague.cz" "Tel 555-123-345"
lsuser [ "FILTER" ] lsuser "%@airport.prague.cz"
rmuser "USER" rmuser "voice@airport.prague.cz"
addrole "NAME" "DESCRIPTION" addrole "net:airport.prague.cz" "vlan airport"
chrole "NAME" "NEW_DESCRIPTION" chrole "net:airport.prague.cz" "vlan"
lsrole [ "FILTER" ] lsrole "%.cz"
rmrole "NAME" rmrole "net:airport.prague.cz"
addres ID "NAME" "MAP_LAYER" "UNITS" "DESCRIPTION" addres 40 "Temperature" "false" "C" "Unit board temperature"
chres ID "NEW_NAME" "NEW_MAP_LAYER" "NEW_UNITS" "NEW_DESCRIPTION" chres 40 "Temperature" "true" "C" "Unit board temperature"
lsres [ "FILTER" ] lsres "Temperature"
rmres id rmres 40
addsens ID RESOURCE_ID "DESCRIPTION" addsens 40 8 "Chip BC440"
chsens ID ( RESOURCE_ID | "NEW_DESCRIPTION" )+ chsens 40 "Chip BC442"
lssens [ "FILTER" ] lssens "Chip BC442"
rmsens id rmsens 40
addunit ID SERIAL CFG PIN Xf Yf TBD "DESCRIPTION" "COMMENT" addunit 501 666 3 1234 15.5f 50.9f true "hello" "broken handle on top"
chunit ID "SERIAL" "CFG" "PIN" "X" "Y" "TBD" "DESCRIPTION" "COMMENT" chunit 501 "" "300" "4321" "" "52.5" "" "bye" "fixed handle on top"
lsunit [ "FILTER" | NUMBER ] lsunit "Chip BC442" lsunit 300
rmunit id rmunit 40
Unit, DataResource and User are tagged with labels (roles). To list, add or remove an existing role use:
label ( unit | resource ) NUMBER ( + | - "ROLE" )? label unit 50 label resource 10 label unit 50 + "res:temperature" label unit 51 - "net:test.domain" label user "USERNAME" ( + | - "ROLE" )? label user "test@test.domain" label user "test@test.domain" + "net:test2.domain" label user "test@test.domain" + "net:test3.domain"