flopp999 / EaseeCloud-Domoticz

0 stars 0 forks source link

State = 307 #6

Open dl1gfm opened 2 years ago

dl1gfm commented 2 years ago

I tried your plugin for easee wallbox on domoticz 14420, but I do not get it running

2022-07-22 16:41:07.086458 ===onStart=== 2022-07-22 16:41:07.327061 onConnect 2022-07-22 16:41:07.328867 Entered CheckInternet 2022-07-22 16:41:07.330350 Ping 2022-07-22 16:41:08.750525 Internet is OK 2022-07-22 16:41:08.752064 Get Token 2022-07-22 16:41:08.858112 Status = 307 2022-07-22 16:41:08.911604 onDisconnect called for connection 'Get Token'.

flopp999 commented 2 years ago

Hi

I tried to google that code and it says redirect error.

I don't use the plugin myself but I can start it to see what it says

flopp999 commented 2 years ago

It is working for me.

What version of plug-in do you use?

flopp999 commented 2 years ago

I was too quick. I do get values but also get error code 429 which means that I ask for data too often. This I can change in the plugin. But error code 307 I have no idea why you get

dl1gfm commented 2 years ago

Hello I have the following error in the domoticz log: I had installed it new yesteray with the version 0.31 from github.

2022-07-23 06:47:52.866 Ladestation: Worker thread started. 2022-07-23 06:47:52.860 Status: Ladestation: Entering work loop. 2022-07-23 06:47:52.866 Status: Ladestation: Started. 2022-07-23 06:47:56.157 Status: Ladestation: Initialized version 0.31, author 'flopp999' 2022-07-23 06:47:58.648 Error: Ladestation: Status 307 2022-07-23 06:47:58.649 Error: Ladestation: {'Status': '307', 'Headers': {'Date': 'Sat, 23 Jul 2022 04:47:58 GMT', 'Content-Type': 'application/json', 'Content-Length': '0', 'Connection': 'keep-alive', 'Set-Cookie': ['AWSALB=xxxx+xxxxx+xxxxxxxxxxxN; Expires=Sat, 30 Jul 2022 04:47:58 GMT; Path=/', 'AWSALBCORS=xxx/xxxx; Expires=Sat, 30 Jul 2022 04:47:58 GMT; Path=/; SameSite=None; Secure'], 'x-amzn-requestid': 'xxxxx', 'access-control-allow-origin': '*', 'x-amzn-remapped-content-length': '0', 'x-amz-apigw-id': 'xxxxx=', 'x-amzn-remapped-server': 'Kestrel', 'deprecation': 'Tue, 17 May 2022 00:00:00 GMT', 'location': '/api/accounts/login', 'sunset': 'Fri, 01 Jul 2022 00:00:00 GMT', 'link': 'https://api.easee.cloud/api/accounts/login; rel="successor-version"', 'x-amzn-trace-id': 'Root=x-xxxxx-xxxx', 'x-amzn-remapped-date': 'Sat, 23 Jul 2022 04:47:57 GMT', 'x-envoy-upstream-service-time': '17', 'server': 'envoy'}}

delinend commented 2 years ago

Greate Plug-in Flopp99, and thanks for your code's :-)

I also get the error 307 from 4/7-22 i Domoticz. Maybe somthing to do with this ? https://status.easee.com/incidents/zqqdv81f23sx

Best regards

delinend commented 2 years ago

Hmm.. The API autentifikation has changed from "token" to "login" from 1/7-22 https://developer.easee.cloud/reference/post_api-accounts-token

flopp999 commented 2 years ago

Hi I have now updated Main to version 0.33 which includes the new auth link. Thanks for open this issue

delinend commented 2 years ago

Thanks flopp999.

I have removed the Plug-in and reinstalled the new V0.33 and now get date :-)

But now there is a lot of errors in Domoticz log:

2022-07-29 05:30:24.315 Status: EASEE: Initialized version 0.33, author 'flopp999' 2022-07-29 05:30:26.722 EASEE: State updated 2022-07-29 05:30:26.722 Error: EASEE: connectedToCloud 2022-07-29 05:30:27.134 EASEE: Config updated 2022-07-29 05:30:33.054 EASEE: False 2022-07-29 05:30:33.054 EASEE: False 2022-07-29 05:30:33.054 EASEE: False 2022-07-29 05:30:33.054 EASEE: False 2022-07-29 05:30:33.054 EASEE: False 2022-07-29 05:30:33.054 EASEE: False 2022-07-29 05:30:33.054 EASEE: False 2022-07-29 05:30:33.054 EASEE: False 2022-07-29 05:30:33.054 EASEE: False 2022-07-29 05:30:33.055 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:43.083 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.065 EASEE: False 2022-07-29 05:30:53.961 Error: EASEE: Status 429 2022-07-29 05:30:53.961 Error: EASEE: {'Status': '429', 'Data': b'{"status":429,"traceId":"00-7d73895ec2bf7b4da183b4035775073e-af65ee12924c074f-00"}', 'Headers': {'Set-Cookie': ['AWSALB=wOu+2G9r0v2/Qk3I+aVEarl/SICWHYJ8nnKV/AgGIg2noDiSOC9BrHx1gxqrjgeddSVK9IsktLheESWHT46x4pM+09DuGB/ehRNYe3oUgHi9RqtqMUibfDEgegl0; Expires=Fri, 05 Aug 2022 03:30:53 GMT; Path=/', 'AWSALBCORS=wOu+2G9r0v2/Qk3I+aVEarl/SICWHYJ8nnKV/AgGIg2noDiSOC9BrHx1gxqrjgeddSVK9IsktLheESWHT46x4pM+09DuGB/ehRNYe3oUgHi9RqtqMUibfDEgegl0; Expires=Fri, 05 Aug 2022 03:30:53 GMT; Path=/; SameSite=None; Secure'], 'x-amzn-requestid': 'e38f7611-a0ed-4711-b2e4-2ff0bf0e047e', 'x-amzn-remapped-date': 'Fri, 29 Jul 2022 03:30:53 GMT', 'Connection': 'keep-alive', 'x-amz-apigw-id': 'WAohNEa1joEFawA=', 'x-amzn-trace-id': 'Root=1-62e3546d-2729824d5f92760c061eba24', 'Content-Type': 'application/json; charset=utf-8', 'x-envoy-upstream-service-time': '8', 'x-amzn-remapped-content-length': '82', 'x-amzn-remapped-server': 'Kestrel', 'server': 'envoy', 'Content-Length': '82', 'x-amzn-remapped-connection': 'keep-alive', 'Date': 'Fri, 29 Jul 2022 03:30:53 GMT', 'access-control-allow-origin': '*'}} 2022-07-29 05:30:54.363 EASEE: State updated 2022-07-29 05:30:54.788 EASEE: Config updated 2022-07-29 05:30:54.363 Error: EASEE: connectedToCloud 2022-07-29 05:31:03.067 EASEE: False 2022-07-29 05:31:03.067 EASEE: False 2022-07-29 05:31:03.067 EASEE: False 2022-07-29 05:31:03.067 EASEE: False 2022-07-29 05:31:03.067 EASEE: False 2022-07-29 05:31:03.067 EASEE: False 2022-07-29 05:31:03.067 EASEE: False 2022-07-29 05:31:03.068 EASEE: False 2022-07-29 05:31:03.068 EASEE: False 2022-07-29 05:31:03.068 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:13.050 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:23.083 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:33.066 EASEE: False 2022-07-29 05:31:34.261 EASEE: State updated 2022-07-29 05:31:34.655 EASEE: Config updated 2022-07-29 05:31:34.261 Error: EASEE: connectedToCloud

flopp999 commented 2 years ago

Sorry my mistake. I will fix it later today.

delinend commented 2 years ago

Thanks flopp999.

I'll hope you can fix it :-)

Best regards

flopp999 commented 2 years ago

New version 0.34.

I think I removed all printouts that is not necessary.

delinend commented 2 years ago

Thanks flop999.

Just tested 0.34, but I see some strange things in my Domiticz.

Some of my other light in the house, that are turned on, is somtimes turning off, in a interval of ~30-60sec. Maybe the Easee script is running to aggressive ? Or maybe the script is restarting alle plug-in's ?

I use Domoticz on a Windows server2016 Intel and DZ build 14353.

Here som logs: 2022-07-30 13:07:58.361758 ===onStart=== 2022-07-30 13:07:58.465034 onConnect 2022-07-30 13:07:58.465034 Entered CheckInternet 2022-07-30 13:07:58.465034 Ping 2022-07-30 13:07:59.897874 Internet is OK 2022-07-30 13:07:59.898878 Get Token 2022-07-30 13:08:00.099540 onConnect 2022-07-30 13:08:00.099540 Entered CheckInternet 2022-07-30 13:08:00.099540 Ping 2022-07-30 13:08:00.527681 Internet is OK 2022-07-30 13:08:00.527681 Get Charger 2022-07-30 13:08:00.527681 onDisconnect called for connection 'Get Token'. 2022-07-30 13:08:00.727216 onConnect 2022-07-30 13:08:00.727216 Entered CheckInternet 2022-07-30 13:08:00.727216 Ping 2022-07-30 13:08:01.094200 Internet is OK 2022-07-30 13:08:01.094200 Get State 2022-07-30 13:08:01.094200 onDisconnect called for connection 'Get Charger'. 2022-07-30 13:08:01.241594 onConnect 2022-07-30 13:08:01.241594 Entered CheckInternet 2022-07-30 13:08:01.241594 Ping 2022-07-30 13:08:01.589527 Internet is OK 2022-07-30 13:08:01.589527 Get Config 2022-07-30 13:08:01.589527 onDisconnect called for connection 'Get State'. 2022-07-30 13:08:01.691801 onDisconnect called for connection 'Get Config'. 2022-07-30 13:08:27.303293 onConnect 2022-07-30 13:08:27.303293 Entered CheckInternet 2022-07-30 13:08:27.303293 Ping 2022-07-30 13:08:27.594072 Internet is OK 2022-07-30 13:08:27.594072 Get Charger 2022-07-30 13:08:27.594072 onConnect 2022-07-30 13:08:27.594072 Entered CheckInternet 2022-07-30 13:08:27.594072 Ping 2022-07-30 13:08:27.889936 Internet is OK 2022-07-30 13:08:27.889936 Get Charger 2022-07-30 13:08:28.078441 onConnect 2022-07-30 13:08:28.078441 Entered CheckInternet 2022-07-30 13:08:28.079443 Ping 2022-07-30 13:08:31.409479 ===onStart=== 2022-07-30 13:08:31.512756 onConnect 2022-07-30 13:08:31.512756 Entered CheckInternet 2022-07-30 13:08:31.512756 Ping 2022-07-30 13:08:32.856358 Internet is OK 2022-07-30 13:08:32.856358 Get Token 2022-07-30 13:08:32.957629 onDisconnect called for connection 'Get Token'. 2022-07-30 13:08:33.058901 onConnect 2022-07-30 13:08:33.058901 Entered CheckInternet 2022-07-30 13:08:33.058901 Ping 2022-07-30 13:08:33.314587 Internet is OK 2022-07-30 13:08:33.314587 Get Charger 2022-07-30 13:08:33.512115 onConnect 2022-07-30 13:08:33.512115 Entered CheckInternet 2022-07-30 13:08:33.512115 Ping 2022-07-30 13:08:33.778831 Internet is OK 2022-07-30 13:08:33.778831 Get State 2022-07-30 13:08:33.778831 onDisconnect called for connection 'Get Charger'. 2022-07-30 13:08:33.927228 onConnect 2022-07-30 13:08:33.927228 Entered CheckInternet 2022-07-30 13:08:33.928231 Ping 2022-07-30 13:08:34.178902 Internet is OK 2022-07-30 13:08:34.178902 Get Config 2022-07-30 13:08:34.178902 onDisconnect called for connection 'Get State'. 2022-07-30 13:08:34.281177 onDisconnect called for connection 'Get Config'. 2022-07-30 13:09:00.215484 onConnect 2022-07-30 13:09:00.215484 Entered CheckInternet 2022-07-30 13:09:00.215484 Ping 2022-07-30 13:09:00.460139 Internet is OK 2022-07-30 13:09:00.460139 Get Charger 2022-07-30 13:09:00.461142 onConnect 2022-07-30 13:09:00.461142 Entered CheckInternet 2022-07-30 13:09:00.461142 Ping 2022-07-30 13:09:00.721840 Internet is OK 2022-07-30 13:09:00.721840 Get Charger 2022-07-30 13:09:00.772977 Status = 429 2022-07-30 13:09:00.824114 onDisconnect called for connection 'Get Charger'.

And... 2022-07-30 13:53:38.509 EASEE Cloud: State updated 2022-07-30 13:53:39.065 EASEE Cloud: Config updated 2022-07-30 13:54:21.243 EASEE Cloud: Worker thread started. 2022-07-30 13:54:21.243 Status: EASEE Cloud: Entering work loop. 2022-07-30 13:54:21.243 Status: EASEE Cloud: Started. 2022-07-30 13:54:22.157 Status: EASEE Cloud: Initialized version 0.34, author 'flopp999' 2022-07-30 13:54:24.610 EASEE Cloud: State updated 2022-07-30 13:54:25.002 EASEE Cloud: Config updated

flopp999 commented 2 years ago

Everything looks OK. Have you tried to restart Domoticz? If you disable Easee-plugin, do you still have lights turning on/off?

delinend commented 2 years ago

Hmm.. Yes, restartet many times. Also tryed updating DZ to build 14438 now, but still problems. I looks like many of my devices, is updating each ~30-60sec. that normaly is silent. Something in the script, is updating other devices in DZ !? And if I disable the EASEE hardware, then my CPU is going high, at it looks like DZ is going dead, at I have to restart after disabling..

flopp999 commented 2 years ago

Strange

Plug-in should not update anything else except devices that the plugin has created.

Can you try to disable the plugin and create a new hardware as Easee plugin and see if that helps.

delinend commented 2 years ago

I have tryed completly removed Easse from DZ. Reboot DZ, and installed plug-in again, but with same result.

Btw. My lamp is not turning on (Philips Hue's), but i have som Dzvents scripts with timers, that will turn them off after X sec. But they sudenly turns off after 30-60sec, where they normaly is going to turn off, after 380sec ?!?

Maybe somthing in DZ is resetting with Easee plug-in ? If I disable Easee script (hardware) my light timers is OK.

I think that something in the Easee script, is making something in DZ Dzvents script to restart/reset.

Do you have any idea, ther to look for log files for this ?

flopp999 commented 2 years ago

Can you please send a picture of the DZvent, make a screenshot so everything is in the picture

dl1gfm commented 2 years ago

I have installed the latest Version 0.34 and it works fine for me. No errors any more. No other lamps are turning on or off at the moment ...

dl1gfm commented 2 years ago

Domoticz 14440 and 0.34 enable is crashing every 2 to 3 hours. If is it disabled the system is running normal.

delinend commented 2 years ago

I think that there is going some bad things around Python, on DZ release 14440. Without Easee cloud script, my Windows DZ release 14440 is restarting each time a Python script is executed :-(

On my old DZ 14353 release, I ran the old Easee Cloud script without any problems, but with the new 0.34 it's restarting DZ on my old stabel DZ 14353 release. :-(

flopp999 commented 2 years ago

I will check more on this in a few weeks, sorry. I am on holiday and don't have access to my computer

flopp999 commented 2 years ago

I don't use the plugin anymore. I started 0.34 and it took 2 hours and then it kills my Domoticz.

I don't know if I will solve this but I will try.

It will take more than 2 weeks just for your knowledge