I have 5 Foscam C1 cameras in different room views using stream in lovelace.
The cameras by default are called foscam.camera, foscam.camera.2, etc
The problem is that every time I reboot, a camera I’ve assigned to a view moves to another view. So, a camera for Sitting Room ends up in Kitchen and Kitchen in Hall in a random fashion.
My first guess would be that you didn’t assign static ip addresses, so when they reboot, DHCP is giving them a different address…but that is kind of unlikely that they are just swapping ip addresses.
Looking at the documentation (and code), you should probably assign a real name in your configuration.
name
(string)(Optional)
This parameter allows you to override the name of your camera.
The cameras are discovered asynchronously…so whichever one is the first to reply is going to be named foscam.camera and so on down the line.
This can’t be done in customization or renaming the entity. It has to be right here. If you don’t name them, they get the default name “Foscam Camera”. And HA will just add numbers to them randomly. “Foscam Camera 1”, “Foscam Camera 2”. And they will be in a random order depending on how long it took for them to reply to the rtsp and motion queries. These names will show up as “camera.foscam_camera”, “camera.foscam_camera_1”, “camera.foscam_camera_2”, etc.
By specifying a name like this, it doesn’t matter how long it takes them to reply. There will only ever be a single camera.kitchen, and camera.sitting_room, etc.