# Gladys Assistant 4.23 : Live camera streaming & Calculations in scenes

**URL:** <https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161>\
**Category:** Actualités\
**Created:** [May 13, 2023, 8:40am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161 "2023-05-13T08:40:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 13, 2023, 8:40am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/1 "2023-05-13T08:40:41Z")

</div>

Hello everyone,

New Gladys release — and it’s a big one!!

The main feature is live camera streaming on the dashboard, but that’s not all 😉

Check out all the new features in this YouTube video:

https://www.youtube.com/embed/cbu1IbvKAKM?feature=oembed&wmode=opaque

Or read the recap on the blog:

> **[Streaming de caméra live dans Gladys Assistant 4.23 | Gladys Assistant](https://gladysassistant.com/fr/blog/camera-live-streaming-gladys-assistant-4-23/?r)**
>
> Surveillez votre logement à distance, chiffré de bout en bout

Don’t hesitate if you have any questions/feedback.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 13, 2023, 8:40am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/2 "2023-05-13T08:40:54Z")

</div>



---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 13, 2023, 10:07am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/3 "2023-05-13T10:07:32Z")

</div>

Hi @PhilippeMA, I just saw that you tried to stream a camera via Gladys Plus about an hour ago, and you got an error because the stream was too large!

For info, there is currently a limit of 10 MB per video chunk.

Out of curiosity, what kind of camera do you have and what settings did you use locally? What resolution is your stream in?

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 13, 2023, 11:57am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/4 "2023-05-13T11:57:40Z")

</div>

Another great update, even though my favorite thing is the confetti 😃

---

<div class="post-metadata">

**Author:** ![GBoulvin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gboulvin/32/10006_2.png) [@GBoulvin](https://community.gladysassistant.com/u/GBoulvin)\
**Post date:** [May 14, 2023, 7:55am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/5 "2023-05-14T07:55:57Z")

</div>

Is it possible to access the live stream of a webcam connected to the Pi running Gladys? (/dev/video0)  
On my setup, it doesn’t work but I don’t know if there’s something to enable…

---

<div class="post-metadata">

**Author:** ![PhilippeMA](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/p/b3f665/32.png) [@PhilippeMA](https://community.gladysassistant.com/u/PhilippeMA)\
**Post date:** [May 14, 2023, 9:03am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/6 "2023-05-14T09:03:19Z")

</div>

Hello @pierre-gilles, the cameras are TP-Link Tapo C210 and C310 running at 1080p; I can’t find the number of fps but it’s at least 15 fps.

Indeed, I get an error message on every launch. By pressing the stream button a second or even third time, it eventually displays.

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [May 14, 2023, 9:18am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/7 "2023-05-14T09:18:05Z")

</div>

I have two Tapo devices and I didn’t have any issues with the live stream.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 14, 2023, 1:16pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/8 "2023-05-14T13:16:41Z")

</div>

Maybe it’s a matter of installing an RTSP server?

---

<div class="post-metadata">

**Author:** ![Kevin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/kevin/32/6521_2.png) [@Kevin](https://community.gladysassistant.com/u/Kevin)\
**Post date:** [May 14, 2023, 7:33pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/9 "2023-05-14T19:33:58Z")

</div>

Hello,

I don’t know if this topic has been addressed/discussed.  
But following the last update, I realized that my scenes no longer worked. Having had other things to do, I only just checked a bit and it turned out the issue was with Zigbee2MQTT.

The interface \*\*\*\*:8080 was no longer reachable. The logs indicated that it was looping. To resolve the problem, you absolutely must select the dongle type in the configuration (new parameter to facilitate future setups).  
Is it normal that it didn’t automatically pick up this parameter for people who already had it configured and working? Or am I the only one who had this problem?

Have a nice evening and a good first day back tomorrow! 🙂

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [May 14, 2023, 8:01pm UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/10 "2023-05-14T20:01:15Z")

</div>

On a Sonoff -P, no problem 🙂

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 15, 2023, 3:45am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/11 "2023-05-15T03:45:16Z")

</div>

> [@guim31](#):
>
> even though my favorite thing is the confetti 😃

It’s my favorite too 😁

> [@GBoulvin](#):
>
> Is it possible to access the live feed of a webcam connected to the Pi on which Gladys is installed? (/dev/video0)

Normally yes, are you sure that this USB port is visible from inside Gladys?

> [@PhilippeMA](#):
>
> Hello @pierre-gilles, the cameras are TP-Link Tapo c210 and c310 running at 1080p; I can’t find the fps count but it’s at least 15 fps.

Ok, interesting that it’s «&nbsp;only&nbsp;» 1080p, because for the record you’re the only one having these errors. Are you on «&nbsp;low&nbsp;» latency?

> [@PhilippeMA](#):
>
> By pressing the stream button a second or even third time, it eventually displays.

In fact the size of each chunk depends on what the stream displays. If the stream doesn’t change much, the video size can shrink and be accepted by Gladys Plus; it’s a bit of luck in your case.

I’ll see what I can do to limit the stream size.

> [@Kevin](#):
>
> Is it normal that it didn’t automatically pick up this setting for people who already had it configured and working? Or am I the only one who had this problem?

That’s a regression! Not normal. What dongle do you have? Did you have to do any specific configuration?

---

<div class="post-metadata">

**Author:** ![GBoulvin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gboulvin/32/10006_2.png) [@GBoulvin](https://community.gladysassistant.com/u/GBoulvin)\
**Post date:** [May 15, 2023, 6:35am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/12 "2023-05-15T06:35:22Z")

</div>

I set it up as in the docs :

 ![Screenshot_20230515_082947_com.android.chrome_edit_348445067324956](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/f/f9dc2acb4ca8df70d39af6219ae1fa791ae4acd3.jpeg)  
But…  
 ![Screenshot_20230515_082919_com.android.chrome_edit_348435326010374](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/c/cd11b27d9dd3872fb497eb8525f140eafa17b2c7.jpeg)  
That said, I only have one stream out of the six cameras that works, but I put that down to the poor performance of the other host RPis (it works with the RPi 2 but not the RPi Zero or the Orange Pi Zero)

---

<div class="post-metadata">

**Author:** ![bjm](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/bjm/32/1753_2.png) [@bjm](https://community.gladysassistant.com/u/bjm)\
**Post date:** [May 15, 2023, 6:52am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/13 "2023-05-15T06:52:43Z")

</div>

No problem for me either, Tube’s USB key on RPI3 64 disk SSD. Par contre j’ai constaté que dans les scènes avec «&nbsp;Continue only if&nbsp;» si la valeur est définie sur zéro, celui-ci a disparu, sur certaines scènes cela n’a pas d’incidence sur d’autre elle ne fonctionnait plus.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 15, 2023, 7:12am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/14 "2023-05-15T07:12:55Z")

</div>

> [@bjm](#):
>
> However I noticed that in scenes with «&nbsp;Continue only if&nbsp;» if the value is set to zero, it disappeared; in some scenes this has no impact, in others it stopped working.

Are you talking about existing scenes? Can you describe how to reproduce the bug?

Re-reading the frontend code, indeed I have the impression there are places where implicit conversions create bugs! It’s my fault, I didn’t pay enough attention during the review of this feature.

cc @bertrandda be careful with implicit conversions, I hadn’t paid attention in the frontend but for example at this line:

> <https://github.com/GladysAssistant/Gladys/commit/e7d09ad4416a93aefab164f3b92347cd6a5a2c03#diff-97f141bfc25e8815456114a6d2607c5125093dd0f541468e72a919437cc7028eR21>

At this line too:

> <https://github.com/GladysAssistant/Gladys/commit/e7d09ad4416a93aefab164f3b92347cd6a5a2c03#diff-97f141bfc25e8815456114a6d2607c5125093dd0f541468e72a919437cc7028eR83>

At this line too:

> <https://github.com/GladysAssistant/Gladys/commit/e7d09ad4416a93aefab164f3b92347cd6a5a2c03#diff-0b361d4133fdbfb667f8991e771a97473e8533863ce8d5f52456ff958987bd7bR32>

If the value is 0, the condition is therefore false and the UI doesn’t perform the expected behavior!

> [@GBoulvin](#):
>
> I configured it as in the docs:

Ok, I admit I’ve never tested this possibility in real life. Do you have some experience with ffmpeg?

You should basically test directly on your Pi to fetch the video stream and save it as an mp4 file, to see if it works or if it’s not supported…

Example tutorial to do that:

> **[How to record webcam video and audio using ffmpeg](https://dev.to/ethand91/how-to-record-webcam-video-and-audio-using-ffmpeg-419c)**
>
> Introduction Hello! 👋 In this tutorial I will show you how to use the ffmpeg command to...

We use ffmpeg on the Gladys side so that’ll give an idea of if it works or not at all 🙂

> [@GBoulvin](#):
>
> It works with the RPi 2 but not the RPi Zero nor the Orange Pi Zero

That’s for sure it will never work; live video streaming requires a somewhat beefy CPU to decode/encode/compress/encrypt the video stream. If the CPU is underpowered, it can’t keep up ^^ I also think it’s a question of the «&nbsp;video function&nbsp;» available in the CPU

---

<div class="post-metadata">

**Author:** ![PhilippeMA](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/p/b3f665/32.png) [@PhilippeMA](https://community.gladysassistant.com/u/PhilippeMA)\
**Post date:** [May 15, 2023, 7:54am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/15 "2023-05-15T07:54:00Z")

</div>

> [@pierre-gilles](#):
>
> Are you in ‹&nbsp;low&nbsp;› latency?

Yes, I confirm that all the cameras are set to ‹&nbsp;low&nbsp;› latency.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 15, 2023, 8:48am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/16 "2023-05-15T08:48:07Z")

</div>

@PhilippeMA I just deployed performance improvements on Gladys Plus that allowed me to increase the size limit per chunk (while waiting to see how to reduce these chunks)

Can you re-test and tell me if it works this time? 🙂

---

<div class="post-metadata">

**Author:** ![PhilippeMA](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/p/b3f665/32.png) [@PhilippeMA](https://community.gladysassistant.com/u/PhilippeMA)\
**Post date:** [May 15, 2023, 9:18am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/17 "2023-05-15T09:18:33Z")

</div>

Thanks @pierre-gilles. I just tested and the result is the same (I changed browsers to Chrome + Firefox, it’s the same).

Is there anything I can do to help you diagnose?

---

<div class="post-metadata">

**Author:** ![bjm](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/bjm/32/1753_2.png) [@bjm](https://community.gladysassistant.com/u/bjm)\
**Post date:** [May 15, 2023, 10:14am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/18 "2023-05-15T10:14:34Z")

</div>

> [@pierre-gilles](#):
>
> Are you talking about existing scenes? Can you describe how to reproduce the bug?

Yes, on an existing scene — notably one with a Sonoff push-button to turn the light on or off. Two identical scenes with «&nbsp;Continue only if&nbsp;» = 0 and the other «&nbsp;Continue only if&nbsp;» = 1.  
In the scene with the 0, the zero had disappeared.  
I could turn it on but not turn it off.  
So I took the opportunity to migrate to the new light

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 15, 2023, 10:48am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/19 "2023-05-15T10:48:05Z")

</div>

> [@PhilippeMA](#):
>
> Thanks @pierre-gilles. I just tested and the result is the same (I changed browsers — Chrome + Firefox — it’s the same).

Several questions:

- Does it work locally? (not via Gladys Plus)
- What hardware are you using to run Gladys? If you run «&nbsp;htop&nbsp;» in the command line while you start a live, what do you see? (CPU/RAM, is everything okay?)
- Is your network good? (Fiber/ADSL?), what is the ping and what speed?
- If you open the inspector (right-click on the page → inspect element), «&nbsp;Network&nbsp;» tab, then «&nbsp;Fetch/XHR&nbsp;». You clear the view then start a camera live, what do you see?

 ![Screenshot 2023-05-15 at 17.44.41](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/9/9cdbb970a4901fadad15b87b8d87b77c43f2d6de.jpeg)

> [@bjm](#):
>
> The scene with the 0 (the zero) had disappeared.

What do you mean by «&nbsp;had disappeared&nbsp;»?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [May 15, 2023, 11:09am UTC](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161/20 "2023-05-15T11:09:13Z")

</div>

I also have a scene that tests a value at 0 and the zero disappears after saving the scene.  
I noticed this because my scene to close a shutter stopped working after the update!

So here’s what I do in my scene

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/f/f38ee43442a7dac8edf39da6328946b4fa27c1c7.png)

I test that the shutter position is greater than 0. If yes then I close the shutter.

When I save the scene there is no error. I then go back and if I open the scene again the 0 has disappeared.

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/a2093879fccf6a82b883a90ff937e1aa8bed0434.png)  
And so the scene doesn’t work

[Next page](https://community.gladysassistant.com/t/gladys-assistant-4-23-live-streaming-de-cameras-calculs-dans-les-scenes/8161.md?page=2)
