Kapisi/roles/Vergil/README.md

23 lines
2.5 KiB
Markdown
Raw Permalink Normal View History

2021-12-19 21:32:19 -06:00
These hubs are self-made IoT devices using [Raspberry Pi's](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/) on [Raspbian](https://www.raspberrypi.com/software). They provide cameras and IR remotes to control televisions, which can be used with Chromecasts to project [AniNIX/Yggdrasil](../Yggdrasil/) media for users to view. Usually, they'll be wrapped in a maker case with a cellphone 5A charger on a wall mount.
# Relevant Files and Configuration
For the camera, we use the [motion](https://motion-project.github.io/motion_config.html) service to control the Raspberry Pi [camera module](https://www.raspberrypi.com/products/camera-module-v2/). This is reflected in the motion config.
For the IR control we use an [IR shield](https://www.amazon.com/s?k=Raspberry+pi+infrared+expansion+board+IR+transmitter&ref=nb_sb_noss) controlled by the [lircd](https://www.lirc.org/) service. As a note, in order for this to work, you have to set the pinout in the `/boot/config.txt` -- we try to default this in, but you may need to set `gpio_in_pin` and `gpio_out_pin` attributes for your particular board and shield.
2023-11-30 02:47:16 -06:00
We also set up an SNMPv3 daemon service on the hubs, to work with their IR control. This snmpd requires the Geth OVA to add snmpget using `apk update && apk add net-snmp-tools` from the `Terminal & SSH` add-on. Covers can then be added from the [command-line integration](https://www.home-assistant.io/integrations/command_line/). They'll look something like this:
```
2024-07-23 14:18:32 -05:00
- cover:
command_open: bash /config/snmp.sh 10.0.1.32 .1.3.6.1.4.1.8072.1.3.2.4.1.2.5.112.111.119.101.114.1 # NET-SNMP-EXTEND-MIB::nsExtendOutLine."power".1
command_close: bash /config/snmp.sh 10.0.1.32 .1.3.6.1.4.1.8072.1.3.2.4.1.2.6.99.111.110.102.105.103.1 # NET-SNMP-EXTEND-MIB::nsExtendOutLine."config".1
command_stop: bash /config/snmp.sh 10.0.1.32 .1.3.6.1.4.1.8072.1.3.2.4.1.2.5.101.110.116.101.114.1 # NET-SNMP-EXTEND-MIB::nsExtendOutLine."enter".1
name: livingroom_power
- cover:
command_open: bash /config/snmp.sh 10.0.1.32 .1.3.6.1.4.1.8072.1.3.2.4.1.2.8.118.111.108.117.109.101.117.112.1 # NET-SNMP-EXTEND-MIB::nsExtendOutLine."volumeup".1
command_close: bash /config/snmp.sh 10.0.1.32 .1.3.6.1.4.1.8072.1.3.2.4.1.2.10.118.111.108.117.109.101.100.111.119.110.1 # NET-SNMP-EXTEND-MIB::nsExtendOutLine."volumedown".1
command_stop: bash /config/snmp.sh 10.0.1.32 .1.3.6.1.4.1.8072.1.3.2.4.1.2.4.109.117.116.101.1 # NET-SNMP-EXTEND-MIB::nsExtendOutLine."mute".1
name: livingroom_volume
2023-11-30 02:47:16 -06:00
```