Closed TheReptile closed 5 years ago
Hi, did you exclude localhost from authentication in the settings? Thats under: Local Networks (no username/password). Add 'localhost'.
Yes, I already had localhost excluded, but it didn't work. I tested the getting the url with wget. However I noticed localhost resolved to ::1. Afterwards I disabled ipv6 on my pi. In the end I had to add 127.0.0.1 before it started working.
Ah good catch, should add that to the Readme:) I also just added error logging whenever a call to Domoticz or gBridge fails, 'onStart' failed 'HTTPError'.' doesnt give you a whole lot of information, now it logs the status + reason.
Yeah, I noticed that, a nice addition. But maybe it's better to change the url from localhost to 127.0.0.1? Otherwise people would have to disable ipv6 or edit the hosts file to remove the ::1 alias. adding ::1 to the Local networks doesn't seem to work.
Yes, thanks for the feedback, I will change localhost to 127.0.0.1 tomorrow when I do the sync change, shall we close this issue?
Sure, thanks for your efforts!
Not my intention to reopen old issues, but isn't that a workaround for local installations. I have a domoticz setup in the "cloud" and rather don't want authentication to be disabled for my external ip. Even multiuser systems wil have some issue with this. Easiest would be some kind of Domoticz username password field in the option's. I know it's getting kind of bloated with all the fields, but one could put the definition to "optional".
And to top it of maybe a security warning if your using http, but that just my internal tin foiled hat syndrome. https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s#Authorization
Well, I had refactored it that you could pass in the full URL plus port of your Domoticz system but I stumbled upon the issue that I have no more config vars to store it in. Domoticz has the idiot limit of being able to store something like 6 extra vars. Replacing the port with the full address is not possible because the port always renders to a number.
But why dont you configure the plugin in your remote domoticz? That should just work right? No need of whitelisting ips afaik.
That makes sense, ill edit the url and make a git ignore for future updates, or a sed command, ill figure something out, will be static but serves the purpose. Thanks for clearing that up 👍
Hmm I don't think we completely understand each other. What is your current setup, you have a local domoticz running in your home network, and a remote domoticz on a VPS?
Since I have multiple devices coming from different external ip's i'm running a remote domoticz with authentication for mqtt. As a sort of workaround I'm using a mqtt bridge with two domoticz installations 1x Pi local and 1x VM external over a site-to-site tunnel which is working for my purposes.
Is seems the current plugin doesn't support password authentication for the Domoticz installation. When the plugin starts, I see this in the log: