Added sysdweb
This commit is contained in:
@@ -1,96 +0,0 @@
|
||||
# Run with
|
||||
# ansible-playbook 01-download-and-prepare-raspi-image.yml
|
||||
---
|
||||
|
||||
- hosts: 127.0.0.1
|
||||
connection: local
|
||||
gather_facts: false
|
||||
vars:
|
||||
target_folder: "/media/martin/data_linux/tmp/"
|
||||
vars_prompt:
|
||||
- name: "ansible_become_pass"
|
||||
prompt: "Sudo password to mount raspi image"
|
||||
- name: "new_hostname"
|
||||
prompt: "New hostname for the PI"
|
||||
private: no
|
||||
tasks:
|
||||
# --- Preparation ---
|
||||
- name: Download Raspian image
|
||||
get_url:
|
||||
url: "https://downloads.raspberrypi.org/raspbian_lite_latest"
|
||||
dest: "{{target_folder}}/raspian_lite_latest.zip"
|
||||
- name: Unpack Image
|
||||
unarchive:
|
||||
src: "{{target_folder}}/raspian_lite_latest.zip"
|
||||
dest: "{{target_folder}}"
|
||||
creates: "{{target_folder}}/*raspbian*.img"
|
||||
- name: Make Folders to mount to
|
||||
file:
|
||||
path: "{{item}}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{target_folder}}/mounted_raspi_image"
|
||||
- "{{target_folder}}/mounted_raspi_image/boot"
|
||||
- "{{target_folder}}/mounted_raspi_image/system"
|
||||
- name: Setup Loopback
|
||||
become: true
|
||||
shell:
|
||||
cmd: "losetup -P /dev/loop42 {{target_folder}}/*raspbian*.img"
|
||||
creates: "/dev/loop42p1"
|
||||
- name: Mount Boot Partition
|
||||
become: true
|
||||
shell:
|
||||
warn: false
|
||||
cmd: "mount /dev/loop42p1 {{target_folder}}/mounted_raspi_image/boot"
|
||||
creates: "{{target_folder}}/mounted_raspi_image/boot/kernel.img"
|
||||
- name: Mount System Partition
|
||||
become: true
|
||||
shell:
|
||||
warn: false
|
||||
cmd: "mount /dev/loop42p2 {{target_folder}}/mounted_raspi_image/system"
|
||||
creates: "{{target_folder}}/mounted_raspi_image/system/bin"
|
||||
# --- Actual work ---
|
||||
- name: "Add SSH File to boot partition to allow for first remote login"
|
||||
become: true
|
||||
file:
|
||||
path: "{{target_folder}}/mounted_raspi_image/boot/ssh"
|
||||
state: touch
|
||||
- name: "Writing new hostname to /etc/hostname"
|
||||
become: true
|
||||
copy:
|
||||
content: "{{new_hostname}}"
|
||||
dest: "{{target_folder}}/mounted_raspi_image/system/etc/hostname"
|
||||
# --- Wind-down
|
||||
- name: Unmount System Partition
|
||||
become: true
|
||||
shell:
|
||||
warn: false
|
||||
cmd: "umount /dev/loop42p2"
|
||||
removes: "{{target_folder}}/mounted_raspi_image/system/bin"
|
||||
- name: Unmount Boot Partition
|
||||
become: true
|
||||
shell:
|
||||
warn: false
|
||||
cmd: "umount /dev/loop42p1"
|
||||
removes: "{{target_folder}}/mounted_raspi_image/boot/kernel.img"
|
||||
- name: Tear down loop device
|
||||
become: true
|
||||
shell:
|
||||
cmd: "losetup -d /dev/loop42"
|
||||
removes: "/dev/loop42p1"
|
||||
- name: Remove folders
|
||||
file:
|
||||
path: "{{item}}"
|
||||
state: absent
|
||||
with_items:
|
||||
- "{{target_folder}}/mounted_raspi_image"
|
||||
- "{{target_folder}}/mounted_raspi_image/boot"
|
||||
- "{{target_folder}}/mounted_raspi_image/system"
|
||||
- "{{target_folder}}/raspian_lite_latest.zip"
|
||||
- name: Final Image
|
||||
debug:
|
||||
msg: |
|
||||
The prepared image is ready at {{target_folder}}.
|
||||
Copy it to sdcard with
|
||||
dd bs=4M status=progress if=the_image of=/dev/your/sdcard
|
||||
use e.g. /dev/sdb not /dev/sdb1 !
|
||||
@@ -1,109 +0,0 @@
|
||||
# Run with
|
||||
# ansible-playbook -i raspberrypi, 02-provision_new_pi.yml
|
||||
# where "raspberrypi" is the hostname of the pi
|
||||
---
|
||||
|
||||
- hosts: kitchenpi
|
||||
gather_facts: false
|
||||
vars:
|
||||
timezone: "Europe/Berlin"
|
||||
wifi_country: "DE"
|
||||
wifi_ssid: "" # put SSID here to configure wifi
|
||||
wifi_pass_url: "bauer_wifi" # has to be in keepass with url "wifi_pass_url"
|
||||
ansible_ssh_pass: raspberry
|
||||
ansible_become: yes
|
||||
ansible_become_password: raspberry
|
||||
new_hostname: "" # set this to change the hostname
|
||||
vars_prompt:
|
||||
- name: ansible_user
|
||||
prompt: "User to connect with, put in 'pi' here if you connect the first time, else leave empty"
|
||||
default: root
|
||||
tasks:
|
||||
- name: Do apt update/upgrade
|
||||
apt: upgrade=yes update_cache=yes cache_valid_time=7200
|
||||
- name: Detect Raspi Model
|
||||
slurp: src=/sys/firmware/devicetree/base/model
|
||||
register: raspberry_model
|
||||
- name: Show Raspi Model
|
||||
debug: msg={{ raspberry_model.content | b64decode }}
|
||||
- name: Add authorized SSH key to root account
|
||||
authorized_key:
|
||||
user: root
|
||||
key: "{{ lookup('file', '../public_keys/martin_laptop.pub') }}"
|
||||
state: present
|
||||
- name: Activate root login with key
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "^#?PermitRootLogin"
|
||||
line: "PermitRootLogin prohibit-password"
|
||||
notify: restart sshd
|
||||
- name: Deactive SSH accepting locale vars (leads to warnings)
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "^#?AcceptEnv LANG LC_*"
|
||||
line: "#AcceptEnv LANG LC_*"
|
||||
notify: restart sshd
|
||||
- name: Get hostname
|
||||
command: "raspi-config nonint get_hostname"
|
||||
register: pi_hostname
|
||||
changed_when: False
|
||||
- name: Change hostname to {{ new_hostname }}
|
||||
command: "raspi-config nonint do_hostname {{ new_hostname }}"
|
||||
when: new_hostname | bool and pi_hostname.stdout != new_hostname
|
||||
- name: set boot mode to CLI
|
||||
command: "raspi-config nonint do_boot_behaviour B1"
|
||||
#I2 Change Timezone
|
||||
- name: Change timezone
|
||||
command: "raspi-config nonint do_change_timezone {{ timezone }}"
|
||||
- name: Change locale
|
||||
command: "raspi-config nonint do_change_locale en_US.UTF-8"
|
||||
- name: Change password of default pi account
|
||||
user:
|
||||
name: pi
|
||||
update_password: always
|
||||
password: "{{ lookup('keepass', 'default_rpi_password') | password_hash('sha512') }}"
|
||||
- name: Install Packages (vim, git, basic python stuff)
|
||||
apt:
|
||||
name:
|
||||
- vim
|
||||
- git
|
||||
- python3
|
||||
- python3-pip
|
||||
- python3-wheel
|
||||
cache_valid_time: 7200
|
||||
state: present
|
||||
- name: Copy vim config
|
||||
copy: src=../configs/vimrc dest=/root/.vimrc
|
||||
- name: Copy git config
|
||||
copy: src=../configs/gitconfig dest=/root/.gitconfig
|
||||
# Wifi
|
||||
- name: Get WiFi country
|
||||
command: "raspi-config nonint get_wifi_country"
|
||||
register: wifi_country
|
||||
changed_when: False
|
||||
ignore_errors: yes #to avoid error when WiFi is not present
|
||||
- name: Change WiFi country
|
||||
command: "raspi-config nonint do_wifi_country {{ wifi_country }}"
|
||||
- name: Set WiFi credentials
|
||||
command: "raspi-config nonint do_wifi_ssid_passphrase {{ wifi_ssid }} {{ lookup('keepass', wifi_pass_url) }}"
|
||||
when: wifi_ssid | bool
|
||||
# Message of the day
|
||||
- name: Set Message of the day
|
||||
copy: src=configs/motd/{{ inventory_hostname }} dest=/etc/motd
|
||||
#- name: Remove motd tail
|
||||
# copy: dest=/etc/motd.
|
||||
# LED off script
|
||||
- name: Copy led off script
|
||||
copy: src=configs/raspi-leds-off.sh dest=/usr/sbin/raspi-leds-off.sh mode="u+rwx"
|
||||
- name: Copy led off service
|
||||
copy: src=configs/raspi-leds-off.service dest=/lib/systemd/system/
|
||||
- name: Activate led off servic
|
||||
systemd: name=raspi-leds-off state=restarted enabled=yes daemon_reload=yes
|
||||
|
||||
handlers:
|
||||
- name: restart sshd
|
||||
service:
|
||||
name: sshd
|
||||
state: restarted
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
# Install instructions taken from
|
||||
# https://github.com/mikebrady/shairport-sync/blob/master/INSTALL.md
|
||||
|
||||
---
|
||||
|
||||
- hosts: kitchenpi
|
||||
gather_facts: false
|
||||
vars:
|
||||
shairport_sync_version: "3.3.5"
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: Apt install dependencies
|
||||
apt:
|
||||
cache_valid_time: 7200
|
||||
state: present
|
||||
name:
|
||||
- build-essential
|
||||
- git
|
||||
- xmltoman
|
||||
- autoconf
|
||||
- automake
|
||||
- libtool
|
||||
- libpopt-dev
|
||||
- libconfig-dev
|
||||
- libasound2-dev
|
||||
- avahi-daemon
|
||||
- libavahi-client-dev
|
||||
- libssl-dev
|
||||
- libsoxr-dev
|
||||
- name: Build and Install Shairport sync (may take a while)
|
||||
script: "scripts/build-shairport-sync.sh ${shairport_sync_version}"
|
||||
args:
|
||||
creates: /usr/local/bin/shairport-sync
|
||||
- name: Copy config
|
||||
template: src=configs/shairport-sync.conf dest=/etc/shairport-sync.conf
|
||||
- name: Sync alsa config
|
||||
template: src=configs/asound.conf dest=/etc/asound.conf
|
||||
- name: Modify service file to run as root
|
||||
lineinfile:
|
||||
path: /lib/systemd/system/shairport-sync.service
|
||||
regexp: "^#?User="
|
||||
line: "User=root"
|
||||
- name: Restart shairport-sync
|
||||
systemd: name=shairport-sync state=restarted enabled=yes daemon_reload=yes
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
|
||||
- hosts: kitchenpi
|
||||
gather_facts: false
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: Apt install squeezelite package
|
||||
apt: name=squeezelite cache_valid_time=7200 state=present
|
||||
- name: Install config file
|
||||
template: src=configs/squeezelite.cfg dest=/etc/default/squeezelite
|
||||
- name: Sync alsa config
|
||||
template: src=configs/asound.conf dest=/etc/asound.conf
|
||||
- name: Restart squeezelite
|
||||
systemd: name=squeezelite state=restarted enabled=yes daemon_reload=yes
|
||||
@@ -1,49 +0,0 @@
|
||||
---
|
||||
# lirc needs to be custom compiled on this kernel
|
||||
# https://gist.github.com/billpatrianakos/cb72e984d4730043fe79cbe5fc8f7941
|
||||
- hosts: kitchenpi
|
||||
gather_facts: false
|
||||
remote_user: root
|
||||
tasks:
|
||||
#- name: Apt install lirc package
|
||||
# apt: name=lirc cache_valid_time=7200 state=present
|
||||
# ignore_errors: yes
|
||||
- name: Install config file lirc_options.conf
|
||||
copy: src=configs/lirc/lirc_options.conf dest=/etc/lirc/lirc_options.conf
|
||||
- name: Install config file lircd.conf
|
||||
copy: src=configs/lirc/lircd.conf dest=/etc/lirc/lircd.conf
|
||||
- name: Install remote file
|
||||
copy: src=configs/lirc/hauppauge.conf dest=/etc/lirc/hauppauge.conf
|
||||
- name: create temporary directory
|
||||
tempfile:
|
||||
state: directory
|
||||
suffix: temp
|
||||
register: tempdir
|
||||
- name: Copy over lirc customly compiled lirc packages
|
||||
copy:
|
||||
src: configs/lirc/debs/
|
||||
dest: "{{ tempdir.path }}"
|
||||
when: tempdir.path is defined
|
||||
- name: Install custom lirc package 1
|
||||
apt:
|
||||
deb: "{{ tempdir.path }}/liblirc0_0.10.1-5.2_armhf.deb"
|
||||
when: tempdir.path is defined
|
||||
- name: Install custom lirc package 2
|
||||
apt:
|
||||
deb: "{{ tempdir.path }}/liblircclient0_0.10.1-5.2_armhf.deb"
|
||||
when: tempdir.path is defined
|
||||
- name: Install custom lirc package 3
|
||||
apt:
|
||||
deb: "{{ tempdir.path }}/lirc_0.10.1-5.2_armhf.deb"
|
||||
when: tempdir.path is defined
|
||||
- name: Activate overlay in boot config
|
||||
lineinfile:
|
||||
path: /boot/config.txt
|
||||
regexp: "^#?dtoverlay=gpio-ir"
|
||||
line: "dtoverlay=gpio-ir,gpio_pin=17"
|
||||
register: boot_overlay
|
||||
- name: Restart lircd
|
||||
systemd: name=lircd state=restarted enabled=yes daemon_reload=yes
|
||||
- name: Reboot if boot overlay changed
|
||||
reboot:
|
||||
when: boot_overlay.changed
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
|
||||
- hosts: newrpi
|
||||
gather_facts: false
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: Deactivate normal audio
|
||||
lineinfile:
|
||||
path: /boot/config.txt
|
||||
regexp: "^#?dtparam=audio=on"
|
||||
line: "#dtparam=audio=on"
|
||||
register: boot_overlay1
|
||||
- name: Activate Hifiberry
|
||||
lineinfile:
|
||||
path: /boot/config.txt
|
||||
regexp: "^#?dtoverlay=hifiberry-amp"
|
||||
line: "dtoverlay=hifiberry-amp"
|
||||
register: boot_overlay2
|
||||
#- name: Reboot if boot overlay changed
|
||||
# reboot:
|
||||
# when: boot_overlay1.changed or boot_overlay2.changed
|
||||
|
||||
|
||||
## State in /boot/config.txt
|
||||
# dtoverlay=hifiberry-amp
|
||||
# # remove old:
|
||||
# #dtparam=audio=on
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
|
||||
- hosts: kitchenpi
|
||||
gather_facts: false
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: apt install libgpiod2
|
||||
apt: name=libgpiod2 cache_valid_time=7200 state=present
|
||||
- name: pip install adafruit-circuitpython-dht
|
||||
pip:
|
||||
name: adafruit-circuitpython-dht
|
||||
executable: pip3
|
||||
- name: Install script config
|
||||
template: src=configs/dht22_sensing.json dest=/etc/dht22_sensing.json
|
||||
- name: Install script
|
||||
copy: src=configs/dht22_sensing.py dest=/usr/bin/dht22_sensing owner=root mode=u+rwx
|
||||
- name: Install systemd service file
|
||||
copy: src=configs/dht22_sensing.service dest=/lib/systemd/system/
|
||||
- name: Add script to autostart and start now
|
||||
systemd: name=dht22_sensing state=restarted enabled=yes daemon_reload=yes
|
||||
@@ -1,58 +0,0 @@
|
||||
pcm.soundcard {
|
||||
type hw
|
||||
card {{alsa_card_name}}
|
||||
}
|
||||
|
||||
ctl.dmixer {
|
||||
type hw
|
||||
card {{alsa_card_name}}
|
||||
}
|
||||
|
||||
pcm.dmixer {
|
||||
type dmix
|
||||
ipc_key 1024
|
||||
slave {
|
||||
pcm "soundcard"
|
||||
channels 2
|
||||
}
|
||||
}
|
||||
|
||||
pcm.dmixer_plug {
|
||||
type plug
|
||||
slave {
|
||||
pcm "dmixer"
|
||||
}
|
||||
}
|
||||
|
||||
pcm.softvol_shairport {
|
||||
type softvol
|
||||
slave {
|
||||
pcm "dmixer_plug"
|
||||
}
|
||||
control {
|
||||
name "ShairPort-Sync Volume"
|
||||
card 0
|
||||
}
|
||||
}
|
||||
|
||||
pcm.softvol_squeezelite {
|
||||
type softvol
|
||||
slave {
|
||||
pcm "dmixer_plug"
|
||||
}
|
||||
control {
|
||||
name "SqueezeLite Volume"
|
||||
card 0
|
||||
}
|
||||
}
|
||||
|
||||
pcm.softvol_effects {
|
||||
type softvol
|
||||
slave {
|
||||
pcm "dmixer_plug"
|
||||
}
|
||||
control {
|
||||
name "Effect Volume"
|
||||
card 0
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"ha_url": "https://ha.bauer.tech",
|
||||
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIxNjkxMWIzZmQ4ZWU0NDI0OTg0MjA0ZDllMDhkNGRlMCIsImlhdCI6MTU3ODE3MDU5MSwiZXhwIjoxODkzNTMwNTkxfQ.i7CdXEZy9DV9KPHAl-msK0rOfIUlPYo4zwwJ4UGhXuc",
|
||||
"dht_pin": "D12",
|
||||
"polling_sleep_time_seconds": 5,
|
||||
|
||||
"ha_temp_sensor_name": "{{sensor_room_name_ascii|lower}}_dht22_temperatur",
|
||||
"ha_temp_friendly_name": "{{sensor_room_name}} Temperatur",
|
||||
|
||||
"ha_humidity_sensor_name": "{{sensor_room_name_ascii|lower}}_dht22_luftfeuchtigkeit",
|
||||
"ha_humidity_friendly_name": "{{sensor_room_name}} Luftfeuchtigkeit"
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import requests
|
||||
import json
|
||||
import time
|
||||
import board
|
||||
import adafruit_dht
|
||||
|
||||
config = json.load(open("/etc/dht22_sensing.json"))
|
||||
dht_device = adafruit_dht.DHT22(getattr(board, config['dht_pin']))
|
||||
|
||||
|
||||
def send_to_home_assistant(temperature, humidity):
|
||||
headers = {
|
||||
'x-ha-access': config['token'],
|
||||
'Authorization': "Bearer {}".format(config['token'])
|
||||
}
|
||||
|
||||
temperature_url = "{}/api/states/sensor.{}".format(config['ha_url'], config['ha_temp_sensor_name'])
|
||||
temperatur_data = {
|
||||
"state": str(temperature),
|
||||
"attributes": {
|
||||
"device_class": "temperature",
|
||||
"friendly_name": config['ha_temp_friendly_name'],
|
||||
"unit_of_measurement": "°C"
|
||||
}
|
||||
}
|
||||
requests.post(temperature_url, json=temperatur_data, headers=headers)
|
||||
|
||||
humidity_url = "{}/api/states/sensor.{}".format(config['ha_url'], config['ha_humidity_sensor_name'])
|
||||
humidity_data = {
|
||||
"state": str(humidity),
|
||||
"attributes": {
|
||||
"device_class": "humidity",
|
||||
"friendly_name": config['ha_humidity_friendly_name'],
|
||||
"unit_of_measurement": "%"
|
||||
}
|
||||
}
|
||||
requests.post(humidity_url, json=humidity_data, headers=headers)
|
||||
|
||||
|
||||
def sense():
|
||||
try:
|
||||
send_to_home_assistant(dht_device.temperature, dht_device.humidity)
|
||||
except RuntimeError as error:
|
||||
# Errors happen fairly often, DHT's are hard to read, just keep going
|
||||
print(error.args[0])
|
||||
time.sleep(config['polling_sleep_time_seconds'])
|
||||
|
||||
|
||||
while True:
|
||||
sense()
|
||||
@@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=DHT22 Temperature Humidity Sensing
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/python3 /usr/bin/dht22_sensing
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,3 +0,0 @@
|
||||
ACTION=="add", SUBSYSTEM=="lirc", DRIVERS=="gpio_ir_recv", SYMLINK+="lirc-rx"
|
||||
ACTION=="add", SUBSYSTEM=="lirc", DRIVERS=="gpio-ir-tx", SYMLINK+="lirc-tx"
|
||||
ACTION=="add", SUBSYSTEM=="lirc", DRIVERS=="pwm-ir-tx", SYMLINK+="lirc-tx"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,79 +0,0 @@
|
||||
#
|
||||
# this config file was automatically generated
|
||||
# using lirc-0.7.0(any) on Sun Nov 28 20:25:09 2004
|
||||
#
|
||||
# contributed by
|
||||
#
|
||||
# brand: Hauppauge 350
|
||||
# Created: G.J. Werler (The Netherlands)
|
||||
# Project: Mythtv Fedora Pundit-R www.mythtvportal.com
|
||||
# Date: 2004/11/28
|
||||
# model no. of remote control: Hauppauge A415-HPG
|
||||
# devices being controlled by this remote: PVR-350
|
||||
#
|
||||
|
||||
begin remote
|
||||
|
||||
name Hauppauge
|
||||
bits 13
|
||||
flags RC5|CONST_LENGTH
|
||||
eps 30
|
||||
aeps 100
|
||||
|
||||
one 969 811
|
||||
zero 969 811
|
||||
plead 1097
|
||||
gap 114605
|
||||
toggle_bit 2
|
||||
|
||||
begin codes
|
||||
KEY_GOTO 0x00000000000017BB
|
||||
KEY_POWER 0x00000000000017BD
|
||||
KEY_TV 0x000000000000179C
|
||||
KEY_VIDEO 0x0000000000001798
|
||||
KEY_MUSIC 0x0000000000001799
|
||||
KEY_PICTURES 0x000000000000179A
|
||||
KEY_EPG 0x000000000000179B
|
||||
KEY_RADIO 0x000000000000178C
|
||||
KEY_UP 0x0000000000001794
|
||||
KEY_LEFT 0x0000000000001796
|
||||
KEY_RIGHT 0x0000000000001797
|
||||
KEY_DOWN 0x0000000000001795
|
||||
KEY_OK 0x00000000000017A5
|
||||
KEY_EXIT 0x000000000000179F
|
||||
KEY_MENU 0x000000000000178D
|
||||
KEY_VOLUMEUP 0x0000000000001790
|
||||
KEY_VOLUMEDOWN 0x0000000000001791
|
||||
KEY_CHANNEL 0x0000000000001792
|
||||
KEY_MUTE 0x000000000000178F
|
||||
KEY_CHANNELUP 0x00000000000017A0
|
||||
KEY_CHANNELDOWN 0x00000000000017A1
|
||||
KEY_RECORD 0x00000000000017B7
|
||||
KEY_STOP 0x00000000000017B6
|
||||
KEY_PREVIOUS 0x00000000000017B2
|
||||
KEY_PLAY 0x00000000000017B5
|
||||
KEY_FORWARD 0x00000000000017B4
|
||||
KEY_REWIND 0x00000000000017A4
|
||||
KEY_PAUSE 0x00000000000017B0
|
||||
KEY_FASTFORWARD 0x000000000000179E
|
||||
BTN_1 0x0000000000001781
|
||||
BTN_2 0x0000000000001782
|
||||
BTN_3 0x0000000000001783
|
||||
BTN_4 0x0000000000001784
|
||||
BTN_5 0x0000000000001785
|
||||
BTN_6 0x0000000000001786
|
||||
BTN_7 0x0000000000001787
|
||||
BTN_8 0x0000000000001788
|
||||
BTN_9 0x0000000000001789
|
||||
KEY_NUMERIC_STAR 0x000000000000178A
|
||||
BTN_0 0x0000000000001780
|
||||
KEY_NUMERIC_POUND 0x000000000000178E
|
||||
KEY_RED 0x000000000000178B
|
||||
KEY_GREEN 0x00000000000017AE
|
||||
KEY_YELLOW 0x00000000000017B8
|
||||
KEY_BLUE 0x00000000000017A9
|
||||
end codes
|
||||
|
||||
end remote
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
[lircd]
|
||||
nodaemon = False
|
||||
driver = default
|
||||
device = /dev/lirc0
|
||||
listen = 0.0.0.0:2222
|
||||
output = /var/run/lirc/lircd
|
||||
pidfile = /var/run/lirc/lircd.pid
|
||||
plugindir = /usr/lib/arm-linux-gnueabihf/lirc/plugins
|
||||
permission = 666
|
||||
allow-simulate = No
|
||||
repeat-max = 600
|
||||
@@ -1 +0,0 @@
|
||||
include "hauppauge.conf"
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
WELCOME IN THE BEDROOM
|
||||
|
||||
!__________!
|
||||
|____ ____|
|
||||
_____ {____}{____} _____
|
||||
__|_*_|__%%%%%%%%%%%%__|_*_|
|
||||
| | %%%%%%%%%%%%%% | |
|
||||
%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%
|
||||
/||||||||||||||||||||\
|
||||
||||||||||||||||||||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
WELCOME IN THE KITCHEN
|
||||
|
||||
___
|
||||
.' _ '.
|
||||
/ /` `\ \
|
||||
| | [__]
|
||||
| | {{
|
||||
| | }}
|
||||
_ | | _ {{
|
||||
___________<_>_| |_<_>}}________
|
||||
.=======^=(___)=^={{====.
|
||||
/ .----------------}}---. \
|
||||
/ / {{ \ \
|
||||
/ / }} \ \
|
||||
( '=========================' )
|
||||
'-----------------------------'
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
THIS IS A NEW RASPI - CONFIGURE IT!
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
[Unit]
|
||||
Description=Turn Raspi LEDs off at boot
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/raspi-leds-off.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo none > /sys/class/leds/led0/trigger
|
||||
echo none > /sys/class/leds/led1/trigger
|
||||
|
||||
echo 0 >/sys/class/leds/led0/brightness
|
||||
echo 0 >/sys/class/leds/led1/brightness
|
||||
@@ -1,9 +0,0 @@
|
||||
general =
|
||||
{
|
||||
name = "{{shairport_name}}";
|
||||
};
|
||||
|
||||
alsa =
|
||||
{
|
||||
output_device = "softvol_shairport";
|
||||
};
|
||||
@@ -1,3 +0,0 @@
|
||||
SL_NAME="{{squeezelite_name}}"
|
||||
SL_SOUNDCARD="softvol_squeezelite"
|
||||
SB_SERVER_IP="192.168.178.80"
|
||||
@@ -1,26 +0,0 @@
|
||||
all:
|
||||
hosts:
|
||||
server:
|
||||
ansible_host: home.bauer.tech
|
||||
ansible_port: 22187
|
||||
|
||||
children:
|
||||
iot:
|
||||
hosts:
|
||||
newrpi:
|
||||
squeezelite_name: MyTestRaspberry
|
||||
shairport_name: MyTestRaspberry
|
||||
alsa_card_name: 0
|
||||
sensor_room_name_ascii: testraum
|
||||
sensor_room_name: Test Raum
|
||||
heatingpi:
|
||||
bedroompi:
|
||||
kitchenpi:
|
||||
squeezelite_name: KitchenPi
|
||||
shairport_name: KitchenPi
|
||||
alsa_card_name: 0
|
||||
sensor_room_name_ascii: kueche
|
||||
sensor_room_name: Küche
|
||||
vars:
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/etc/modules
|
||||
-> bedroompi: snd-bcm2835
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
ARG1=$1
|
||||
VERSION=${ARG1:="3.3.6"}
|
||||
|
||||
# Make a new temporary directory and go there
|
||||
tmp_dir=$(mktemp -d)
|
||||
cd $tmp_dir
|
||||
|
||||
# Clone, build and install
|
||||
git clone https://github.com/mikebrady/shairport-sync.git
|
||||
git reset --hard origin/$VERSION
|
||||
cd shairport-sync
|
||||
autoreconf -fi
|
||||
./configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd
|
||||
make
|
||||
make install
|
||||
|
||||
# Clean up
|
||||
cd ~
|
||||
rm -rf $tmp_dir
|
||||
@@ -1,24 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import requests
|
||||
|
||||
key = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIxNjkxMWIzZmQ4ZWU0NDI0OTg0MjA0ZDllMDhkNGRlMCIsImlhdCI6MTU3ODE3MDU5MSwiZXhwIjoxODkzNTMwNTkxfQ.i7CdXEZy9DV9KPHAl-msK0rOfIUlPYo4zwwJ4UGhXuc"
|
||||
url = "https://ha.bauer.tech"
|
||||
|
||||
headers = {
|
||||
'x-ha-access': key,
|
||||
'Authorization': "Bearer {}".format(key)
|
||||
}
|
||||
|
||||
apiurl = url + "/api/states/sensor.schlafzimmer_temperatur"
|
||||
|
||||
data = {
|
||||
"state": "19",
|
||||
"attributes": {
|
||||
"device_class": "temperature",
|
||||
"friendly_name": "Schlafzimmer Temperatur",
|
||||
"unit_of_measurement": "°C"
|
||||
}
|
||||
}
|
||||
r = requests.post(apiurl, json=data, headers=headers)
|
||||
|
||||
print(r)
|
||||
Reference in New Issue
Block a user