Error after update domoticz 2023.1

After update domoticz to 2023.1, i can’t see camera in home habit interface.

the error message is:
Video format error.
I checked the function: Camera streaming (legacy)

I have the same problem but only when i am outside of my house
On the wifi it’s ok
On the 4/5 G it’s not ok

did you find some solution ?

This is some kind of authentication problem. Images only pass through a secure network. It’s more of a domoticz error than a homehabit.

I do not have it on my homehabit system.
Possibly related to user accounts and new security settings.
Check wiki page
Pay attention to Trusted networks settings and the “Allow Basic Authentication over plain HTTP” setting.

check the Allow Basic Authentication over plain HTTP.
i think it’s something else.

Do you use http or https to contact Domoticz?
Do you use accounts to enter Domoticz?

Https with account, via dataplicity wormhole. All switches and sensors work, just camera not.

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 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 and more detailed

Please contact User Kiddigital if you need extra information.

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

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