You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I struggle with is getting the camera to work. The camera is recognized and snapshots are sent to Home.app, but the stream is not working. The stream only works when the Node-RED docker image is deployed with network_mode = "host" option in docker-compose.
I tried to understand why the stream was not working. It looks like the stream needs another port, I do not understand where this port definition is coming from. I would gladly open yet another port for this purpose, but it looks quite random from what I've seen from the debug log: the port changes every time I request the stream.
I believe responsible code is placed within hap-nodejs.
this.service.getCharacteristic(Characteristic.SetupEndpoints)!.on(CharacteristicEventTypes.GET,callback=>{callback(null,this.setupEndpointsResponse);}).on(CharacteristicEventTypes.SET,(value,callback,context,connection)=>{if(!connection){debug("Set event handler for SetupEndpoints cannot be called from plugin. Connection undefined!");callback(HAPStatus.INVALID_VALUE_IN_REQUEST);return;}this.handleSetupEndpoints(value,callback,connection);});
My theory:
During stream open in Home.app, app SET a SetupEndpoints value (handleSetupEndpoints).
Value is tlv and it holds targetVideoPort at address 0x03.
So, since Home.app decides a port, you have to use host mode (??).
@NorthernMan54 Thank you for your answer. Your comment led me to search the homebridge repo and I found a similar question that answers my question.
Basically, stream port depends on the application, the port is defined by the stream requester and cannot be defined by the user. Therefore, one necessarily needs host network mode when running in docker to use the camera.
However, if you do not need to use the camera node and you configure Node-RED just right you do not necessarily need host mode.
Your Current NRCHKB Plugin Version
1.5.0
Operating System
Raspberry Pi, Docker
How can we help?
I am attempting to run Node-RED in docker and use this package to deploy HomeKit devices.
So far I've successfully connected a bridge by exposing a (random) port
16000
, installing avahi on the host and configuring the bridge appropriately:The docker-compose file also needs the following volumes shared to the Node-RED instance:
What I struggle with is getting the camera to work. The camera is recognized and snapshots are sent to Home.app, but the stream is not working. The stream only works when the Node-RED docker image is deployed with
network_mode = "host"
option in docker-compose.I tried to understand why the stream was not working. It looks like the stream needs another port, I do not understand where this port definition is coming from. I would gladly open yet another port for this purpose, but it looks quite random from what I've seen from the debug log: the port changes every time I request the stream.
Error messages in the log
Could somebody help me understand what's preventing the camera stream from being delivered to the Home.app?
Any more details?
No response
Any code or functions to add?
No response
The text was updated successfully, but these errors were encountered: