homebridge / homebridge

HomeKit support for the impatient.
https://homebridge.io
Apache License 2.0
24k stars 1.98k forks source link

Homebridge Doesn't Run While Mac is Sleeping. #3155

Closed RyderCragie closed 2 years ago

RyderCragie commented 2 years ago

Current Situation

Every time I put my Mac to sleep or it goes to sleep automatically, all of my Homebridge devices say "No Response". Is there a way to keep Homebridge running while my Mac is sleeping? Note that I do not want to switch to using another device and I do not want to keep my Mac awake 24/7.

Configuration

{
    "bridge": {
        "name": "Homebridge B569",
        "username": "0E:7E:21:80:B5:69",
        "port": 51344,
        "pin": "209-15-365",
        "advertiser": "bonjour-hap"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Homebridge",
            "port": 80,
            "auth": "form",
            "theme": "auto",
            "tempUnits": "c",
            "lang": "auto",
            "loginWallpaper": "/Volumes/2 TB HDD/Other/Black.jpg",
            "proxyHost": "homebridge.rydercragie.com",
            "platform": "config"
        },
        {
            "pruning": {
                "pruneMissingCachedAccessories": false,
                "restartsBeforeMissingAccessoriesPruned": 3,
                "pruneAllAccessoriesNextRestart": false
            },
            "whiteEffects": {
                "simultaniousDevicesColorWhite": true,
                "colorWhiteThreshold": 10,
                "colorWhiteThresholdSimultaniousDevices": 50,
                "colorOffThresholdSimultaniousDevices": 5
            },
            "deviceManagement": {
                "blacklistOrWhitelist": "blacklist",
                "blacklistedUniqueIDs": [
                    ""
                ]
            },
            "advancedOptions": {
                "periodicDiscovery": true,
                "namesWithMacAddress": false,
                "logLevel": 3
            },
            "platform": "homebridge-magichome-dynamic-platform"
        },
        {
            "name": "TuyaWebPlatform",
            "options": {
                "username": "*censored*",
                "password": "*censored*",
                "countryCode": "44",
                "platform": "smart_life"
            },
            "defaults": [
                {
                    "id": "03644406c44f33befe4f",
                    "device_type": "light"
                },
                {
                    "id": "50842002b4e62d5730f4",
                    "device_type": "fan"
                }
            ],
            "scenes": false,
            "platform": "TuyaWebPlatform"
        },
        {
            "name": "SwitchBot",
            "credentials": {
                "openToken": "*censored*",
                "notice": "Keep your token a secret!"
            },
            "options": {
                "devices": [
                    {
                        "deviceId": "F32E8407CE18",
                        "configDeviceType": "Bot",
                        "ble": false,
                        "customBLEaddress": "F32E8407CE18",
                        "bot": {
                            "mode": "switch"
                        }
                    }
                ]
            },
            "platform": "SwitchBot"
        }
    ]
}

Environment

Process Supervisor

hb-service

oznu commented 2 years ago

You need to run Homebridge on a device that is running 24/7.

r1mad commented 2 years ago

I've solved that with this - https://apps.apple.com/us/app/amphetamine/id937984704?mt=12

RyderCragie commented 2 years ago

By keeping your Mac awake 24/7? (Which is something I've stated I do not wish to do).