Page 1 of 1
Domoticz server denies access by some APIs
Posted: Tuesday 30 January 2024 20:55
by roelvdh
I have a Raspi running Domoticz. Everything runs fine, except 2 APIs that used to run OK but suddenly stopped communicating. I am not aware of any changes to my system around the time this started. The problematic services are Tado and Weatherchannel:
Code: Select all
2024-01-30 20:49:35.138 Error: Tado systeem: Failed to retrieve API environment from https://my.tado.com/webapp/env.js
2024-01-30 20:49:42.474 Error: Weerkanaal: Error getting http data!
This may not be a Domoticz problem but I am out of options so maybe someone has a quick fix?
Edit:
And I cannot reach the Domoticz site either
Code: Select all
pi@EnergyPi:~/domoticz $ sudo ./updaterelease
Stopping Domoticz...
Making backup of current installation...
Output file: backups/domoticz_backup_20240130_210843.tar.gz
Backup finished...
Downloading latest release version...
Problem downloading new Domoticz version!!. Restarting current version...
pi@EnergyPi:~/domoticz $/code]
Re: Domoticz server denies access by some APIs
Posted: Wednesday 31 January 2024 7:38
by lwolf
roelvdh wrote: ↑Tuesday 30 January 2024 20:55
Code: Select all
2024-01-30 20:49:35.138 Error: Tado systeem: Failed to retrieve API environment from https://my.tado.com/webapp/env.js
2024-01-30 20:49:42.474 Error: Weerkanaal: Error getting http data!
This may not be a Domoticz problem but I am out of options so maybe someone has a quick fix?
Try to ssh into the Raspberry and exec the commands below:
If this shows that 8.8.8.8 is reachable you have a working ip gateway.
If the first command work, but this one said
www.google.com is not reachable: your network DNS settings failed, and this is not a Domoticz problem, but system-wide.
Re: Domoticz server denies access by some APIs
Posted: Wednesday 31 January 2024 8:26
by willemd
First thing to do is a router reset. Usually when my domoticz system has trouble accessing other internal systems, it is a router issue.
Re: Domoticz server denies access by some APIs
Posted: Wednesday 31 January 2024 9:42
by roelvdh
Sure, that works normally. In this case I think something went wrong after installing Domoticz 2024.2. The internal web server works fine for ports 8080 and 443 (internal network) but refuses external connections via port 80, and even internally from my Windows machine on the same network:
Code: Select all
C:\Users\Gebruiker>telnet EnergyPi.local 80
Er wordt verbinding gemaakt met EnergyPi.local...Kan geen verbinding met de host maken, op poort 80: Het maken van de verbinding is mislukt
:\Users\Gebruiker>
I will completely uninstall Domoticz and re-install with the Stable version issued yesterday.
Re: Domoticz server denies access by some APIs
Posted: Wednesday 31 January 2024 12:26
by waltervl
Because there is nothing on port 80 from Domoticz. So why do you want to use port 80? A reinstall will not fix this.....
Re: Domoticz server denies access by some APIs
Posted: Wednesday 31 January 2024 16:42
by roelvdh
Indeed,
https://my.tado.com/webapp/env.js will use port 443, but WeatherChannel probably uses port 80 as per the error message. I am still confused why these services suddenly stopped working without any changes from my side besides updating Domoticz.
Re: Domoticz server denies access by some APIs
Posted: Wednesday 31 January 2024 19:25
by waltervl
The internal Domoticz webserver has nothing to do with Domoticz server not able to contact your tado website or your weather channel.
Can you telnet from your Domoticz server to weatherchannel or tado? If not something is wrong in your network settings , could also be on the Domoticz server itself but also on a firewall or router.
Re: Domoticz server denies access by some APIs
Posted: Wednesday 31 January 2024 19:41
by roelvdh
Solved. I decided the problem must be in the RPi, so I rebuilt the RPi from scratch and put back my existing Domoticz files. That worked. I still assume something must have happened to the RPi when upgrading to Domoticz 2024.2, but I leave that for now. You were right about the internal web server: it serves pages but does not communicate with APIs. Thanks for helping me out.
Re: Domoticz server denies access by some APIs
Posted: Thursday 01 February 2024 21:05
by roelvdh
I called it solved and it was, but now I made the same error again and now I understand what happened. Problem was I had changed the hostname of the RPi. That's the way I work: start an upgrade on another RPi and when it works OK, change back the hostname. But that makes existing calls to external APIs invalid, so it seems. Probably a cache problem somewhere. Now really solved!