Skip to content

Unavailable Gateway is adding an error to the logs #129893

Open
@noseshimself

Description

The problem

After turning my heating system off (for insertion of a power meter between external unit and heating -- I feel uncomfortable working on 3-phase-power without breaking the circuits) the ViCare integration logged quite a number of these:

PyViCare.PyViCareUtils.PyViCareInvalidDataError: {'viErrorId': '|5682535d-4229fe2a4c76a528.', 'statusCode': 400, 'errorType': 'DEVICE_COMMUNICATION_ERROR', 'message': '', 'extendedPayload': {'httpStatusCode': 'NotFound', 'code': '404', 'reason': 'GATEWAY_OFFLINE'}}

First observation: These were counted against the number of monthly transactions permitted. Greedy censoreds.

Would it be possible to handle the "GATEWAY_OFFLINE" state a bit more gracefully than just ignoring it and logging it as an error?

What version of Home Assistant Core has the issue?

core-2024.10.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ViCare

Link to integration documentation on our website

https://www.home-assistant.io/integrations/vicare

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

PyViCare.PyViCareUtils.PyViCareInvalidDataError: {'viErrorId':
'|5682535d-4229fe2a4c76a528.', 'statusCode': 400, 'errorType':
'DEVICE_COMMUNICATION_ERROR', 'message': '', 'extendedPayload':
{'httpStatusCode': 'NotFound', 'code': '404', 'reason': 'GATEWAY_OFFLINE'}}

Additional information

Maybe adding detection of this state (and a few more, there are indications like the account being temporarily disabled, permanently disabled or the monthly quota being exceeded) and turn them into a text sensor (or a numeric sensor with a text attribute so automations could be launched based on this sensor).

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions