Jump to content
WallDisplay: 2.0.0-beta3 is uploaded and ready for test ×

http.get getting stuck

Recommended Posts


I am trying to get the sun position with a script. This did work properly last year. Since this year my script isn't working any more. What could be the failure?


function SunPos() {
	//Sonnenposition mittels ipgeolocation API zum aktuellen Zeitpunkt prüfen
	print("SunPos gestartet");
	{url: "http://api.ipgeolocation.io/astronomy?apiKey=myKey&lat=49.1877&long=8.16339"}, 
		function (response, error_code, error_message) {
		  //print("http.get gestartet");
		  if (error_code === 0) {
			let sonne = JSON.parse(response.body);
            let azimuth = Math.round(sonne.sun_azimuth);
			let altitude = Math.round(sonne.sun_altitude);
                    print("Azimuth :", azimuth);
	                print("Altitude :", altitude);				

				//Beschattung Süd-Fenster An
				//Ergänzt am 28.01.2023 " && altitude >= 12"
				if (azimuth > 100 && azimuth < 245) {
					print("Beschattung Süd AN"); 
                    Shelly.call("Switch.set", {'id': 0, 'on': true});
					//Ausgang 1 einschalten
				//Beschattung Süd-Fenster aufheben
				if (azimuth > 245) {
					print("Beschattung Süd AUS Azimuth");
                    Shelly.call("Switch.set", {'id': 0, 'on': false});				

				if (altitude < 12) {
					print("Beschattung Süd AUS Altitude");
                    Shelly.call("Switch.set", {'id': 0, 'on': false});				

		} else {
                    print("Fehler:", error_message); 

The JSON returned looks like this:


Can anyone please help?


Link to comment
Share on other sites

Something is wrong with this call:


because it returns an error:

"message": "Provided API key is not valid. Contact technical support for assistance at support@ipgeolocation.io"


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...