@waltervl There is no documented API to get camera snapshots, so I’m using /camsnapshot.jpg
endpoint, which is the same that Domoticz UI uses. Previously that endpoint was accessible with Basic Auth, but that was changed recently, and now Basic Auth only works for JSON API endpoint (/json.htm
).
I believe that was the intention based on changes and comments in Domoticz source code, so the previous behavior could have been just an oversight. Ideally there just should be a specific JSON endpoint to retrieve camera snapshot.
The workaround is to use the same auth flow Domoticz UI uses. That one is cookie-based, which not great for any API usage, but it works. Domoticz Android app is using the same, so should be fine for now.
That should also avoid needing to enable “Allow Basic Authentication over plain HTTP” for some setups as I mentioned above - an extra benefit.