Cannot have EspHome Cam work with Motion Eye?

I am struggling with the installation of a ESP32CAM AI Thinker in HA.
Here is my config:
- HA image installed on Rasp 3B+
- System HassOS 3.13
- MotionEye: 0.8.0

I would like to be able
- to monitor the camera from outside (SSL)
- set up motion detection, preferaly through Motion Eye

I am a total newbee, spent days searching the web, it seems 100% stupid, but I simply cannot succeed into setting both.

I have integrated the cam with ESPHome: remote viewing works perfectly.
I finaly managed to spot the stream url (https://xxxxxxx.duckdns.org/api/camera_proxy_stream/camera.cameranew?token=c7ca642xxx).
The url works ok in VLC.
Pb: when I plug the URL as IP camera in Motioneye, it identifies the type of camera, creates it, but does not receive the pics
(cf Motioneye logs: ERROR: mjpg client timed out receiving data for camera 1 on port 8081
[22/Apr/2020:21:26:14 +0200] 200 192.168.0.8, 172.30.32.1(172.30.32.2) GET /picture/1/current/?_=1587583568642&_username=admin&signature=09f7e4fab639ada1c2f8412dacbe5fe6832d2541 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36)
[22/Apr/2020:21:26:20 +0200] 200 192.168.0.8, 172.30.32.1(172.30.32.2) GET /picture/1/current/?
=1587583574121&_username=admin&_signature=07b67c9adb47cc8707b8a2c7a65dd408e9ed09a9 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36)
ERROR: mjpg client timed out receiving data for camera 1 on port 8081)
On the top of that, if I understood well what I red on the forums, the ESPHome token changes all the time and when I try to put a permanent token from profile, MotionEye won’t even create the cam…

I tryed the other way, by flashing the cam via Arduino, following various tutos, including this one (https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/)
I easily got the stream (https://192.168.0.4:81/stream) and picture urls, as well as the settings’ webpage.
The cam is well integrated into MotionEye, motion detections, notifications work perfectly,…BUT…:
Streaming the cam on lovelace works poorly.
Whether I use the identity from the generic camera integration or the streaming URL of Motion Eye in lovelace picture card,…it doesn’t work…
It lags a lot, preload stream never ends,…
I have tried to change the 8081 port, nothing seems to work.

I have tryed to do without MotionEye, with scripts, but I only managed to take pictures. I get error message saying the cam does not accept recording, nor motion detection…far from expected result.
I would really like to use MotionEye, the app is great, 100% what I need.

I do not know, where I f… up : motioneye settings, parameters in Arduino flashing, tokens,…
Too many tracks to follow for my newbee’s knwoledge!

Can somebody help me solve this nightmare puzzle or at least tell me where I should start looking?!

Thanks a lot

1 Like

Solved? I m also interested.

Link Whit token, worked for you: that Hassio release?

tnx

High, I did not managed to have the permanent token work for me.
For now, I am using MotionEye Embed link in web page lovelace card.
By not defining MotionEye user password (only admin), I manage to view the cam from outside with ssl.
I only have to go to MotionEye Add on from time to time to have the camera stream reactivated.
Not 100% perfect, nor 100% satisfactory, but it meets my minimal requirements…

tnx!
I m interested to integrate cam using api_proxy_stream… but without success. You use token generated where?

If I recall well, I just used this link in web page lovelace card.

super! do you remeber Lovelate Card configuration?

Ok, using iframe:

type: iframe
url: >-
  https://my.site.me/api/hassio_ingress/4GxxxxxxxiCk5Qa-Fwz5dIxy2GcDCbOxxxMpNsRnbi8a9m8/picture/1/frame/
title: C1miniliveME
aspect_ratio: 75%

But, first, you neet to login in Motioneye in all devices/app.

Exactly…you might ot have relog in Motion Eye from time to time.

1 Like