signalkraft / myPyllant

A Python library to interact with the API behind the myVAILLANT app
MIT License
37 stars 13 forks source link

Error Requested Range Not Satisfiable #88

Open xavan83 opened 4 months ago

xavan83 commented 4 months ago

I was using a previous version of myPyllant (few month ago). I notice that my script (working fine since a few months) was unable to read data since 2months.

The error was for the call async for device_data in api.get_data_by_device(system.devices[0]): aiohttp.client_exceptions.ClientResponseError: 416, message='Requested Range Not Satisfiable', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/xxxxxxxx/devices/xxxxxxxxxx/buckets?resolution=DAY&operationMode=DOMESTIC_HOT_WATER&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2018-11-23T00:00:00Z&endDate=2024-05-12T02:13:01Z')

I upgrade to the last version and run the script with the same error. I want to get the field device_data.extra_fields['total_consumption'] to send the total energy consumed since the boiler installation.

xavan83 commented 3 months ago

I was using this call for system in api.get_systems(True,True,True,False) to get statistics. Now whatever I try to activate the rts data I receive the following response from server: aiohttp.client_exceptions.ClientResponseError: 404, message='Resource Not Found', url=URL('https://api.vaillant-group.com/service-connected-control/vrc700/v1/rts/xxxxxxxxxxxxxxxxxxxxxxxxxxx/devices') (I replace the real system identifier).

For the second call: device_data in api.get_data_by_device(system.devices[0]) I receive: aiohttp.client_exceptions.ClientResponseError: 416, message='Requested Range Not Satisfiable', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/xxxxxxxxx/devices/xxxxxxxxxxx/buckets?resolution=DAY&operationMode=DOMESTIC_HOT_WATER&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2018-11-23T00:00:00Z&endDate=2024-05-21T06:00:58Z')

Unless I add some arguments: device_data in api.get_data_by_device(system.devices[0],DeviceDataBucketResolution.DAY,date.today(),date.today()) But still no total data.