seydx / homebridge-camera-ui

Homebridge plugin for RTSP Cameras with HSV, motion detection support, Image Rekognition, Web UI to manage/watch streams and WebApp support
MIT License
634 stars 92 forks source link

Can't run plugin - "Maximum call stack size exceeded" #363

Closed pedroxns closed 2 years ago

pedroxns commented 2 years ago

Describe the bug Can't initialize Camera UI,

To Reproduce Install plugin, setup all configs, restart homebridge. Configured specific Mqtt and doorbell settings.

Expected behavior Run the plugin and manage tsp cameras.

Logs


[17/01/2022, 12:34:18] RangeError: Maximum call stack size exceeded
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:34:5)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)
    at Function.Array.from (/usr/lib/node_modules/homebridge-mqttthing/node_modules/collections/shim-array.js:35:22)```

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment**
- Node.js Version: v16.13.0
- Homebridge Version: v1.3.9
- Camera UI Version: v5.0.9
- Operating System: Raspbian GNU/Linux Buster (10)
- Browser: Safari
seydx commented 2 years ago

@pedroxns

Hey can you post your config.json pls

And where/when does the error appear?

seydx commented 2 years ago

ok it seems thats because of the version of the dependency "mqtt", will fix it

pedroxns commented 2 years ago

Of course, here goes my config.json The error appear when starting the homebridge instance!


    "bridge": {
        "name": "Homebridge NÃO ALEXA",
        "username": "xxxxxxxxx",
        "port": 51207,
        "pin": "xxxxxxx"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8582,
            "platform": "config"
        },
        {
            "name": "Camera FFmpeg",
            "mqtt": "xxxxxxx",
            "portmqtt": 1883,
            "_bridge": {
                "username": "xxxxxxx",
                "port": 39024
            },
            "platform": "Camera-ffmpeg"
        },
        {
            "name": "Yeelight",
            "timeout": 5000,
            "interval": 60000,
            "ctforcolor": true,
            "blocking": false,
            "split": true,
            "override": [
                {
                    "color": false
                }
            ],
            "platform": "Yeelighter",
            "_bridge": {
                "username": "0E:78:01:38:BE:D2",
                "port": 59511
            }
        },
        {
            "devices": [
                {
                    "name": "TV Estúdio",
                    "ip": "xxxxxxxxx",
                    "mac": "xxxxxxxx",
                    "inputs": [
                        {
                            "type": "app"
                        }
                    ]
                }
            ],
            "platform": "SamsungTizen",
            "_bridge": {
                "username": "xxxxxxx",
                "port": 48427
            }
        },
        {
            "country_code": "BR",
            "language_code": "pt-BR",
            "auth_login_url": ",
            "auth_redirected_url": "
            "auth_login_state": 
            "refresh_interval": 1,
            "remove_offline_devices_on_boot": false,
            "platform": "LgThinqAirConditioner",
            "auth_access_token": 
            "auth_refresh_token": 
            "auth_user_number": "
            "_bridge": {
                "username": "xxxxxxx,
                "port": 59520
            }
        },
        {
            "platform": "EufySecurity",
            "username": "xxxxxxxx",
            "password": "xxxxxxx",
            "ignoreStations": [
                ""
            ],
            "ignoreDevices": [
                ""
            ],
            "_bridge": {
                "username": "0xxxxxxx",
                "port": 34508
            },
            "enableCamera": true,
            "pollingIntervalMinutes": 30,
            "hkHome": 1,
            "hkAway": 0,
            "hkNight": 3,
            "hkOff": 63,
            "enableDetailedLogging": 0
        },
        {
            "name": "Alexa",
            "username": "xxxxxx",
            "password": "xxxxxxx",
            "pin": "xxxxxxxx",
            "routines": true,
            "blind": false,
            "door": false,
            "debug": false,
            "deviceListHandling": "deny",
            "platform": "Alexa",
            "_bridge": {
                "username": "xxxxxxxx",
                "port": 54893
            }
        },
        {
            "name": "CameraUI",
            "port": 8081,
            "debug": false,
            "mqtt": {
                "active": true,
                "host": "xxxxxxxxxx",
                "port": 1883
            },
            "http": {
                "active": false
            },
            "smtp": {
                "active": false
            },
            "ftp": {
                "active": false
            },
            "ssl": {
                "active": false
            },
            "cameras": [
                {
                    "name": "Teste camera ui",
                    "motion": true,
                    "doorbell": true,
                    "unbridge": true,
                    "hsv": true,
                    "prebuffering": true,
                    "prebufferLength": 4,
                    "videoConfig": {
                        "source": "-i rtsp://admin:xxxxxx@xxxxxx:554/cam/realmonitor?channel=1&subtype=0",
                        "rtspTransport": "tcp",
                        "maxStreams": 2,
                        "vcodec": "copy",
                        "acodec": "libfdk_aac",
                        "stimeout": 10,
                        "audio": true
                    },
                    "mqtt": {
                        "motionTopic": "stat/campainha/RESULT",
                        "motionMessage": "{\"Switch1\":{\"Action\":\"ON\"}}",
                        "motionResetTopic": "stat/campainha/RESULT",
                        "motionResetMessage": "{\"Switch1\":{\"Action\":\"OFF\"}}",
                        "doorbellTopic": "stat/campainha/POWER",
                        "doorbellMessage": "ON"
                    },
                    "videoanalysis": {
                        "active": true
                    }
                }
            ],
            "platform": "CameraUI"
        }
    ],
    "disabledPlugins": [
        "homebridge-camera-ffmpeg"
    ]
}```
seydx commented 2 years ago

Hey, can you try v5.0.10-beta.0 pls, it should fix the issue with mqtt

pedroxns commented 2 years ago

Hey, can you try v5.0.10-beta.0 pls, it should fix the issue with mqtt

Same error =[

seydx commented 2 years ago

@pedroxns

can you remove homebridge-camera-ui first and make a clean reinstall pls

pedroxns commented 2 years ago

@pedroxns

can you remove homebridge-camera-ui first and make a clean reinstall pls

Worked ! After unbridging the plugin it worked !