Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim timleland

View GitHub Profile
View config.json
{
"bridge":{
"name":"Homebridge",
"username":"",
"port":51925,
"pin":"xxx-xx-xxx"
},
"description":"iHome",
"accessories":[
View googlehome.py
#!/usr/bin/env python
import urllib, json, subprocess, time
lastCommandDate = None
url = 'https://spreadsheets.google.com/feeds/list/YOUR_SPREADSHEET_ID/1/public/values?alt=json'
while True:
time.sleep(.5)
View googlehome
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
View googlehome.service
[Unit]
Description=Google Home Outlets
After=syslog.target network-online.target
[Service]
Type=simple
User=googlehome
ExecStart=/home/pi/googlehome.py
Restart=on-failure
RestartSec=10
You can’t perform that action at this time.