braindead1 / ioBroker.robonect

ioBroker.robonect is an ioBroker adapter for your Robonect HX enabled lawn mower.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement missing API calls

braindead1 opened this issue · comments

Describe the idea
According to https://forum.robonect.de/viewtopic.php?f=10&t=2535 some API calls are not or not fully implemented. The missing API calls should be implemented if they are useful in the adapter.

GPS

/json?cmd=gps
{"gps": {"satellites": 17, "latitude": "51°19.0000 N", "longitude": "9°23.000 E"}, "successful": true}

Remote start

/json?cmd=remote
{ "remotestart_1": { "name": "Fernstart 1", "visible": true, "path": 2, "proportion": 50, "distance": 10 }, "remotestart_2": { "name": "Fernstart 2", "visible": true, "path": 2, "proportion": 50, "distance": 2 }, "successful": true }

Report

/json?cmd=report
{"report": {"dev": {"enable": false}, "mower": {"feature": {"id": 1, "msw": 6, "brand": "G", "model": "R70Li", "state": 1, "state19": 17, "pwr": false, "stop": false}}, "frame19": {"a": 0, "preventMowing": 2, "d": 1, "stopped": 0, "e": 1, "weatherTimerArmed": 0, "f": 0, "g": 0, "h": 0, "i": 0}, "sync": {"unlocked": true, "clearPending": false, "state": 8, "index": 0}, "odo": {"forward": 2917929, "backward": 153593, "unknown0": 2079, "unknown1": 234, "unknown2": 0, "unknown3": 0, "unknown4": 0, "unknown5": 0}}, "successful": true}

Timer

/json?cmd=timer&timer=1&start=06:00&end=09:00&mo=1&tu=1&we=1&th=1&fr=1&sa=1&su=1&enable=1
Update timer with ID 1

Weather

/json?cmd=weather
JSON is depending on whether City-ID or zip-code is used.
{ "service": { "enable": true, "location": { "zip": "40589", "country": "de" }, "config": { "maxrain": 100, "mintemp": 0, "maxtemp": 50, "minhumidity": 0, "maxhumidity": 100, "dontmowduringday": false, "dontmowduringnight": false } }, "weather": { "break": false, "rain": 0, "temperature": 8, "humidity": 76, "sunrise": 1584686080, "sunset": 1584729925, "day": true, "city": "Düsseldorf", "icon": "https://openweathermap.org/img/w/04d.png", "condition": { "toorainy": false, "toocold": false, "toowarm": false, "toodry": false, "toowet": false, "day": false, "night": false }, "timestamp": { "date": "2020-03-20", "time": "15:38:04", "unix": 1584718684 } }, "successful": true }

{ "service": { "enable": true, "location": { "cityid": 2934246 }, "config": { "maxrain": 100, "mintemp": 0, "maxtemp": 50, "minhumidity": 0, "maxhumidity": 100, "dontmowduringday": false, "dontmowduringnight": false } }, "weather": { "break": false, "rain": 0, "temperature": 8, "humidity": 76, "sunrise": 1584686092, "sunset": 1584729937, "day": true, "city": "Düsseldorf", "icon": "https://openweathermap.org/img/w/04d.png", "condition": { "toorainy": false, "toocold": false, "toowarm": false, "toodry": false, "toowet": false, "day": false, "night": false }, "timestamp": { "date": "2020-03-20", "time": "15:46:33", "unix": 1584719193 } }, "successful": true }

/json?cmd=weather&service=0
Disable weather polling
{"service": {"enable": false}, "weather": {"break": false, "rain": 0, "temperature": 10, "humidity": 61, "sunrise": 1585376188, "sunset": 1585421915, "day": true, "city": "Düsseldorf", "icon": "", "condition": {"toorainy": false, "toocold": false, "toowarm": false, "toodry": false, "toowet": false, "day": false, "night": false}, "timestamp": {"date": "2020-03-28", "time": "09:59:29", "unix": 1585389569}}, "successful": true}

/json?cmd=weather&service=1
Enable weather polling
{"service": {"enable": true, "location": {"zip": "40589", "country": "de"}, "config": {"maxrain": 100, "mintemp": 0, "maxtemp": 50, "minhumidity": 0, "maxhumidity": 100, "dontmowduringday": false, "dontmowduringnight": false}}, "successful": true}

Wire

/json?cmd=wire
{ "sensors": [ { "description": "Sensor front", "quality": 100, "a": 17192, "n": 256, "f": 40817, "g1": 10780 }, { "description": "Sensor rear/left", "quality": 100, "a": 17117, "n": 256, "f": 40653, "g1": 8554 } ], "successful": true }

Polls of GPS and weather implemented in v0.0.11

commented

Please also implement the "Job" API call:

/json?cmd=mode&mode=

....job <Mäher führt einen Mähauftrag aus>
........duration <Dauer des Auftrages. Wenn der Mäher lädt, läuft die 'Uhr' dennoch!>
........start <Startuhrzeit 'hh:mm', kann entfallen, dann gilt 'sofort'
........end <Endzeit 'hh:mm'>
........after <Modus, der nach diesem Mähauftrag aktiviert werden soll. '0' bedeutet, den Modus nicht ändern>
........remotestart <Fernstartpunkt; 0:Ladestation, 1:Startpunkt 1, 2: Startpunkt 2; evtl. 0:Standard(?), 1:Normal(?), 2: Pkt 1, 3: Pkt 2>

Thanks for this nice adapter!