Skip to content

CoreserverConsole

Eric Pinet edited this page Jan 26, 2016 · 4 revisions

Coreserver console

The SSH console in a command line interface to controle the ConnectLife Coreserver.

Use a SSH client to connect the coreserver console. The default port is 9008 and the default username is admin and password is admin. The default hostname of this coreserver is connectlife.

To connect on console execute this command in bash :

ssh -l admin -p 9008 connectlife

If the connection is succesfull the Coreserver will show the welcome message :

****************************************************
*        Welcome to ConnectLife Shell              *
****************************************************

List of available command

quit / exit

Exit the console cli.

exit

output env

Output the system environment (JSON)

output env

Sample of output :

{"version":0,"persons":[{"uid":"972e5a5b-25ae-4e7b-a774-815b01a3c50e","firstname":"Eric","lastname":"Pinet","emails":[{"uid":"dc45d166-e5c1-40e9-88f6-45feea03024a","email":"[email protected]","type":"PERSONAL"},{"uid":"836192f0-9007-40c7-81d4-4ddfcaf48a40","email":"[email protected]","type":"WORK"},{"uid":"c5548017-c6bc-4398-9b7b-064bbd677b83","email":"[email protected]","type":"OTHER"}],"phones":[{"uid":"a6e842b8-0a57-44a1-99f0-5a620407ce3e","phone":"418 998-2481","type":"CELL"},{"uid":"5d56e2c5-7d1c-4037-84e7-143f1923b843","phone":"418 548-1684","type":"OTHER"}],"addresses":[{"uid":"3183a70f-24a4-481f-8e50-9650cbff6088","type":"HOME","street":"2353 rue du cuir","city":"Québec","region":"Québec","zipcode":"G3E0G3","country":"Canada"}]},{"uid":"91d80266-0e8f-49d0-9bf2-447480fecfb8","firstname":"Qiaomei","lastname":"Wang","emails":[{"uid":"1ce00bfb-4e0a-4d50-a564-2aa8360e32f8","email":"[email protected]","type":"PERSONAL"},{"uid":"fbb5912a-e337-4603-8a8b-47e1a40d43d0","email":"[email protected]","type":"WORK"}],"phones":[{"uid":"ac5e34b5-7099-4c12-a04c-682f9b635c47","phone":"438 348-1699","type":"CELL"}],"addresses":[{"uid":"50e12640-10f1-4248-b535-10441f545b25","type":"HOME","street":"2353 rue du cuir","city":"Québec","region":"Québec","zipcode":"G3E0G3","country":"Canada"}]}],"homes":[{"uid":"ccf50e38-4220-4185-ade4-d7d67aa71bb2","label":"Home","zones":[{"uid":"6e7e987b-8953-4257-bf24-37c2c9b7ec5a","label":"First floor","rooms":[{"uid":"051ad593-c9f1-4cd4-9645-f3f80d7e7c25","label":"Leving room","accessories":[{"uid":"09645780-4718-4436-acd1-c7bf04477841","label":"Light","manufacturer":"Philips","model":"100w","serialnumber":"PL001-100-10009","services":[{"uid":"6907bbad-adb4-4b15-94dc-cc5838636511","name":"Light","characteristics":[{"uid":"5529bfbe-7832-4bb7-82ce-d2a9484188cc","label":"Light","mode":"READ_WRITE","type":"BOOLEAN","event":"EVENT","data":"false"},{"uid":"f86a371c-3dff-4d6b-8f2e-30158ba81b39","label":"Dimmable","mode":"READ_WRITE","type":"FLOAT","event":"EVENT","data":"1.0"}]}],"imageurl":"","type":"LIGHT_COLORED_DIMMABLE","protocoltype":"JSON_SIMULATION","isRegister":false}]}]}]}]}

shutdown

Shutdown the system. (After a shutdown, the system will automaticaly reboot).

shutdown

version

Return version number of the server.

version

Sample of return

ConnectLife - CoreServer 1.0.0.0

output configs

Return configurations of the system.

output configs

Sample of return

APISERVER            TCPIP_PORT           INTEGER              9006                
APISERVER            TCPIP_PORT_SECURE    INTEGER              9007                
APISERVER            ADMIN_USERNAME       STRING               admin               
APISERVER            ADMIN_PASSWORD       STRING               admin               
CONSOLE              TCPIP_PORT           INTEGER              9008                
CONSOLE              ADMIN_USERNAME       STRING               admin               
CONSOLE              ADMIN_PASSWORD       STRING               admin               

output config

Return the value of one config.

output config [APISERVER][TCPIP_PORT]

Sample output

APISERVER            TCPIP_PORT           INTEGER              9006 

set config

Change the value of one config.

set config [APISERVER][TCPIP_PORT] 9006

Sample output

Config is updated.

restore factory config

Restore the factory configurations of the system.

restore factory config

Sample output

The Configurations are restored.

output log

Output log of the system.

output log

Sample output

21:13:24.817 [main] DEBUG - com.connectlife.coreserver.Application - Application constructor.
21:13:24.825 [main] INFO  - com.connectlife.coreserver.Application - ConnectLife - CoreServer 1.0.0.0 is starting ...
21:13:24.825 [main] INFO  - com.connectlife.coreserver.Application - Initialization started ...
21:13:24.825 [main] INFO  - com.connectlife.coreserver.Application - Base path: '/Users/ericpinet/github/connectlife/coreserver'.
21:13:24.825 [main] INFO  - com.connectlife.coreserver.config.ConfigSqlite - Initialization in progress ...
21:13:24.831 [main] INFO  - com.connectlife.coreserver.config.ConfigSqlite - Load database file 'data/config.sqlite'
21:13:25.033 [main] INFO  - com.connectlife.coreserver.config.ConfigSqlite - Set database default timeout '30'
Clone this wiki locally