Evolution of deployment
This commit is contained in:
@@ -6,5 +6,9 @@ For the camera, we use the [motion](https://motion-project.github.io/motion_conf
|
||||
|
||||
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.
|
||||
|
||||
We also pass in an SSH key to integrate with the [Geth](../Geth/) command service, so that users don't have to connect to the boards directly.
|
||||
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:
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
|
@@ -1,17 +1,3 @@
|
||||
|
||||
# Please make this file available to others
|
||||
# by sending it to <lirc@bartelmus.de>
|
||||
#
|
||||
# this config file was automatically generated
|
||||
# using lirc-0.9.0-pre1(default) on Thu Jun 29 00:24:26 2017
|
||||
#
|
||||
# contributed by darkfeather@aninix.net
|
||||
#
|
||||
# brand: LG.conf
|
||||
# model no. of remote control: AKB73715608
|
||||
# devices being controlled by this remote: TV
|
||||
#
|
||||
|
||||
begin remote
|
||||
|
||||
name LG-AKB73715608
|
||||
@@ -40,5 +26,3 @@ begin remote
|
||||
end codes
|
||||
|
||||
end remote
|
||||
|
||||
|
||||
|
28
roles/Geth-Hub/files/lircd.conf/LG-AKB73715608
Normal file
28
roles/Geth-Hub/files/lircd.conf/LG-AKB73715608
Normal file
@@ -0,0 +1,28 @@
|
||||
begin remote
|
||||
|
||||
name LG-AKB73715608
|
||||
bits 16
|
||||
flags SPACE_ENC|CONST_LENGTH
|
||||
eps 30
|
||||
aeps 100
|
||||
|
||||
header 9063 4496
|
||||
one 579 1673
|
||||
zero 579 546
|
||||
ptrail 580
|
||||
repeat 9066 2248
|
||||
pre_data_bits 16
|
||||
pre_data 0x20DF
|
||||
gap 108528
|
||||
toggle_bit_mask 0x0
|
||||
|
||||
begin codes
|
||||
KEY_POWER 0x10EF
|
||||
KEY_VOLUMEUP 0x40BF
|
||||
KEY_VOLUMEDOWN 0xC03F
|
||||
KEY_CONFIG 0xD02F
|
||||
KEY_ENTER 0x22DD
|
||||
KEY_MUTE 0x906F
|
||||
end codes
|
||||
|
||||
end remote
|
28
roles/Geth-Hub/files/lircd.conf/NS-RC4NA-14
Normal file
28
roles/Geth-Hub/files/lircd.conf/NS-RC4NA-14
Normal file
@@ -0,0 +1,28 @@
|
||||
begin remote
|
||||
|
||||
name NS-RC4NA-14
|
||||
bits 16
|
||||
flags SPACE_ENC|CONST_LENGTH
|
||||
eps 30
|
||||
aeps 100
|
||||
|
||||
header 9102 4441
|
||||
one 640 1623
|
||||
zero 640 496
|
||||
ptrail 639
|
||||
repeat 9103 2189
|
||||
pre_data_bits 16
|
||||
pre_data 0x61A0
|
||||
gap 108350
|
||||
toggle_bit_mask 0x0
|
||||
|
||||
begin codes
|
||||
KEY_POWER 0xF00F
|
||||
KEY_CONFIG 0xB847
|
||||
KEY_VOLUMEUP 0x30CF
|
||||
KEY_VOLUMEDOWN 0xB04F
|
||||
KEY_MUTE 0x708F
|
||||
KEY_ENTER 0x18E7
|
||||
end codes
|
||||
|
||||
end remote
|
@@ -6,6 +6,7 @@
|
||||
name:
|
||||
- motion
|
||||
- lirc
|
||||
- snmpd
|
||||
- libcamera-apps
|
||||
- ir-keytable
|
||||
state: present
|
||||
@@ -120,7 +121,7 @@
|
||||
register: lircd_remote_config
|
||||
become: yes
|
||||
copy:
|
||||
src: "lircd.conf/{{ inventory_hostname }}"
|
||||
src: "lircd.conf/{{ remote }}"
|
||||
dest: /etc/lirc/lircd.conf
|
||||
|
||||
- name: Start the services
|
||||
@@ -130,3 +131,17 @@
|
||||
name: lircd
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
||||
|
||||
- name: SNMPD config
|
||||
become: yes
|
||||
template:
|
||||
src: snmpd.conf.j2
|
||||
dest: /etc/snmp/snmpd.conf
|
||||
|
||||
- name: SNMPD service
|
||||
become: yes
|
||||
service:
|
||||
name: snmpd
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
23
roles/Geth-Hub/templates/snmpd.conf.j2
Normal file
23
roles/Geth-Hub/templates/snmpd.conf.j2
Normal file
@@ -0,0 +1,23 @@
|
||||
sysLocation {{ inventory_hostname }}
|
||||
sysContact {{ organization['admin'] }} <{{ organization['email'] }}>
|
||||
|
||||
sysServices 72
|
||||
|
||||
master agentx
|
||||
|
||||
agentaddress {{ ip }}:161
|
||||
|
||||
view systemonly included .1.3.6.1.2.1.1
|
||||
view systemonly included .1.3.6.1.2.1.25.1
|
||||
view remotecmds included .1
|
||||
|
||||
CreateUser remote SHA {{ passwords[inventory_hostname] }} AES {{ passwords[inventory_hostname] }}
|
||||
|
||||
rouser remote priv .1
|
||||
|
||||
extend -cacheTime 1 power /usr/bin/irsend SEND_ONCE {{ remote }} KEY_POWER
|
||||
extend -cacheTime 1 mute /usr/bin/irsend SEND_ONCE {{ remote }} KEY_MUTE
|
||||
extend -cacheTime 1 volumeup /usr/bin/irsend SEND_ONCE {{ remote }} KEY_VOLUMEUP
|
||||
extend -cacheTime 1 volumedown /usr/bin/irsend SEND_ONCE {{ remote }} KEY_VOLUMEDOWN
|
||||
extend -cacheTime 1 config /usr/bin/irsend SEND_ONCE {{ remote }} KEY_CONFIG
|
||||
extend -cacheTime 1 enter /usr/bin/irsend SEND_ONCE {{ remote }} KEY_ENTER
|
Reference in New Issue
Block a user