Hello,
I want to create a things file for the shinobi API. my json output from shinobi api request is:
[
{
"mid": "NAME",
"ke": "KEY",
"name": "RPI Cam Flur",
"shto": "[]",
"shfr": "[]",
"details": "",
"type": "mjpeg",
"ext": "mp4",
"protocol": "http",
"host": "192.168.1.202",
"path": "/stream.mjpg",
"port": 9000,
"fps": 1,
"mode": "start",
"width": 640,
"height": 480,
"currentlyWatching": 0,
"currentCpuUsage": 0,
"status": "Watching",
"streams": [
"/dfas/mjpeg/5646dasfa/NAME"
],
"streamsSortedByType": {
"mjpeg": [
"/df654safd/mjpeg/54s6adfas/NAME"
]
}
}
]
now i have created the following things file:
Thing http:url:shinobi_cam1 "RPi Cam Flur" [
baseURL="http://192.168.1.100:PORT/APIKEY/monitor/GROUPKEY/MONID",
refresh=60,
timeout=3000,
bufferSize=2048,
delay=1,
authMode="BASIC",
stateMethod="GET",
commandMethod="GET",
ignoreSSLErrors=true] {
Channels:
Type string : Mode [ commandExtension="/%2$s", stateTransformation="JSONPATH:$.mode", mode="READWRITE" ] //stop = "Disabled", start = "Wa
Type string : Status [ stateTransformation="JSONPATH:$.status", mode="READONLY" ]
Type switch : Host [ stateTransformation="JSONPATH:$.host", mode="READONLY" ]
}
the first error is that i get “HANDLER_CONFIGURATION_PENDING” on the OH3 Things UI. i know the meaning, but where is my mistake?
my second question is: is my “stateTransformation” right according to the json response i pasted above?