I’m trying to get my Yi Dome 1080p camera to work. The hack-v3 is working fine. App is working and video is being recorded. However, in HASS, I’m getting “Image not available”.
Configuration:
camera:
- platform: yi
name: Living Room
host: 192.168.1.152
password: !secret yi_cam
ffmpeg_bin: /usr/bin/ffmpeg
Put the log in debug for component.camera and only see this in the log.
Put some more work into it this morning. Still the same problem. When I call camera.snapshot, the file is created correctly in /home/homeassistant/.homeassistant/snaps/filename.jpg". However, the file created has 0 length and is empty. Debug logs:
More info. Seems the system quietly explodes if there is an & in the password for the camera. Changed the password and removed the random characters. FTP works now, but getting this when attempting to process the command manually:
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x54d9a270] moov atom not found ftp://root:[redacted]@192.168.1.152:21/tmp/sd/record/2017Y12M24D17H/47M37S.mp4: Invalid data found when processing input
Sheesh. Finally got it. To get it to work, on the camera, I had to create a symbolic link in the root home directory to /tmp. Since the files are stored in the root of the camera in /tmp, HASS was accessing the file in /root/tmp. Created the link with
ln -s /tmp tmp
It works now! Little undocumented bug for the Yi setup there. I hope the symbolic link on the Yi filesystem survives a reboot.
Using the symlink I got my Yi Home 1080p camera to work. However, as far as I can see there is no live feed in HASS. Is that correct? When would video show up in HASS?
Have you tried manually FTPing to the camera from the Pi to make sure everything is working? I find it best to troubleshoot 1 aspect at a time and verify it’s working.
Also, if your FTP password has special characters, it will break. My password had an & in it, and it was causing errors.
Here is the error i get (iv hit a few now!) And in Homeassistant im getting - ‘Image not aviaiable’
2018-01-28 20:20:01 ERROR (MainThread) [haffmpeg.core] FFmpeg fails program arguments must be a bytes or text string, not NoneType
I have put the symobilc link on the camera
i have added the path to the recordings in config…yaml
I can see the mp4s in sd/recordings/ with datestamped files
i have installed ffmpeg
i can see another local file image using the camera component
i have added the ffmpeg component with the location of where its installed: using:
OK, it sounds like FTP may be fine and the issue is with FFMPEG or your config somewhere. When you can test FTP, we’ll know more. Here’s my config, and it’s working with 2 cameras currently.
- platform: yi
name: Living Room
host: 192.168.1.152
password: !secret yi_cam
ffmpeg_bin: /usr/bin/ffmpeg
ffmpeg_arguments: '-pred 1 -vf scale=800:450'
Edit: Here’s the command that is executed when HASS attempts to pull the video. This command will help troubleshooting a lot.