openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[boschindego] Add operating data #12938

Closed jlaur closed 2 years ago

jlaur commented 2 years ago

The API provides a method for requesting operating data from the device. This includes:

Method: GET https://api.indego.iot.bosch-si.com Path: /api/v1/alms/serialNumber/operatingData

Response example:

{
    "runtime": {
        "total": {
            "operate": 883,
            "charge": 369
        },
        "session": {
            "operate": 0,
            "charge": 0
        }
    },
    "battery": {
        "voltage": 8.2,
        "cycles": 0,
        "discharge": -0.2,
        "ambient_temp": 19,
        "battery_temp": 19,
        "percent": 82
    },
    "garden": {
        "id": 1,
        "name": 1,
        "signal_id": 2,
        "size": 60,
        "inner_bounds": 0,
        "cuts": 0,
        "runtime": 883,
        "charge": 369,
        "bumps": 15,
        "stops": 4,
        "last_mow": 3,
        "map_cell_size": 0
    },
    "hmiKeys": 1403
}

Some of this would be nice to expose in new channels.

It seems that this call might return HTTP code 504 (Gateway Timeout) when device is not reachable. I will need to test this more when my mower is back from repair. If this would be the case, this could be used for marking the thing OFFLINE when in fact it is turned off (as an example). Currently the state requests succeed long after the device has been turned off.

See also: https://github.com/zazaz-de/iot-device-bosch-indego-controller/blob/master/PROTOCOL.md

BillGOH commented 2 years ago

Hello @jlaur,

thanks again for your efforts! Would be a very nice idea to add more channels. I think that two pieces of information might be especially interesting if smart mowing is used: Last mow time end and next mow time. I guess this should also be available via the Bosch API.

I would hope that my mower would run as smooth as the openHAB community!

jlaur commented 2 years ago

@BillGOH - yes, I believe I saw mowing timestamps in some services. I'll create dedicated issues for adding these additional channels. We have 3.3 feature freeze on Sunday, so it will be targeting next release, but I can provide JAR's along the way. Still awaiting my mower back from repair service.

BillGOH commented 2 years ago

Thanks for your quick reply. If you need help in testing, feel free to contact me!