Page 1 of 1

What is "Returned a status: 301"

Posted: Tuesday 18 May 2021 20:56
by Thuis
I have this plugin "Dutch earthquakes". And after an ./updatebeta, i got this "Returned a status: 301" in my Domoticz log.
I've been searching the Google, the wiki and the forum, but am unable to find what the "Returned a status 301" means.
Is there anyone who can tell me?

Thanks in advance.

Re: What is "Returned a status: 301"

Posted: Tuesday 18 May 2021 22:00
by FireWizard
Hello @Thuis

As you are Dutch, have a look at: https://nl.wikipedia.org/wiki/Lijst_van ... tatuscodes

And for the non Dutch, see: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Regards

Dutch Earthquakes plugin Returned a status: 301

Posted: Sunday 13 June 2021 17:54
by wkossen
I have the same error with the earthquakes plugin. Is there a solution found already?

Re: What is "Returned a status: 301"

Posted: Sunday 13 June 2021 23:10
by geschriever
I have also the same error.
The link in the code is working but if you use the code in Domoticz you get the 301

error:2021-06-13 23:06:40.183 Error: Dutch earthquakes: (Dutch earthquakes) Returned a status: 301

Does anyone have a clue what the issue is?

Re: What is "Returned a status: 301"

Posted: Monday 14 June 2021 9:53
by EddyG
The 301 code states: Moved permanently.
So the url completely disapeared (not likely) or has moved to another url.
You have to find the new url and change that in your plugin.
When I manually key in the url in the browser it returns xml ( https://cdn.knmi.nl/knmi/map/page/seism ... MI_RSS.xml )
So it also be a temporary problem or it could be a problem on the Google Maps side.

Re: What is "Returned a status: 301"

Posted: Friday 09 July 2021 12:20
by cweegels
Could it have to do, that the plugin opens a request to knmi, via http and port 80, and not with https and corresponding port?

When I open the url, in my (Chrome) browser on the phone, with http (and no port, defaults 80), like it is in the plugin code, then the browser goes to https url in the address bar.

Plugin update to https and new port needed?

Re: What is "Returned a status: 301"

Posted: Friday 09 July 2021 13:03
by waltervl
cweegels wrote: Friday 09 July 2021 12:20 Could it have to do, that the plugin opens a request to knmi, via http and port 80, and not with https and corresponding port?

When I open the url, in my (Chrome) browser on the phone, with http (and no port, defaults 80), like it is in the plugin code, then the browser goes to https url in the address bar.

Plugin update to https and new port needed?
Make an issue in https://github.com/Xorfor/Domoticz-Last ... ake-Plugin and hopefully the plugin writer will update the plugin (Xorfor normally does...)

Re: What is "Returned a status: 301"

Posted: Monday 02 August 2021 11:47
by geschriever
Hi,

I have solved it this way:
In the plugin.py in the earthquake folder in plugins of domotica, change:

__API_PORT = "80"
in
__API_PORT = "443"

and change the reference HTTP to HTTPS in (see below):

# Connection
self.__rssConn = Domoticz.Connection(
Name="KNMI", Transport="TCP/IP", Protocol="HTTP", Address=self.__API_ADDRESS, Port=self.__API_PORT)
self.__rssConn.Connect()
into
# Connection
self.__rssConn = Domoticz.Connection(
Name="KNMI", Transport="TCP/IP", Protocol="HTTPS", Address=self.__API_ADDRESS, Port=self.__API_PORT)
self.__rssConn.Connect()

After these changes it should work again :)