3.2 KiB
3.2 KiB
Geth hubs are the most prototypical unit. They are basic control and data providers to the Geth gestalt.
Typical Install
Installation:
- [https://www.raspberrypi.org/downloads/raspbian/ Download the latest image.] Category:Raspberry Pi
- Buy a Raspberry Pi, microUSB 5V/4A power supply, and micro SD card 8GB or more in capacity.
- Attach the SD card to some Linux system.
- dd bs=4M if=raspbian.img of=/dev/
- Mount the /dev/sda2 partition to /mnt and /dev/sda1 partition to /mnt/boot
- "scp /usr/local/src/ConfigPackages /mnt/usr/local/src/"
- "chroot /mnt"
- "cd /usr/local/src/ConfigPackages/Geth"
- "make rpi-base"
Remotes
- Purchase an [https://www.newegg.com/Product/Product.aspx?Item=9SIA7BF2K18332 IR shield] and attach it to your GPIO pins.
- "make remote" from /usr/local/src/ConfigPackages/Geth on the Pi.
- [http://ozzmaker.com/how-to-control-the-gpio-on-a-raspberry-pi-with-an-ir-remote/ Set up LIRC to read and write from the shield.] This [https://raspberrypi.stackexchange.com/questions/50873/lirc-wont-transmit-irsend-hardware-does-not-support-sending article] may have more troubleshooting help.
- Use [http://www.lirc.org/html/irrecord.html irrecord] to capture the sequences from the current remote.
- At a minimum, capture power, input, enter, mute, volume up and volume down from your TV.
- DVD players and such devices may need more captures.
- Roombas only need launch, dock, and spot-clean commands. [https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/irobot/Roomba.lircd.conf These are already captured].
- Use irsend to test sending commands.
- Set up the proper SSH keys and ~/.ssh/config options to allow the hass user to SSH to the Pi without a password.
The following snippet added to your configuration.yaml to allow remote-like activity.
switch: - platform: command_line switches: mainpower: command_on: "ssh -o StrictHostKeyChecking=no -q pi@geth-host-1 irsend SEND_ONCE NS-RC4NA-14 KEY_POWER" command_state: 'ping -c 1 mainchromecast.aninix.net | grep -c "1 received"' command_off: "ssh -o StrictHostKeyChecking=no -q pi@geth-host-1 irsend SEND_ONCE NS-RC4NA-14 KEY_POWER" cover: - platform: command_line covers: mainvolume: command_open: "ssh -o StrictHostKeyChecking=no -q pi@geth-host-1 irsend SEND_ONCE NS-RC4NA-14 KEY_VOLUMEUP" command_stop: "ssh -o StrictHostKeyChecking=no -q pi@geth-host-1 irsend SEND_ONCE NS-RC4NA-14 KEY_MUTE" command_close: "ssh -o StrictHostKeyChecking=no -q pi@geth-host-1 irsend SEND_ONCE NS-RC4NA-14 KEY_VOLUMEDOWN" #icon: mdi:volume-medium maininput: command_open: "ssh -o StrictHostKeyChecking=no -q pi@geth-host-1 irsend SEND_ONCE NS-RC4NA-14 KEY_CONFIG" command_stop: "ssh -o StrictHostKeyChecking=no -q pi@geth-host-1 irsend SEND_ONCE NS-RC4NA-14 KEY_ENTER" command_close: "ssh -o StrictHostKeyChecking=no -q pi@geth-host-1 irsend SEND_ONCE NS-RC4NA-14 KEY_CONFIG" #icon: mdi:animation
Cameras
A package, motion, provided by Raspbian allows use of [https://www.raspberrypi.org/products/camera-module-v2/ cameras], which are more secure than oft-compromised off-the-shelf IP cameras.