JJJ's Blog

  • WordPress
  • GitHub
  • Twitter/X
  • A bunny tipped our goat!

    JJJ

    July 27, 2019
    Family, Funny, Uncategorized
    Goats, Bunny
  • Hue Bridge PoE

    I was running out of outlets in the UPS in my 6RU rack, and found myself wondering if it were possible to convert a Hue Bridge to be powered over ethernet rather than the big white wall-wort.

    Turns out, Amazon made this really simple.

    First, buy this PoE converter, and switch it to 5V.

    Next, buy this adapter, and connect it to the small power cord included with the above converter.

    The supplied power cord is around 10″ in length, so you may want to pick up a 12″ Cat6 ethernet patch-cable as well, if you don’t already have one.

    Lastly, plug the converter into your PoE source, then plug the power and data cables from the converter into your Hue Bridge.

    Everything should power on and light up normally. If it doesn’t, retrace the above steps and try again.

    JJJ

    July 22, 2019
    Hue
    PoE
  • Install Homebridge UI on Raspberry Pi (3 or 4 preferred)

    This is for a fresh install of Homebridge UI with auto-start on reboot or error.

    If you are trying to convert an existing install, this step-by-step will not work for you, and you’ll need to modify it to suit your needs.

    1. Edit your Homebridge config to enable standalone mode:
      sudo nano /var/homebridge/config.json
      …and paste this into it.
    2. Create the executable service:
      sudo nano /etc/systemd/system/homebridge-config-ui-x.service
      …and paste this into it.
    3. Reload all of the daemons
      sudo systemctl daemon-reload
    4. Enable the Homebridge service to start:
      sudo systemctl enable homebridge-config-ui-x
    5. Start Homebridge yourself:
      sudo systemctl start homebridge-config-ui-x

    Platform in /var/homebridge/config.json:

    "platforms": [
        {
          "platform": "config",
          "name": "Config",
          "port": 8080,
          "standalone": true,
          "restart": "sudo -n systemctl restart homebridge homebridge-config-ui-x"
       }
    ]

    Contents of /etc/systemd/system/homebridge-config-ui-x.service:

    [Unit]
    Description=Homebridge Config UI X
    After=syslog.target network-online.target
    
    [Service]
    Type=simple
    User=homebridge
    EnvironmentFile=/etc/default/homebridge
    ExecStart=/usr/bin/homebridge-config-ui-x $HOMEBRIDGE_OPTS
    Restart=on-failure
    RestartSec=3
    KillMode=process
    CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_CHOWN CAP_FOWNER CAP_DAC_OVERRIDE CAP_AUDIT_WRITE CAP_SYS_ADMIN
    AmbientCapabilities=CAP_NET_RAW
    
    [Install]
    WantedBy=multi-user.target

    JJJ

    July 16, 2019
    Homebridge
    Config UI
  • Install Homebridge on Raspberry Pi (3 or 4 preferred)

    This is for a fresh install of Homebridge with auto-start on reboot or error.

    If you are trying to convert an existing install, this step-by-step will not work for you, and you’ll need to modify it to suit your needs.

    1. Create the Default Settings file:
      sudo nano /etc/default/homebridge
      …and paste this into it.
    2. Create the executable service:
      sudo nano /etc/systemd/system/homebridge.service
      …and paste this into it.
    3. Create a user to run the service:
      sudo useradd --system homebridge
    4. Create the directory for Homebridge to live in:
      sudo mkdir /var/homebridge
    5. Open up the directory permissions:
      sudo chmod -R 0777 /var/homebridge
    6. Reload all of the daemons
      sudo systemctl daemon-reload
    7. Enable the Homebridge service to start:
      sudo systemctl enable homebridge
    8. Start Homebridge yourself:
      sudo systemctl start homebridge

    Troubleshooting:

    • journalctl -f -u homebridge to view the logs
    • systemctl status homebridge to check the service status.

    Contents of /etc/defaults/homebridge:

    # Defaults / Configuration options for homebridge
    # The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
    HOMEBRIDGE_OPTS=-U /var/homebridge
    
    # If you uncomment the following line, homebridge will log more
    # You can display this via systemd’s journalctl: journalctl -f -u homebridge
    # DEBUG=*

    Contents of /etc/systemd/system/homebridge.service:

    [Unit]
    Description=Node.js HomeKit Server
    After=syslog.target network-online.target
    
    [Service]
    Type=simple
    User=homebridge
    EnvironmentFile=/etc/default/homebridge
    ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS
    Restart=on-failure
    RestartSec=10
    KillMode=process
    
    [Install]
    WantedBy=multi-user.target

    JJJ

    July 16, 2019
    Homebridge

Proudly Powered by WordPress