# Camera streamer & player with auto discovery

**URL:** <https://forums.balena.io/t/camera-streamer-player-with-auto-discovery/17114>\
**Category:** Project help\
**Created:** [June 25, 2019, 11:31pm UTC](https://forums.balena.io/t/camera-streamer-player-with-auto-discovery/17114 "2019-06-25T23:31:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zrzka](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/zrzka/32/1612_2.png) [@zrzka](https://forums.balena.io/u/zrzka)\
**Post date:** [June 25, 2019, 11:31pm UTC](https://forums.balena.io/t/camera-streamer-player-with-auto-discovery/17114/1 "2019-06-25T23:31:40Z")

</div>

# Back sleeping monitor

I can’t sleep in this weather (37°C), so, I quickly hacked camera streamer & camera player with auto discovery. I did it because we’d like to monitor if our baby is back sleeping or not when we put her into a bed.

What this auto discovery means? Just put both devices on the same network and they’ll find each other. No need to configure IP address of the player, etc.

## Camera player

- Repository [camera-player](https://github.com/zrzka/camera-player)

### Functionality

- Announces `_cameraplayer._udp` service via Avahi (host)
- Launches `omxplayer`, which is playing whatever is send to the port `5000` via UDP

### Hardware

- Raspberry Pi 3B+
- Raspberry 7" touch display

## Camera streamer

- Repository [camera-streamer](https://github.com/zrzka/camera-streamer)

### Functionality

- Discovers `_cameraplayer._udp` service via Zeroconf (Python)
- Launches `raspivid`, which then starts sending video stream to the discovered IP address & port

### Hardware

- Raspberry Pi 3B+
- Raspberry Camera V2

## Hardware notes

You don’t have to use RPi 3B+ for camera streamer. I used it, because I had it at hand. It can be easily replaced with Zero W for example.

It’s summer, lot of light, Camera V2 is enough now. During winter, when it’s too dark quiet soon, I’d recommend to replace it with IR cut camera ([this one for example](https://www.waveshare.com/rpi-ir-cut-camera.htm)). Because of this feature:

> Embedded removable IR-CUT filter, eliminating colour distortion in the daylight

Which means that you can use it with any light conditions.

And finally, here’s the picture 🙂

 ![IMG_1731](https://global.discourse-cdn.com/balena/original/2X/b/b174b2af775d1e680e842904b2aaa9904f15481b.jpeg)

---

<div class="post-metadata">

**Author:** ![zrzka](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/zrzka/32/1612_2.png) [@zrzka](https://forums.balena.io/u/zrzka)\
**Post date:** [June 27, 2019, 11:14am UTC](https://forums.balena.io/t/camera-streamer-player-with-auto-discovery/17114/3 "2019-06-27T11:14:45Z")

</div>

# Camera streamer update

## Camera

Replaced with:

- [MakerHawk Raspberry Pi3 Camera IR Fisheye Wide-angle 175 Degree 5MP OV5647 Webcam Automatically Switching between Day-Vision and Night-Vision Shooing Mode for Raspberry Pi 3B/3B+ and Pi 2B B+](https://www.amazon.co.uk/dp/B07DRH5Y5S/ref=pe_3187911_189395841_TE_dp_2)

There’s a ton of similar cameras for RPi. Did choose this one, because it has built-in IR-CUT, but the important fact is that everything is done **automatically**. Other models around require you to use GPIO to remove the IR filter, etc. This one is plug & play.

## Case

- [GeeekPi for Raspberry Pi 3 B+ Acrylic Case with Cooling Fan, Raspberry Pi Heatsinks, Compatible with Raspberry Pi 2B/3B/3B+](https://www.amazon.co.uk/dp/B07MWZ2Y9F/ref=pe_3187911_189395841_TE_dp_1)

Like this one. Can easily make new holes for some camera holder.

## Photos

### Case

 ![IMG_1739](https://global.discourse-cdn.com/balena/original/2X/a/a4f058f1196d9221820a4a7a7701dfab555c4db9.jpeg)

### Camera - front

 ![IMG_1738](https://global.discourse-cdn.com/balena/original/2X/8/81c66e0cdbf7e68f0a4b40f485b20e4cdc31c514.jpeg)

### Camera - back

 ![IMG_1740](https://global.discourse-cdn.com/balena/original/2X/b/b41776a3afb06241bcf20502a1457a3206fba0b8.jpeg)

As you can see, I did attach small heat sinks there. These LED lights can be pretty hot in a few minutes. Let’s see how hot they’ll be after couple of hours 🙂

 ![IMG_1741](https://global.discourse-cdn.com/balena/original/2X/a/a63cee62e5f953b960f6be6983057fb2eb35e77a.jpeg)

---

<div class="post-metadata">

**Author:** ![zrzka](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/zrzka/32/1612_2.png) [@zrzka](https://forums.balena.io/u/zrzka)\
**Post date:** [June 27, 2019, 7:51pm UTC](https://forums.balena.io/t/camera-streamer-player-with-auto-discovery/17114/5 "2019-06-27T19:51:56Z")

</div>

Not as sharp as the 8M V2 camera (this one is 5M), but good enough for my use case. Photo of the 7" screen (800x480) with the stream. Have to tweak potentiometers a bit to catch the right moment when it switches to night mode.

 ![image](https://global.discourse-cdn.com/balena/original/2X/3/3fc146992d5b51746e18d9f98c9deb91d6ea3e9f.jpeg)

---

<div class="post-metadata">

**Author:** ![chrisys](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/chrisys/32/1731_2.png) [@chrisys](https://forums.balena.io/u/chrisys)\
**Post date:** [June 28, 2019, 9:32am UTC](https://forums.balena.io/t/camera-streamer-player-with-auto-discovery/17114/7 "2019-06-28T09:32:20Z")

</div>

@zrzka great work as always, thanks for sharing! 🙂
