DewGew / DZGA-Flask

Domoticz Google Assisting using Flask
GNU General Public License v3.0
8 stars 4 forks source link

Error syncing domoticz devices. Domotics says "Deprecated RType () for API request" #88

Closed d-EScape closed 5 months ago

d-EScape commented 5 months ago

Trying to switch from dzga to dzga-flask, but besides the reverse proxy challenges I have been unsuccessful connecting it to Domoticz.

Running the latest Domitcz (2024.4) and the latest DZGA-Flask Every time i press the sync devices button in dzga-flask I get an error in dzga-flask and the domoticz log says: "Status: [WebServer] Deprecated RType () for API request. Call ignored, please use correct API Command! (172.17.0.7)".

The console log for dzga-flask shows: "http://192.168.19.222:8080 "GET /json.htm?custom=sync HTTP/1.1" 200 22"

Seems Domitcz is no longer fulfilling the deprecated api syntax. I don't know it the sync command mentioned above is the culprit, but this is all the relevant logging I could find.

DewGew commented 5 months ago

Trying to switch from dzga to dzga-flask, but besides the reverse proxy challenges I have been unsuccessful connecting it to Domoticz.

Running the latest Domitcz (2024.4) and the latest DZGA-Flask Every time i press the sync devices button in dzga-flask I get an error in dzga-flask and the domoticz log says: "Status: [WebServer] Deprecated RType () for API request. Call ignored, please use correct API Command! (172.17.0.7)".

The console log for dzga-flask shows: "http://192.168.19.222:8080 "GET /json.htm?custom=sync HTTP/1.1" 200 22"

Seems Domitcz is no longer fulfilling the deprecated api syntax. I don't know it the sync command mentioned above is the culprit, but this is all the relevant logging I could find.

Nothing to do the this error in domoticz logs. Its something else. Try running manually to get more logs. "Deprecated RType () for API request" is fixed in latest

d-EScape commented 5 months ago

The RType was indeed not the (only) cause of my problems, but would always and immediately occur after pressing the sync button. The message is gone now.

The error message might have been misleading, because synchronization would also fail when action on google failed. That seemed to be my real problem.

I eventually got dzga-flask working using my existing action on google, but ran into some strange things along the way. If I have some more time I will have to look into that.

For some reason I could not get a newly created action on google to work. It says it is connected and than fails with a "something went wrong". Using the same dzga-flask docker, domoticz and nginx setup.

Before I got that far, I didn't even see the expected traffic on nginx and it looked like dns-rebind protection was blocking it on the router. For some reason traffic for the existing ("classic") dzga service got through (was allready working and kept working). Very strange, since they both used the same fulfillment, oath and token url's (subdomain) and where behind the same nginx proxy (they were not running at the same time of course). Edit: I think this was only a problem from inside my own lan, when the google home app was trying to login to dzga (from a local ip). I was able to login from my phone after I turned of wifi. Will a sync initiated form the dzga-fask ui fail until actions on google was actually logged in and synced from the phone? That would explain why the old dzga did not have the networking problem. In that case the error message could have been more informative.

I would love to hear if there is a logical explanation, otherwise we could close this issue, since the original problem is fixed. Thanks!

DewGew commented 5 months ago

44 same issue

d-EScape commented 5 months ago

The original issue (error message) is fixed, so I will close this issue.

The remaining issue might indeed be related to #44. Although I am able to run dzga-flask behind nginx. As long a I use my existing (old) actions on google setup. The newly created one doesn't work (I followed the instructions by the letter). If I can figure out the difference between them I will report it in #44.