Hi there!
I have got a PLC CCU825 running home automation. Working well. This controller has it web portal and API at ccu.sh. Instruction says that to access controller state the following request may be done:
h ttps://ccu.sh:8080/data.cgx?cmd={“Command”:“GetStateAndEvents”}
Also it is written that “Basic HTTP-authentification is used”. The server will return JSON answer.
Currenly I cannot get proper request, web server logs says that I am providing “illegal uri”.
Please help me to configure OpenHAB: HTTP binding, items and example of sitemap.
Example of the JSON:
{
" I n p u t s " : [
{" Ac ti ve ": 1 , " Vol tage “: 0 } ,
{” Ac ti ve ": 0 , " Vol tage “: 2 0 } ,
{” Ac ti ve ": 1 , " Vol tage “: 3 0 } ,
{” Ac ti ve ": 0 , " Vol tage “: 4 0 } ,
{” Ac ti ve ": 1 , " Vol tage “: 5 0 } ,
{” Ac ti ve ": 1 , " Vol tage “: 6 0 } ,
{” Ac ti ve “: 0 , " Vol tage “: 7 0 } ,
{” Ac ti ve “: 1 , " Vol tage “:4095}
] ,
“Outputs " : [ 1 , 0 , 1 , 1 , 1 , 0 , 1 ] ,
" P a r t i t i o n s " : [ " Arm” ,” Disarm " ,” Disarm " ,” Disarm " ] ,
"Case " : 1 ,
"Power " : 1 2 . 3 ,
" Ba t te r y “:{” S ta t e “: “OK” ,” Charge ": 2 0 } ,
“Temp”: 2 5 ,
" Balance “: " NotValid " ,
" Events " : [
{” ID ": 2 4 , " Type ": " I n p u tPa s si v e " ,"Number “: 1 } ,
{” ID ": 2 5 , " Type ": " I n p u tA c ti v e " ,"Number “: 1 6 , " P a r t i t i o n s " : [ 1 , 2 , 3 , 4 ] } ,
{” ID ": 2 6 , " Type ": " PowerRecovery “} ,
{” ID ": 2 7 , " Type ": " PowerFault “} ,
{” ID ": 2 8 , " Type ": " BatteryLow1 “} ,
{” ID ": 2 9 , " Type ": " BatteryLow2 “} ,
{” ID ": 3 0 , " Type ": " BalanceLow “} ,
{” ID ": 3 1 , " Type “: “TempLow”} ,
{” ID “: 3 2 , " Type “: " TempNormal”} ,
{” ID “: 3 3 , " Type “: " TempHigh”} ,
{” ID ": 3 4 , " Type ": " CaseOpen “} ,
{” ID ": 3 5 , " Type ": " Test “} ,
{” ID ": 3 6 , " Type ": " I n f o “} ,
{” ID ": 3 7 , " Type ": " P r o f i l e A p p l i e d " ,"Number “: 1 } ,
{” ID ": 3 8 , " Type ": " DeviceOn “} ,
{” ID ": 3 9 , " Type ": " D e vi c eR e s ta r t “} ,
{” ID ": 4 0 , " Type ": “Arm” ,
" Sou rce “:{” Type ": " Button “}} ,
{” ID ": 4 1 , " Type “: “Arm” ,” P a r t i t i o n " : 1 ,
" Sou rce “:{” Type ": " Inpu t “}} ,
{” ID “: 4 2 , " Type “: “Arm” ,” P a r t i t i o n " : 2 ,
" Sou rce “:{” Type “: " S c h e d ul e r “}} ,
{” ID “: 4 3 , " Type “: “Arm” ,” P a r t i t i o n " : 3 ,
" Sou rce “:{” Type “: “Modbus”}} ,
{” ID “: 4 4 , " Type “: “Arm” ,” P a r t i t i o n " : 4 ,
" Sou rce “:{” Type “: " TouchMemory” ,
“Key”:“0001020304050607” ,“KeyName”: " Vasya “}} ,
{” ID “: 4 5 , " Type “: “Arm” ,” P a r t i t i o n " : 1 ,
" Sou rce “:{” Type “: “DTMF” ,” Phone “:”+71231234567”}} ,
{” ID “: 4 6 , " Type “: " Disarm " ,” P a r t i t i o n " : 2 ,
" Sou rce “:{” Type “: “SMS” ,” Phone “:”+71231234567”}} ,
{” ID “: 4 7 , " Type “: " Disarm " ,” P a r t i t i o n " : 3 ,
" Sou rce “:{” Type “: “CSD” ,” Phone “:”+71231234567”}} ,
{” ID “: 4 8 , " Type “: " Disarm " ,” P a r t i t i o n " : 4 ,
" Sou rce “:{” Type “: " Call " ,” Phone “:”+71231234567”}} ,
{” ID ": 4 9 , " Type “: “Arm” ,” P a r t i t i o n " : 1 ,
" Sou rce “:{” Type “: “GTNet”}} ,
{” ID ": 5 0 , " Type “: " Disarm " ,” P a r t i t i o n " : 2 ,
" Sou rce “:{” Type “: " uGuardNet " ,” UserName “: “Name”}} ,
{” ID ": 5 1 , " Type “: " Disarm " ,” P a r t i t i o n " : 3 ,
" Sou rce “:{” Type “: " S h e l l " ,” UserName “: “Name”}} ,
{” ID ": 5 2 , " Type ": " FirmwareUpgrade “} ,
{” ID ": 5 3 , " Type “: " ExtRuntimeError " ,” ErrorCode ":1}
]
}