Upgrading to MacOS 10.14 (Mojave) has broken homebridge!


#1

so i just updated to macOS mohave, and it has the home app built into it… now all the devices in the Home app show as ‘no response’ and don’t work anymore… rebooted the Pi a few times… anyone else having this problem?


(Pizzinini) #2

I had the same problem after upgrading My phone to iOS 12. I was still able to control my devices through the iDevice app and the Eve app, just not the home app. My home set up was a couple of years old. I deleted my home and re-setup Homebridge. It took about 1 hr but it’s working again great now for a couple of days…


#3

so what do you mean you deleted “my home?” you deleted the home app?

did you wipe your raspberry pi completely and reinstall homebridge from scratch?

how did you reset up homebridge? can you tell me exactly what you did, thanks!


(jkp) #4

Ha ha it is Mojave not Mohave :slight_smile:

I edited the thread title to reflect the correct name for macOS 10.14


(Pizzinini) #5

I did not delete the home app. I removed my home in the home app from the cloud (removed homebridge, deleted all rooms and zones and removed the home: [little home icon on left top] -> Remove Home). Then I set up a new home (“Add Home”). I found that using the Eve app for setting up the new home is the fastest way to set up rooms/zones and assign the devices.

I did also wipe my pi and re-installed everything from scratch - but mostly because my installation was more than a year old and I am sure some of the components needed updating anyway. Remote access for Homebridge had not worked for me for months and this also fixed that issue.

I think some features/settings for Apple Home may have changed with the new OS updates and broken older setups…


(jkp) #6

(Pizzinini) #7

Also… I think I noticed another difference. What used to be called “Automations” has now be split into “Triggers” and “Scenes”. Also the option to create a “When you say something” automation is now in the Siri Shortcuts app or you can just say the name of the scene.

Again… I think a number of changes have broken older home setups. After deleting and re-configuring it’s working fine for me again :slight_smile:


#8

okay i’ll start from scratch … so you deleted the homebridge app entirely from smart things?

can you please link me to the homebridge instructions you used to install it on your pi, and smartthings?

also instructions how to wipe and reinstall the pi operating system? it’s been years since i did it.

i have it set to start homebridge automatically when the pi boots up as well.

thank you very much for the help!


(Pizzinini) #9

what version raspberry Pi do you have?

What SmartThings app/plugin do you want to use pdlove or tonesto7?


#10

using pdlove. how do i see which pi i have from pi terminal?


(Pizzinini) #11

https://elinux.org/RPi_HardwareHistory


#12

looks like i have the Pi 3 Model B.

if you could point me in the direction of the proper smartthings homebridge app to install, and where to wipe/reinstall the Pi and which homebridge to install i’d appreciate it, thank you.


iOS app that can control both Zwave (through SmartThings) and HomeKit devices?
(Pizzinini) #13

I did not delete and re-install the smartthings app. Here is how I re-setup the pdlove Homebridge. I am not a programmer but more of a hacker… but here it goes:

Wipe your raspberry Pi and Install NOOBS:
https://projects.raspberrypi.org/en/projects/raspberry-pi-getting-started/4

If you are using a terminal program to continue after this you will need to go into settings and enable SSH:


(Pizzinini) #14

List of commands I used to set up Homebridge:

Install node.js

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

Install Other Dependent Packages & Homebridge

sudo npm install npm -g
sudo apt-get install libavahi-compat-libdnssd-dev
sudo npm install --unsafe-perm -g homebridge
sudo npm install -g homebridge-smartthings

Launch Homebridge to create /.homebridge directory

homebridge
sudo reboot

Create Config.json

sudo nano ~/.homebridge/config.json


(Pizzinini) #15
{
"bridge": {
"name": "Homebridge",
"username": "D0:00:00:00:00:00",
"port": 51826,
"pin": "031-45-154"
},
    "description": "JSON API",
    "platforms": [
        {
            "platform": "SmartThings",
            "name": "SmartThings",
            "app_url": "https://graph.api.smartthings.com:443/api/smartapps/installations/",
            "app_id": "GO INTO THE SMARTTHINGS APP CONFIG MENU TO GET THIS - NOT FROM THE IDE",
            "access_token": "GO INTO THE SMARTTHINGS APP CONFIG MENU TO GET THIS - NOT FROM THE IDE"
        }
    ]
}

(Pizzinini) #16

run at startup

sudo nano /etc/init.d/homebridge


(Pizzinini) #17
#!/bin/sh
### BEGIN INIT INFO
# Provides: homebridge
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

dir="/home/pi"
cmd="DEBUG=* /usr/bin/homebridge"
user="pi"

name=`basename $0`
pid_file="/var/run/$name.pid"
stdout_log="/var/log/$name.log"
stderr_log="/var/log/$name.err"

get_pid() {
    cat "$pid_file"
}

is_running() {
    [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1
}

case "$1" in
    start)
    if is_running; then
        echo "Already started"
    else
        echo "Starting $name"
        cd "$dir"
        if [ -z "$user" ]; then
            sudo $cmd >> "$stdout_log" 2>> "$stderr_log" &
        else
            sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" &
        fi
        echo $! > "$pid_file"
        if ! is_running; then
            echo "Unable to start, see $stdout_log and $stderr_log"
            exit 1
        fi
    fi
    ;;
    stop)
    if is_running; then
        echo -n "Stopping $name.."
        kill `get_pid`
        for i in {1..10}
        do
            if ! is_running; then
                break
            fi

            echo -n "."
            sleep 1
        done
        echo

        if is_running; then
            echo "Not stopped; may still be shutting down or shutdown may have failed"
            exit 1
        else
            echo "Stopped"
            if [ -f "$pid_file" ]; then
                rm "$pid_file"
            fi
        fi
    else
        echo "Not running"
    fi
    ;;
    restart)
    $0 stop
    if is_running; then
        echo "Unable to stop, will not attempt to start"
        exit 1
    fi
    $0 start
    ;;
    status)
    if is_running; then
        echo "Running"
    else
        echo "Stopped"
        exit 1
    fi
    ;;
    *)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
    ;;
esac

exit 0

(Pizzinini) #18

sudo chmod 755 /etc/init.d/homebridge
sudo update-rc.d homebridge defaults

*** That’s it… Good luck! ***

Then just go into the home app and re-add Homebridge to your home.


#19

any idea how to get homebridge to start automatically on reboot of the pi? thanks so much for the help, i’ll try it tonight.


(Pizzinini) #20

It’s the last part of my instructions above “run on startup”