Closed martindavid-net closed 3 years ago
Hey @martindavid-net
First of all, pls dont use both homebridge-camera-ffmpeg
AND homebridge-camera-ui
homebridge-camera-ffmpeg
homebridge-camera-ui
Second, if you had the cameras on HomeKit before (with homebridge-camera-ffmpeg or anything else), please remove them from HomeKit AND change the name of the cameras in your config.json. Otherwise homebridge will not recognize them as new accessories (therefore you cant add these in apple homekit)
If you managed to make the cameras visible in HomeKit via homebridge-camera-ui
pls let me know if the problem still occurs also with camera.ui
Hi SeydX
Hey @martindavid-net! First of all, pls dont use both
homebridge-camera-ffmpeg
ANDhomebridge-camera-ui
- If you only want to see the cameras in Apple Homekit, choose
homebridge-camera-ffmpeg
- If you want to see the cameras in Apple HomeKit AND want a User interface where you can control your cameras, record videos on movement etc etc, choose
homebridge-camera-ui
Second, if you had the cameras on HomeKit before (with homebridge-camera-ffmpeg or anything else), please remove them from HomeKit AND change the name of the cameras in your config.json. Otherwise homebridge will not recognize them as new accessories (therefore you cant add these in apple homekit)
If you managed to make the cameras visible in HomeKit via
homebridge-camera-ui
pls let me know if the problem still occurs also with camera.ui
Hi, thanks for good job and many nice changes in this plugin. I would like to tell you that I'm using camera-ffmpeg plugin and camera-ui in same homebridge. Everything is ok and any problems for me. Of course cameras have different names. I would like to suggest some changes for you. Dimmensions of videos are not same all the time and changing in web browser and mobile phone . When I'm changing dimensions of my browser in Mac or in iPhone also right aspect ratio ( 16:9 or 4:3 ) are changing. It should be always the same and stable. Resizing the video image should not change the video proportionality, smaller or larger browser's window, more or less cameras must not influent to video aspect ratio. Second idea is to make a possibility to see all cams in one window with full screen without browser menu ( only cameras ). Also in your new config-ui . ( iPhone screen copy - left side Dasboard is OK and CamsView on right see NOT OK ... ) But generally last update allowed to be promoted your camera-ui plugin to High Class of Homebridge plugins ! Tnx !
thanks seydX for the promt and informative answer.
the code with both camera-ui AND ffmpeg was just to show that I have tried and configered both. I never ran them simultaneously.
I prefer to use your camera-ui. because I need the cameras in homekit AND want to access them throu your great UI.
what I did now is:
now the homebridge is listing the Camera UI 4.2.0, but if I click on settings I get the (new?) welcome screen. cameras: No cameras, Config doesnt do anything. I can only save.
AND the homebridge log shows the following error:
[5/6/2021, 1:31:01 AM] Loaded plugin: homebridge-camera-ui@4.2.0
[5/6/2021, 1:31:02 AM] ====================
[5/6/2021, 1:31:02 AM] ERROR INITIALIZING PLUGIN homebridge-camera-ui:
[5/6/2021, 1:31:02 AM] TypeError: Cannot read property 'auth' of undefined
at ConfigService.getPluginUiConfig (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:102:32)
at ConfigService.getUiConfig (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:79:10)
at new ConfigService (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:61:10)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:141:18)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
[5/6/2021, 1:31:02 AM] ====================
I got that error once, but after camera-ffmpeg installation it didnt show up anymore.
any ideas? :-)
Hi SeydX
Hey @martindavid-net! First of all, pls dont use both
homebridge-camera-ffmpeg
ANDhomebridge-camera-ui
- If you only want to see the cameras in Apple Homekit, choose
homebridge-camera-ffmpeg
- If you want to see the cameras in Apple HomeKit AND want a User interface where you can control your cameras, record videos on movement etc etc, choose
homebridge-camera-ui
Second, if you had the cameras on HomeKit before (with homebridge-camera-ffmpeg or anything else), please remove them from HomeKit AND change the name of the cameras in your config.json. Otherwise homebridge will not recognize them as new accessories (therefore you cant add these in apple homekit) If you managed to make the cameras visible in HomeKit via
homebridge-camera-ui
pls let me know if the problem still occurs also with camera.uiHi, thanks for good job and many nice changes in this plugin. I would like to tell you that I'm using camera-ffmpeg plugin and camera-ui in same homebridge. Everything is ok and any problems for me. Of course cameras have different names. I would like to suggest some changes for you. Dimmensions of videos are not same all the time and changing in web browser and mobile phone . When I'm changing dimensions of my browser in Mac or in iPhone also right aspect ratio ( 16:9 or 4:3 ) are changing. It should be always the same and stable. Resizing the video image should not change the video proportionality, smaller or larger browser's window, more or less cameras must not influent to video aspect ratio. Second idea is to make a possibility to see all cams in one window with full screen without browser menu ( only cameras ). Also in your new config-ui . ( iPhone screen copy - left side Dasboard is OK and CamsView on right see NOT OK ... ) But generally last update allowed to be promoted your camera-ui plugin to High Class of Homebridge plugins ! Tnx !
Hey, could you pls open a new issue and mark it as enhancement with detailed information about it
thanks seydX for the promt and informative answer.
the code with both camera-ui AND ffmpeg was just to show that I have tried and configered both. I never ran them simultaneously.
I prefer to use your camera-ui. because I need the cameras in homekit AND want to access them throu your great UI.
what I did now is:
- complete uninstall of both plugins (incl. settings).
- removed the "deactivated Plugins" entry from config.json
- restart homebridge
- changed the names of the cameras YI Home App (iOS).
- removed all cameras from homekit (on iOS).
- restart homebridge
- searched and reinstalled camera-ui (throu terminal entry on the computer where homebridge server runs (Apple Mac macOS 10.15.7)
- restart homebridge ;-)
now the homebridge is listing the Camera UI 4.2.0, but if I click on settings I get the (new?) welcome screen. cameras: No cameras, Config doesnt do anything. I can only save.
AND the homebridge log shows the following error:
[5/6/2021, 1:31:01 AM] Loaded plugin: homebridge-camera-ui@4.2.0 [5/6/2021, 1:31:02 AM] ==================== [5/6/2021, 1:31:02 AM] ERROR INITIALIZING PLUGIN homebridge-camera-ui: [5/6/2021, 1:31:02 AM] TypeError: Cannot read property 'auth' of undefined at ConfigService.getPluginUiConfig (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:102:32) at ConfigService.getUiConfig (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:79:10) at new ConfigService (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:61:10) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:141:18) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) [5/6/2021, 1:31:02 AM] ====================
I got that error once, but after camera-ffmpeg installation it didnt show up anymore.
any ideas? :-)
Oh it seems there is something wrong, i will check it
@martindavid-net
this issue occured only once?
[5/6/2021, 1:31:01 AM] Loaded plugin: homebridge-camera-ui@4.2.0
[5/6/2021, 1:31:02 AM] ====================
[5/6/2021, 1:31:02 AM] ERROR INITIALIZING PLUGIN homebridge-camera-ui:
[5/6/2021, 1:31:02 AM] TypeError: Cannot read property 'auth' of undefined
at ConfigService.getPluginUiConfig (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:102:32)
at ConfigService.getUiConfig (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:79:10)
at new ConfigService (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:61:10)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:141:18)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
[5/6/2021, 1:31:02 AM] ====================
It seems there was just a config issue. Have implemented more checks, so this should not occur. What about the cameras now? Are they visible in HomeKit with different names?
@Terminator0007
"Fullscreen" Button added to the bottom "actionsheet" (on camiew) in v4.2.1
the error is gone, but there is a new one ;)
==================== [5/6/2021, 4:07:35 AM] ERROR INITIALIZING PLUGIN homebridge-camera-ui: [5/6/2021, 4:07:35 AM] TypeError: Cannot read property 'language' of undefined at ConfigService.getPluginUiConfig (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:102:36) at ConfigService.getUiConfig (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:79:10) at new ConfigService (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:61:10) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-camera-ui/services/config/config.service.js:140:18) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) [5/6/2021, 4:07:35 AM] ====================
additionally I cant configure any cam, there for not test it, because the config button on the welcome screen does not work.
@martindavid-net
~can u try v4.2.2 pls , it should (hopefully) fix this bug~
v4.2.3 should fix both issues
it fixed the two errors.
next step next errors: `[5/6/2021, 3:22:53 PM] [CameraUI] [Plugin] Efi One] [Snapshot: [rtsp @ 0x7ffebe80bc00] method DESCRIBE failed: 401 Unauthorized [5/6/2021, 3:22:53 PM] [CameraUI] [Plugin] Efi One] [Snapshot: rtsp://10.0.1.17/ch0_0.h264: Server returned 401 Unauthorized (authorization failed) [5/6/2021, 3:22:53 PM] [CameraUI] [Plugin] Efi One: Failed to fetch snapshot. [5/6/2021, 3:23:03 PM] [CameraUI] [Plugin] Efi One] [Snapshot: [rtsp @ 0x7ff84780bc00] method DESCRIBE failed: 401 Unauthorized [5/6/2021, 3:23:03 PM] [CameraUI] [Plugin] Efi One] [Snapshot: rtsp://10.0.1.17/ch0_0.h264: Server returned 401 Unauthorized (authorization failed) [5/6/2021, 3:23:03 PM] [CameraUI] [Plugin] Efi One: Failed to fetch snapshot. [5/6/2021, 3:23:14 PM] [CameraUI] [Plugin] Efi One] [Snapshot: [rtsp @ 0x7ffb0700be00] method DESCRIBE failed: 401 Unauthorized [5/6/2021, 3:23:14 PM] [CameraUI] [Plugin] Efi One] [Snapshot: rtsp://10.0.1.17/ch0_0.h264: Server returned 401 Unauthorized (authorization failed) [5/6/2021, 3:23:14 PM] [CameraUI] [Plugin] Efi One: Failed to fetch snapshot. [5/6/2021, 3:23:14 PM] [CameraUI] [Plugin] Efi One: Starting video stream: 1280 x 720, 30 fps, 299 kbps
[5/6/2021, 3:23:14 PM] [CameraUI] [Plugin] Efi One: [rtsp @ 0x7fc7e5808600] [error] method DESCRIBE failed: 401 Unauthorized [5/6/2021, 3:23:14 PM] [CameraUI] [Plugin] Efi One: [error] rtsp://10.0.1.17/ch0_0.h264: Server returned 401 Unauthorized (authorization failed) [5/6/2021, 3:23:14 PM] [CameraUI] [Plugin] Efi One: ffmpeg exited with code: 1 and signal: null (Error) [5/6/2021, 3:23:14 PM] [CameraUI] [Plugin] Efi One: Stopped video stream. `
my config
{ "bridge": { "name": "Homebridge EC52", "username": "0E:3E:A1:4D:EC:52", "port": 51946, "pin": "685-27-413" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "name": "eWeLink", "username": "martindavid@me.com", "password": "sjmmdp79", "mode": "auto", "thDevices": [ { "deviceId": "1000fe0eea", "label": "efígenia water temperature", "minTarget": 1, "maxTarget": 60 } ], "platform": "eWeLink" }, { "name": "CameraUI", "theme": "auto", "language": "Auto", "debug": false, "mqtt": { "active": false }, "http": { "active": false, "localhttp": false }, "ssl": { "active": false }, "cameras": [ { "name": "Efi One", "unbridge": true, "videoConfig": { "source": "-i rtsp://10.0.1.17/ch0_0.h264" } } ], "platform": "CameraUI" } ] }
:-/ thanks for all
@martindavid-net
that not a problem related to this plugin. It is related to your camera. as you can see, you need to be authorized to view the stream. What kind of camera is it?
OH F...k ... sorry, I assumed that since I hacked the Yi Home 1080p and the output is now a rtsp stream in MPEG that camera ui
can work with it. my mistake. I must have confused the homebridge-camera-ffmpeg
with your plugin. I was reading back and forth on both ends.
I am sorry if I bothered you with a problem thats not yours to solve. sorry. - typical beginners stupidity.
I retraced my steps and found out why I also landed at your plugin:
there is a plugin that is called homebridge-yi-camera
which sounded that it works for me. sadly its outdated since 2019.
but if you click on the searchlink it rederects to your plugin. thats the reason.
I also saw that you are listed there.... do you know anything about it?
@martindavid-net
homebridge-yi-camera was Version 1 of homebridge-camera-ui. Why you looking for homebridge-yi-camera?
I have also hacked yi cameras and they all working flawlessly with homebridge-camera-ui
I see. then it gets clearer ;)
I searched for Yi because I wanted to hack them. and then realized: damn homebridge-yi-camera
plugin is not for Yi cameras.
it finally worked with roleoroleo/yi-hack-Allwinner-v2
.
I can access and config them throu the webinterface. also the Yi Home App works fine. but the homekit integration is... you know it already ;)
it seems there is a new firmware/software on that has changed somehow.,...
thats the config info of the Yi at the moment:
Firmware Version | 0.1.7 Base Version | 9.0.19.02_202007141512 Model Suffix | y21ga Serial Number | IFUSY4416LPAOR200906
What is the problem with homekit? Not visible camera? Choppy stream?
if you can not add the camera to HomeKit try to change the camera name in config.json and try again. If this doesnt help, you can remove the camera from cache through config ui x and try to add it again
the still picture works. but the camera video stream does not start. it loads and loads. after approx. 5 min homekit app gives up. no specific error message.
@martindavid-net
try another videoConfig
My settings for my Yi Dome 1080p:
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://192.168.178.31/ch0_0.h264",
"stillImageSource": "-i rtsp://192.168.178.31/ch0_0.h264",
"maxStreams": 4,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 25,
"maxBitrate": 1000,
"audio": false
}
-the error in homekit:
[5/8/2021, 2:38:46 AM] [CameraUI] [Plugin] Efi One: Stream command: ffmpeg -stimeout 10000000 -i rtsp://master:master@10.0.1.17/ch0_0.h264 -an -sn -dn -codec:v copy -pix_fmt yuv420p -color_range mpeg -f rawvideo -payload_type 99 -ssrc 11754137 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params ACB8n8klGmjR+spFF0dTj/jITv2nAtdFDFiJQqF/ srtp://10.0.1.29:61224?rtcpport=61224&pkt_size=1316 -loglevel level -progress pipe:1 [5/8/2021, 2:38:48 AM] [CameraUI] [Plugin] Efi One: [h264 @ 0x7ffa7f00c600] [error] error while decoding MB 38 39, bytestream -12 [5/8/2021, 2:38:49 AM] [CameraUI] [Plugin] Efi One: Getting the first frames took 3.002 seconds. [5/8/2021, 2:39:25 AM] [CameraUI] [Sessions] Efi One removed from active sessions [5/8/2021, 2:39:25 AM] [CameraUI] [Sessions] Currently active streams: {"Efi One":{"activeStreams":0,"maxStreams":3}} [5/8/2021, 2:39:25 AM] [CameraUI] [Plugin] Efi One: Stopped video stream. [5/8/2021, 2:39:25 AM] [CameraUI] [Plugin] Efi One: ffmpeg exited with code: null and signal: SIGKILL (Expected)
-the error in homekit:
[5/8/2021, 2:38:46 AM] [CameraUI] [Plugin] Efi One: Stream command: ffmpeg -stimeout 10000000 -i rtsp://master:master@10.0.1.17/ch0_0.h264 -an -sn -dn -codec:v copy -pix_fmt yuv420p -color_range mpeg -f rawvideo -payload_type 99 -ssrc 11754137 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params ACB8n8klGmjR+spFF0dTj/jITv2nAtdFDFiJQqF/ srtp://10.0.1.29:61224?rtcpport=61224&pkt_size=1316 -loglevel level -progress pipe:1 [5/8/2021, 2:38:48 AM] [CameraUI] [Plugin] Efi One: [h264 @ 0x7ffa7f00c600] [error] error while decoding MB 38 39, bytestream -12 [5/8/2021, 2:38:49 AM] [CameraUI] [Plugin] Efi One: Getting the first frames took 3.002 seconds. [5/8/2021, 2:39:25 AM] [CameraUI] [Sessions] Efi One removed from active sessions [5/8/2021, 2:39:25 AM] [CameraUI] [Sessions] Currently active streams: {"Efi One":{"activeStreams":0,"maxStreams":3}} [5/8/2021, 2:39:25 AM] [CameraUI] [Plugin] Efi One: Stopped video stream. [5/8/2021, 2:39:25 AM] [CameraUI] [Plugin] Efi One: ffmpeg exited with code: null and signal: SIGKILL (Expected)
with the config i posted above?
@martindavid-net
Pls attach rtsp_transport tcp
in your videoConfig source
Like
"source": "-rtsp_transport tcp -i rtsp://192.168.178.31/ch0_0.h264"
I cant believe it. it works. both cameras. HAPPY.
thank you so much. I owe you!.....
hi. first: I am new with all this. so please forgive me if the questions are stupid or on the wrong place.....
I bought the Yi Home 1080p. I then hacked it sucessfully. then I tryied to add them to homebrige: first puzzle: which plugin to use? the yi-homebridge is (as far as I see it) outdated and not working correctly at all.
the Homebridge Camera FFmpeg plugin worked, I could add them in Apple Home, but as soon as I start the camera the error comes up: [h264 @ 0x7f9a04008e00] [error] error while decoding MB 60 29, bytestream -8 and with the camera ui i simply cant see them in homekit. also adding it manually does not work. it simply does nothing.
I am a bit of a loss here. if some has tips or help .... be happy about it.
my current homebridge config. both plugins are on. I tried different prefixes for the rtsp:// .... none worked, and with or without user&password.... { "bridge": { "name": "Homebridge EC52", "username": "XX:3E:XX:4D:XX:52", "port": 51946, "pin": "685-XX-413" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "name": "eWeLink", "username": "X@X.com", "password": ":-)XX", "mode": "auto", "thDevices": [ { "deviceId": "1000fe0eea", "label": "efígenia water temperature", "minTarget": 1, "maxTarget": 60 } ], "platform": "eWeLink" }, { "name": "Camera FFmpeg", "cameras": [ { "name": "Y1", "manufacturer": "YI", "model": "YI 1080P Home Camera", "serialNumber": "IFUSXXXXXL", "videoConfig": { "source": "-re -i rtsp://master:master@10.0.1.17/ch0_0.h264", "stillImageSource": "-i http:///master:master@10.0.1.17:8080/cgi-bin/snapshot.sh", "maxStreams": 3, "maxWidth": 1280, "maxHeight": 720, "maxFPS": 30, "maxBitrate": 300, "vcodec": "copy", "packetSize": 1316, "audio": false, "debug": false } } ], "platform": "Camera-ffmpeg" }, { "name": "CameraUI", "port": 8181, "atHomeSwitch": true, "theme": "auto", "language": "auto", "debug": true, "mqtt": { "active": false }, "http": { "active": false, "localhttp": false }, "ssl": { "active": false }, "cameras": [ { "name": "Y1", "unbridge": true, "videoConfig": { "source": "-rtsp_transport tcp -i rtsp://master:master@10.0.1.17/ch0_0.h264", "stillImageSource": " http://10.0.1.17:8080/cgi-bin/snapshot.sh?res=high&watermark=yes", "vcodec": "ffmpeg" } } ], "platform": "CameraUI" } ], "disabledPlugins": [] }