watchforstock / evohome-client

Python client to access the Evohome web service
Apache License 2.0
88 stars 52 forks source link

backup function gives error #125

Open mptheone opened 1 year ago

mptheone commented 1 year ago

Hello, I wanted to use with the evohome api the backup schedule feature. See below my errors.

grafik

watchforstock commented 1 year ago

The first line of that output implies you have a formatting issue in your code (which Python can be very particular about). See if you can sort that out and then try again as it may be causing the subsequent issue.

a-wicks commented 11 months ago

Trying to get my heating setup for the winter ahead I have experienced the same issue today. The code was working fine last time I ran it (probably spring-time this year).

This is the line throwing the error: self.client.zone_schedules_backup(self.schedule_backup_filename) and this is the error requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://tccna.honeywell.com/WebAPI/emea/api/v1/temperatureZone/8327766/schedule Any ideas how to proceed?

a-wicks commented 9 months ago

Trying to get my heating setup for the winter ahead I have experienced the same issue today. The code was working fine last time I ran it (probably spring-time this year).

This is the line throwing the error: self.client.zone_schedules_backup(self.schedule_backup_filename) and this is the error requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://tccna.honeywell.com/WebAPI/emea/api/v1/temperatureZone/8327766/schedule Any ideas how to proceed?

I found the cause for the error I was experiencing - it was due to a ghost zone. I managed to remove this by removing and then re-adding my setup via the website and then I was able to successfully backup

zxdavb commented 9 months ago

@watchforstock Andrew, I had a similar problem, wrapping each xxx.schedule() in zone_schedules_backup() with a try did the trick:

try:
    schedule = zone.schedule()
except HttpError:
    _LOGGER.warning(...
    schedule = {}