Error after update domoticz 2023.1

And when connecting to Domoticz web interface with the same connection you can see the camera images?

Yes, in browser i see.

I can confirm that the API to retrieve camera snapshot is not working anymore with Basic Authentication in 2023.1. There is nothing specific called out in Domoticz Release Notes, so I’m looking at what has changed in the source code and if there is a workaround.

Additional point on “Allow Basic Authentication over plain HTTP” setting. Depending on your setup, it might need to be enabled for authentication on any Domoticz API. For example, my Domoticz test instance is behind Nginx reverse-proxy, so even though it is going through HTTPS, when it’s proxied to Domoticz it is always as a local non-HTTPS.

The fix, or a workaround I should say, will come in the next patch release (38.6).

1 Like

i use user acounts. i have updated to 2023.1 and i need user.
i use https activated in security tab from domoticz

same here

if i use local, all the camera works

@igor What Api call do you use to get the snapshot? We can mention this in the topic https://www.domoticz.com/forum/viewtopic.php?t=39964 if you feel the issue is really on the Domoticz side.

@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.

There is now other possibilities to authorize for applications, see https://www.domoticz.com/wiki/Security and more detailed https://github.com/domoticz/domoticz/blob/development/SECURITY_SETUP.md

Please contact User Kiddigital if you need extra information.

did anyone manage to connect a camera after the update to 2023.1?
Thx

@waltervl Yeah, I consulted that document. The app previously used only the 3rd method (from Advanced Security section list), so now it also uses the 1st, just like Domotic UI.
It looks like there is an intention to migrate Domoticz UI to 2nd method (JWT token) in the future, so the app would do the same eventually. It is a bigger change, so it couldn’t have been as quickly for this immediate fix.

@Florin_Trica Please wait till 38.6 patch release for the camera fix.

Update - There is a delay in Play Store review process for 38.6 release, so it might take a few more days for it to become available.

Thx !!!

38.6 release is finally through the Play Store review and should be rolling out now

1 Like

Hello
38.6 version solve the problème with caméra and api in domoticz 2023.1
ThankS for the job

1 Like

There still might be an issue if you are using non-stable/beta Domoticz builds. The fix for that is in progress.

I am now on app version 38.7.1 (updated yesterday) and now the app cannot login into Domoticz anymore (authentication error) . With browser or the Domoticz app I can enter Domoticz without problems so it seems home habit specific.

I do not need user accounts as I have the tablet IP in my trusted network on Domoticz settings.
Edit: I am on 2023.1

@waltervl Are you on stable 2023.1 or beta build?