Updates & fixes
This commit is contained in:
parent
6c421a4ae1
commit
f1d104a224
54
full.yml
54
full.yml
|
@ -1,27 +1,39 @@
|
|||
---
|
||||
#- hosts: bedroompi, kitchenpi
|
||||
# roles:
|
||||
# - pi-standard-setup
|
||||
# - pi-squeezelite-custom
|
||||
# - pi-shairport
|
||||
# - pi-lirc
|
||||
# - pi-dhtsensor
|
||||
#
|
||||
#- hosts: esszimmerradio
|
||||
# roles:
|
||||
# - pi-standard-setup
|
||||
# - pi-squeezelite-custom
|
||||
# - pi-shairport
|
||||
# - pi-lirc
|
||||
# - pi-sispmctl
|
||||
#
|
||||
|
||||
|
||||
- hosts: esszimmerradio
|
||||
roles:
|
||||
- pi-standard-setup
|
||||
- pi-squeezelite-custom
|
||||
- pi-shairport
|
||||
- pi-lirc
|
||||
- pi-sispmctl
|
||||
|
||||
- hosts: musikserverwohnzimmeroben
|
||||
roles:
|
||||
#- pi-standard-setup
|
||||
#- pi-squeezelite-custom
|
||||
#- pi-shairport
|
||||
- pi-standard-setup
|
||||
- pi-hifiberry-amp
|
||||
- pi-squeezelite-custom
|
||||
- pi-shairport
|
||||
- pi-irserver
|
||||
#- pi-dhtsensor
|
||||
#- pi-squeezeserver
|
||||
- pi-dhtsensor
|
||||
- pi-squeezeserver
|
||||
|
||||
- hosts: bedroompi, kitchenpi
|
||||
roles:
|
||||
- pi-standard-setup
|
||||
- pi-squeezelite-custom
|
||||
- pi-shairport
|
||||
- pi-lirc
|
||||
- pi-dhtsensor
|
||||
|
||||
- hosts: octopi
|
||||
roles:
|
||||
- pi-dhtsensor
|
||||
|
||||
|
||||
#- hosts: newrpi
|
||||
# roles:
|
||||
# - pi-standard-setup
|
||||
# - pi-lirc
|
||||
|
||||
|
|
|
@ -7,6 +7,10 @@ all:
|
|||
children:
|
||||
iot:
|
||||
hosts:
|
||||
octopi:
|
||||
sensor_room_name_ascii: prusaprinter
|
||||
sensor_room_name: prusaprinter
|
||||
dht_pin: 26
|
||||
bedroompi:
|
||||
squeezelite_name: BedroomPi
|
||||
shairport_name: BedroomPi
|
||||
|
@ -19,19 +23,21 @@ all:
|
|||
alsa_card_name: 0
|
||||
sensor_room_name_ascii: kueche
|
||||
sensor_room_name: Küche
|
||||
hifiberry_overlay: hifiberry-amp
|
||||
esszimmerradio: # oben, eltern
|
||||
squeezelite_name: Esszimmer
|
||||
shairport_name: EsszimmerRadioOben
|
||||
shairport_name: _Oben_Esszimmer
|
||||
alsa_card_name: Device
|
||||
squeezeserver: 192.168.178.100
|
||||
configure_wifi: true
|
||||
musikserverwohnzimmeroben: # oben, eltern
|
||||
squeezelite_name: Wohnzimmer
|
||||
shairport_name: WohnzimmerRadioOben
|
||||
shairport_name: _Oben_Wohnzimmer
|
||||
alsa_card_name: 0
|
||||
squeezeserver: 192.168.178.100
|
||||
sensor_room_name_ascii: wohnzimmeroben
|
||||
sensor_room_name: WohnzimmerOben
|
||||
hifiberry_overlay: hifiberry-dacplus
|
||||
newrpi:
|
||||
squeezelite_name: MyTestRaspberry
|
||||
shairport_name: MyTestRaspberry
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from keepasshttplib import keepasshttplib, encrypter
|
||||
|
||||
import requests
|
||||
|
||||
DOCUMENTATION = """
|
||||
lookup: keepass
|
||||
|
@ -39,12 +39,12 @@ class LookupModule(LookupBase):
|
|||
else:
|
||||
entry_path, entry_attr = terms[0], terms[1]
|
||||
|
||||
if not self._test_connection():
|
||||
raise AnsibleError('Keepass is closed!')
|
||||
#if not self._test_connection():
|
||||
# raise AnsibleError('Keepass is closed!')
|
||||
try:
|
||||
auth = self.k.get_credentials(entry_path)
|
||||
except Exception as e:
|
||||
raise AnsibleError('Keepass error obtaining entry {}: {}'.format(host_name, e))
|
||||
raise AnsibleError('Keepass error obtaining entry {}: {}'.format(entry_path, e))
|
||||
if auth:
|
||||
if entry_attr not in ('username', 'user', 'pass', 'passwd', 'password'):
|
||||
raise AnsibleError("Keepass wrong entry")
|
|
@ -47,7 +47,7 @@ def send_to_home_assistant(temperature, humidity):
|
|||
temperature_url = "{}/api/states/sensor.{}".format(
|
||||
config['ha_url'], config['ha_temp_sensor_name'])
|
||||
temperatur_data = {
|
||||
"state": str(temperature),
|
||||
"state": "{:.1f}".format(temperature),
|
||||
"attributes": {
|
||||
"device_class": "temperature",
|
||||
"friendly_name": config['ha_temp_friendly_name'],
|
||||
|
@ -59,7 +59,7 @@ def send_to_home_assistant(temperature, humidity):
|
|||
humidity_url = "{}/api/states/sensor.{}".format(
|
||||
config['ha_url'], config['ha_humidity_sensor_name'])
|
||||
humidity_data = {
|
||||
"state": str(humidity),
|
||||
"state": "{:.1f}".format(humidity),
|
||||
"attributes": {
|
||||
"device_class": "humidity",
|
||||
"friendly_name": config['ha_humidity_friendly_name'],
|
||||
|
@ -70,8 +70,8 @@ def send_to_home_assistant(temperature, humidity):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
temp_filter = Filter(2, 5)
|
||||
humidity_filter = Filter(3, 5)
|
||||
temp_filter = Filter(4, 10)
|
||||
humidity_filter = Filter(4, 10)
|
||||
|
||||
while True:
|
||||
sensor = Adafruit_DHT.DHT22
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
lineinfile:
|
||||
path: /boot/config.txt
|
||||
regexp: "^#?dtoverlay=hifiberry-amp"
|
||||
line: "dtoverlay=hifiberry-amp"
|
||||
line: "dtoverlay={{hifiberry_overlay}}"
|
||||
notify: reboot
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
- name: Copy irserver
|
||||
copy: src=irserver dest=/usr/bin/irserver mode=u+rx
|
||||
- name: Make config dir for remotes
|
||||
file: path=/usr/bin/remotes state=directory
|
||||
- name: Copy hauppauge remote
|
||||
copy: src=hauppauge.rem dest=/usr/bin/remotes/
|
||||
- name: Copy irserver systemd file
|
||||
copy: src=irserver.service dest=/lib/systemd/system/
|
||||
- name: Enable irserver autostart
|
||||
|
|
|
@ -22,14 +22,17 @@
|
|||
when: tempdir.path is defined
|
||||
- name: Install custom lirc package 1
|
||||
apt:
|
||||
force: True
|
||||
deb: "{{ tempdir.path }}/liblirc0_0.10.1-5.2_armhf.deb"
|
||||
when: tempdir.path is defined
|
||||
- name: Install custom lirc package 2
|
||||
apt:
|
||||
force: True
|
||||
deb: "{{ tempdir.path }}/liblircclient0_0.10.1-5.2_armhf.deb"
|
||||
when: tempdir.path is defined
|
||||
- name: Install custom lirc package 3
|
||||
apt:
|
||||
force: True
|
||||
deb: "{{ tempdir.path }}/lirc_0.10.1-5.2_armhf.deb"
|
||||
when: tempdir.path is defined
|
||||
- name: Activate overlay in boot config
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
Musik Server Wohnzimmer oben
|
||||
|
||||
|~~~~~~~~~~~~~~~|
|
||||
|
@ -5,3 +6,5 @@
|
|||
| |
|
||||
/~~\| /~~\|
|
||||
\__/ \__/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
=================
|
||||
WELCOME TO OCTOPI
|
||||
=================
|
|
@ -56,6 +56,7 @@
|
|||
- python3
|
||||
- python3-pip
|
||||
- python3-wheel
|
||||
- telnet
|
||||
cache_valid_time: 7200
|
||||
state: present
|
||||
- name: Copy vim config
|
||||
|
@ -87,7 +88,7 @@
|
|||
interval = 15
|
||||
when: configure_wifi
|
||||
- name: Start watchdog
|
||||
systemd: name=watchdog state=restarted enabled=yes daemon_reload=yes
|
||||
systemd: name=watchdog state=started enabled=yes daemon_reload=yes # state=restarted not working, also not manually
|
||||
when: configure_wifi
|
||||
# Message of the day
|
||||
- name: Set Message of the day
|
||||
|
|
Loading…
Reference in New Issue