somm15 / PyViCare

Python Library to access Viessmann ViCare API
Apache License 2.0
130 stars 84 forks source link

Online status wrong #333

Open CFenner opened 8 months ago

CFenner commented 8 months ago

Currently the API seems to be on maintainence, and the gateways are listed as offline.

https://api.viessmann.com/iot/v1/equipment/installations/xxx/gateways/

{
    "data": [
        {
            "serial": "xxx",
            "version": "2.8.0.0",
            "firmwareUpdateFailureCounter": 0,
            "autoUpdate": false,
            "createdAt": "2016-12-06T23:32:30.883Z",
            "producedAt": "2016-12-06T12:40:50.000Z",
            "lastStatusChangedAt": "2023-10-16T06:25:43.024Z",
            "aggregatedStatus": "Offline",
            "targetRealm": "DC",
            "gatewayType": "VitoconnectOptolink",
            "installationId": xxx,
            "registeredAt": "2023-07-04T11:51:35.100Z",
            "description": null,
            "otaOngoing": false
        },
        {
            "serial": "xxx",
            "version": "2.8.0.0",
            "firmwareUpdateFailureCounter": 0,
            "autoUpdate": false,
            "createdAt": "2016-06-06T12:07:56.116Z",
            "producedAt": "2016-04-12T14:24:21.000Z",
            "lastStatusChangedAt": "2023-10-16T06:25:54.866Z",
            "aggregatedStatus": "Offline",
            "targetRealm": "DC",
            "gatewayType": "VitoconnectOptolink",
            "installationId": xxx,
            "registeredAt": "2022-05-18T18:20:29.661Z",
            "description": null,
            "otaOngoing": false
        }
    ],
    "cursor": {
        "next": ""
    }
}

But in the Home Assistant logs the devices are listed as online:

2023-10-17 07:18:38.695 INFO (SyncWorker_4) [ViCare] Device found: VScotHO1_40
2023-10-17 07:18:38.695 INFO (SyncWorker_4) [ViCare] Device found: Heatbox1
2023-10-17 07:18:38.695 INFO (SyncWorker_4) [ViCare] Device found: VScotHO1_72
2023-10-17 07:18:38.695 INFO (SyncWorker_4) [ViCare] Device found: Heatbox1
2023-10-17 07:18:38.699 INFO (SyncWorker_4) [custom_components.vicare] Found device: VScotHO1_40 (online: True)
2023-10-17 07:18:38.699 INFO (SyncWorker_4) [custom_components.vicare] Found device: Heatbox1 (online: True)
2023-10-17 07:18:38.699 INFO (SyncWorker_4) [custom_components.vicare] Found device: VScotHO1_72 (online: True)
2023-10-17 07:18:38.700 INFO (SyncWorker_4) [custom_components.vicare] Found device: Heatbox1 (online: True)

Edit: Just checked the gateway itself, where the status is not in sync.

https://api.viessmann.com/iot/v1/equipment/installations/xxx/gateways/xxx

    "data": {
        "serial": "xxx",
        "version": "2.8.0.0",
        "firmwareUpdateFailureCounter": 0,
        "autoUpdate": false,
        "createdAt": "2016-12-06T23:32:30.883Z",
        "producedAt": "2016-12-06T12:40:50.000Z",
        "lastStatusChangedAt": "2023-10-16T06:25:43.024Z",
        "aggregatedStatus": "Offline",
        "targetRealm": "DC",
        "devices": [
            {
                "gatewaySerial": "xxx",
                "id": "0",
                "boilerSerial": "xxx",
                "boilerSerialEditor": "DeviceCommunication",
                "bmuSerial": "xxx",
                "bmuSerialEditor": "DeviceCommunication",
                "createdAt": "2018-06-08T12:48:28.806Z",
                "editedAt": "2023-07-04T12:25:31.733Z",
                "modelId": "VScotHO1_72",
                "status": "Online",
                "deviceType": "heating",
                "roles": [
                    "type:boiler",
                    "type:legacy",
                    "type:product;VScotHO1"
                ],
                "isBoilerSerialEditable": false
            },
            {
                "gatewaySerial": "xxx",
                "id": "gateway",
                "boilerSerial": null,
                "boilerSerialEditor": null,
                "bmuSerial": null,
                "bmuSerialEditor": null,
                "createdAt": "2021-05-19T06:32:22.925Z",
                "editedAt": "2023-10-09T14:23:14.464Z",
                "modelId": "Heatbox1",
                "status": "Online",
                "deviceType": "vitoconnect",
                "roles": [
                    "type:gateway;VitoconnectOpto1",
                    "type:legacy"
                ],
                "isBoilerSerialEditable": false
            }
        ],
        "gatewayType": "VitoconnectOptolink",
        "installationId": xxx,
        "registeredAt": "2023-07-04T11:51:35.100Z",
        "description": null,
        "otaOngoing": false
    }
}

In fact the devices are actually connected to my network.