When connecting from DZGA to Domoticz, specified user isn't used.
TheLion opened this issue · 2 comments
Describe the bug:
When a connection is made from DZGA to Domoticz from a IP-address in the local network, the specified user isn't used.
Expected behavior:
That the specified user is used to connect to Domoticz, so only the devices shared with this user are populated to Google Assistant.
Logs:
I don't really think logs would help with this ;-)
Desktop (please complete the following information):
- Domoticz version 2021.1 (build 13949)
- Dzga version 1.10.9 master
- Python Version 3.9.2
Smartphone (please complete the following information):
- Device: Windows 11 PC
Additional context, screenshot:
My local IP range is (of course) specified in Domoticz as local network. Even if I specify basic-auth it doesn't login.
When I connect with my phone over 4G and login with the same user, it works without issues.
Not sure if this is something that can be solved in DZGA.
No matter what user I specify in configuration, the total number of devices always is 129
Disclaimer ;-) : I'm not a DZGA developer but I have done development for several Domoticz plugins. A few months ago I had a similar issue.
It's caused changes in Domoticz. Since release 2021.1 they changed the auth behaviour. The basic auth header is ignored when the client is in the 'Local Networks (no username/password)' setting of Domoticz.
I just tested this again on a 2022.1 Linux box (I don't have access to 2021.1 at the moment). It just accepts every username and password when the client is allowed as 'no username/password':
curl -s -u USERDOESNOTEXIST:FAKEPASSWORD 'http://localhost:8080/json.htm?type=devices&filter=all&used=true&order=Name'
This outputs all my devices.
I dropped DZGA all together.