forked from matt8707/hass-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
secrets [REDACTED].yaml
executable file
·183 lines (152 loc) · 8.81 KB
/
secrets [REDACTED].yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
homeassistant_latitude: [REDACTED]
homeassistant_longitude: [REDACTED]
homeassistant_elevation: [REDACTED]
recorder_db_url: mysql://homeassistant:[REDACTED PASSWORD]@[REDACTED IP]/homeassistant?charset=utf8mb4
iphonedetect_mattias: [REDACTED IP]
iphonedetect_sanja: [REDACTED IP]
wemo_static:
- [REDACTED IP]
spotify_client_id: [REDACTED]
spotify_client_secret: [REDACTED]
tibber_token: Bearer [REDACTED]
darksky_api_key: [REDACTED]
xiaomi_vacuum_host: [REDACTED]
xiaomi_vacuum_token: [REDACTED]
xiaomi_cloud_username: [REDACTED]
xiaomi_cloud_password: [REDACTED]
github_username: [REDACTED]
github_access_token: [REDACTED]
google_client_id: [REDACTED]
google_client_secret: [REDACTED]
caldav_username: [REDACTED]
caldav_password: [REDACTED]
plex_token: [REDACTED]
plex_host: [REDACTED IP]
plex_port: [REDACTED PORT]
youtube_token: '[REDACTED]|[REDACTED]'
unifi_host: [REDACTED IP]
unifi_username: [REDACTED]
unifi_password: [REDACTED]
unifi_poweroff: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] poweroff
unifi_reboot: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] reboot
udm_unifios: |-
data='{"username":"[REDACTED]","password":"[REDACTED]"}'; ip='https://[REDACTED]:443';\
c=$(curl -H 'Content-Type: application/json' -d $data -ksc - $ip/api/auth/login -o /dev/null);\
echo "${c}" | curl -ksb - $ip/proxy/network/api/s/default/stat/device/
influxdb_host: [REDACTED IP]
playstation_5_state: /config/www/ps5.py -b [REDACTED IP]
playstation_5_wake: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] 'docker exec playactor sh -c "playactor wake --host-name PS5-635" 2>/dev/null'
playstation_5_sleep: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] 'docker exec playactor sh -c "playactor standby --host-name PS5-635" 2>/dev/null'
playactor_version_installed: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] 'docker exec playactor sh -c "playactor about" 2>/dev/null'
switchbot_mqtt_command: homeassistant/switch/switchbot/[REDACTED MAC]/set
switchbot_mqtt_state: homeassistant/switch/switchbot/[REDACTED MAC]/state
switchbot_mqtt_battery: homeassistant/switch/switchbot/[REDACTED MAC]/battery-percentage
homekit_ip_address: [REDACTED IP]
skanetrafiken: https://api.resrobot.se/v2/trip?key=[REDACTED]&originCoordLat=[REDACTED]&originCoordLong=[REDACTED]&destId=[REDACTED]&format=json
ha_dockermon_restart_container: 'curl [REDACTED IP]/container/home-assistant/restart'
monitor_docker_rpi_url: tcp://[REDACTED IP]
wake_on_lan_mac: [REDACTED MAC]
wake_on_lan_host: [REDACTED IP]
kemper_version: >
ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] /usr/local/bin/python3 kemper-version/kemper-version.py || echo '{"profiler_latest": "", "profiler_installed": "", "rigmanager_latest": "", "rigmanager_installed": ""}'
waste_collection_schedule_url: https://nsr.se/wp/wp-admin/admin-ajax.php?action=fetchDataFromFetchPlannerCalendar&query=[REDACTED]
rpi_sd: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] df / | awk '{print $5}' | tail -n 1 2>/dev/null
rpi_mem: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] free | grep Mem | awk '{print $3 / $2 * 100}' 2>/dev/null
rpi_cpu: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] top -bn 1 | grep "Cpu(s)" | awk '{print 100 - $8}' 2>/dev/null
rpi_uptime: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] uptime -s 2>/dev/null
rpi_poweroff: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] sudo shutdown -h now
rpi_reboot: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] sudo reboot
rpi_led_off: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] "sudo sh -c 'echo 0 > /sys/class/leds/led0/brightness' && sudo sh -c 'echo 0 > /sys/class/leds/led1/brightness'"
rpi_ping_host: [REDACTED IP]
imac_off: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] sudo /sbin/shutdown -h now 2>/dev/null
imac_sleep: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] sudo /sbin/shutdown -s now 2>/dev/null
imac_restart: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] sudo /sbin/shutdown -r now 2>/dev/null
imac_ip: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] dig +short myip.opendns.com @resolver1.opendns.com || echo 0
imac_cpu: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] top -l 1 | awk '/CPU usage/ {print $7}' 2>/dev/null
imac_mem: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] ps -A -o %mem | awk '{ mem += $1} END {print mem}' 2>/dev/null
imac_uptime: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] sysctl -n kern.boottime | awk '{print $4}' 2>/dev/null
monitors_mute_on: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] 'osascript -e "set volume with output muted" 2>/dev/null'
monitors_mute_off: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] 'osascript -e "set volume without output muted" 2>/dev/null'
monitors_mute_state: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] 'osascript -e "output muted of (get volume settings)"' || echo false
monitors_volume_slider: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] 'osascript -e "set volume output volume {{ states('input_number.monitors_volume') | int }} --100%" 2>/dev/null'
monitors_update_volume: ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] 'osascript -e "output volume of (get volume settings)"' || echo 0
reference_monitors: |-
ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] osascript <<EOF
tell application "System Events"
click menu bar item 1 of menu bar 2 of application process "SoundID Reference"
click menu item "KRK (28 Sep)" of menu 1 of menu bar 2 of application process "SoundID Reference"
end tell
EOF
reference_headphones: |-
ssh -q -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [REDACTED USER@IP] osascript <<EOF
tell application "System Events"
click menu bar item 1 of menu bar 2 of application process "SoundID Reference"
click menu item "Beyerdynamic DT 990 Pro 250 Ohm Wired Av..." of menu 1 of menu bar 2 of application process "SoundID Reference"
end tell
EOF
ir_fan_power: b64:[REDACTED IR]
ir_fan_swing: b64:[REDACTED IR]
ir_fan_speed: b64:[REDACTED IR]
ir_purifier_power: b64:[REDACTED IR]
ir_purifier_auto: b64:[REDACTED IR]
ir_purifier_speed_down: b64:[REDACTED IR]
ir_purifier_speed_up: b64:[REDACTED IR]
ir_purifier_turbo: b64:[REDACTED IR]
ir_ac_power: b64:[REDACTED IR]
ir_ac_swing: b64:[REDACTED IR]
ir_ac_speed_up: b64:[REDACTED IR]
ir_ac_speed_down: b64:[REDACTED IR]
apexcharts_influx: |-
let params = new URLSearchParams({
db: "home_assistant",
q: "SELECT value FROM kg WHERE entity_id = 'mattias_weight'"
}),
request = async () => {
let a = [],
r = await fetch("http://[REDACTED]/query?" + params),
j = await r.json();
for (let r of j.results[0].series[0].values) a.push([new Date(r[0]), r[1]]);
return a
};
return request()
apexcharts_tibber: |-
let array = [],
request = async () => {
let request = await fetch("https://api.tibber.com/v1-beta/gql", {
method: "POST",
headers: {
Authorization: "Bearer [REDACTED]",
"Content-Type": "application/json"
},
body: JSON.stringify({
query: "{viewer{homes{consumption(resolution: MONTHLY, last: 12){nodes{from consumption}}}}}"
})
}),
json = await request.json();
for (let request of json.data.viewer.homes[0].consumption.nodes) array.push([new Date(request.from), request.consumption]);
return array
};
return request()
apexcharts_github: |-
let stargazers_total = [],
auth = {
headers: new Headers({
accept: "application/vnd.github.v3.star+json",
Authorization: "token [REDACTED]"
})
},
response = await fetch("https://api.github.com/repos/matt8707/hass-config", auth),
data = await response.json();
stargazers_total.push(data.stargazers_count);
let apex_arr = [],
stargazer_count = 0,
totalPages = Math.ceil(stargazers_total[0] / 100);
for (var i = 1; i <= totalPages; i++) {
let data = await fetch(`https://api.github.com/repos/matt8707/hass-config/stargazers?per_page=100&page=${i}`, auth);
(await data.json()).forEach(data => {
Object.entries(data).forEach(([key, value]) => {
key === "starred_at" && (stargazer_count++, apex_arr.push([new Date(value), stargazer_count]))
})
})
}
return apex_arr;