├── HassOsEnableSSH ├── CHANGELOG.md ├── DOCS.md ├── Dockerfile ├── README.md ├── apparmor.txt ├── config.json ├── configuration.png ├── icon.png ├── icon.xcf ├── logo.png ├── logo.xcf └── run.sh ├── Pi4EnableI2C ├── CHANGELOG.md ├── DOCS.md ├── Dockerfile ├── README.md ├── apparmor.txt ├── config.json ├── icon.png ├── icon.xcf ├── logo.png ├── logo.xcf └── run.sh ├── Pi4EnableSerial ├── CHANGELOG.md ├── DOCS.md ├── Dockerfile ├── README.md ├── apparmor.txt ├── config.json ├── icon.png ├── icon.xcf ├── logo.png ├── logo.xcf └── run.sh ├── README.md ├── Run ├── CHANGELOG.md ├── DOCS.md ├── Dockerfile ├── README.md ├── config.json ├── icon.png ├── icon.xcf ├── logo.png ├── logo.xcf ├── rootfs │ └── opt │ │ └── logcontent.sh ├── run.sh └── test.txt ├── gitResources ├── configuration.png ├── protectionMode.png └── repository.jpg └── repository.json /HassOsEnableSSH/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | | Version | Change | 2 | |---------|-----------------------------------------------------------| 3 | | 0.9.3 | Check if running in 'protection mode' | 4 | | 0.9.2b | Add skip/success messages and obviously dummy default key | 5 | | 0.9.1a | Fix for changes in HAOS docker. Fix for mmcblk1p1 | 6 | | 0.9 | Support for mmcblk1p1 | 7 | | 0.7 | Support new Addon API | 8 | | 0.6 | Support for x86 | 9 | | 0.5 | Incresed security to absolute maximum because, why not? | 10 | | 0.4 | fixed docker error with cache | 11 | | 0.3 | Supporting odroid | 12 | | 0.2 | Improving security rating | 13 | | 0.1 | initial release | 14 | -------------------------------------------------------------------------------- /HassOsEnableSSH/DOCS.md: -------------------------------------------------------------------------------- 1 | 2 | # Configuration 3 | HassOS SSH Port 22222 Configurator requires configuration. Copy your public key into the configurator in a single line as such 4 | 5 | ``` 6 | SSHKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGTlRAfhm9BIV6l6sOubRgeCY0wRhYQVfB3QBWFl2ELpeAnTHwRYY+4pSP1Nu7FuZqAzDyZkssmFkbXHJGqi6EAnAkRLsKhzvDKo5WSXfEQdl2kSN5bgU/e37GfwqG4ChEfY56gwu+tdHtt4eIrzKpmUKqFZWJaGoeI9sHptQR9QNitEsm0krkOcK0VLFLTeau+HOO1A4plcLjBB9Y43SFjth/Ouke+DVGaBO2LYNc8U0S4EiHT6KdRXS4iIwYjXMw6SEsT7eP9IWQObQ4ZgyG0cHO/6ArxJ0fyOcAI29sLzM9466ID0mTaJWHriTRf6Lxhpdd/S30VTG0JMTdo/Fj root@HLAB-A17" 7 | ``` 8 | 9 | (PLEASE NOTE! In recent versions of Home Assistant, you do NOT NEED TO ADD the `SSHKey:` yaml key, UNLESS you select `Edit In YAML` from the `Configuration` 3-dot menu. In other words, just paste your double-quoted SSH public key directly into the field provided. You may want to select `Edit In YAML` to validate that the final YAML passed to the add-on is as expected). 10 | 11 | After saving, Home Assistant may change your input to look like this 12 | ![image](https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/main/gitResources/configuration.png) 13 | 14 | # Support 15 | If problems are encountered please get all "Karen" in the forums and make sure to display attitude, because developers love that. Alternatively, you can provide a log and tell us the problem, what you did, the model of your device, and what happened differently than what you expected. 16 | 17 | Support is provided on the Home Assistant Community forums [here](https://community.home-assistant.io/t/add-on-hassos-ssh-port-22222-configurator/264109) 18 | 19 | # Operation 20 | Hit the start button and observe the logs. Perform 2 pull-the-plug reboots after running this. You may uninstall the Add-On when it tells you it can find I2C. 21 | -------------------------------------------------------------------------------- /HassOsEnableSSH/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM 2 | FROM $BUILD_FROM 3 | ENV LANG C.UTF-8 4 | COPY run.sh / 5 | WORKDIR /data 6 | RUN chmod a+x /run.sh 7 | 8 | CMD [ "/run.sh" ] 9 | -------------------------------------------------------------------------------- /HassOsEnableSSH/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## HassOS SSH port 22222 Configurator 3 | Places an authorized_keys file in the location required by HassOS at boot time to enable the SSH port 22222. Run it once and then remove it. You won't need to run it again. 4 | 5 | You can connect an SDCard and up to two hard disks or USB drives, which are detected as sda or sdb, and they will all have HassOS SSH port 22222 enabled. 6 | 7 | # Support 8 | Support is provided on the Home Assistant Community forums, [here](https://community.home-assistant.io/t/add-on-hassos-ssh-port-22222-configurator/264109) 9 | 10 | # Operation 11 | **Important Note** when requested to reboot, choose Supervisor->Reboot Host or pull the power plug from your machine and restart it. 12 | 13 | Hit the start button and observe the logs. Perform 2 pull-the-plug reboots after running this. You may uninstall the Add-On when it tells you it found I2C. 14 | 15 | -------------------------------------------------------------------------------- /HassOsEnableSSH/apparmor.txt: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | profile hassos_ssh_configurator_addon flags=(attach_disconnected,mediate_deleted) { 4 | #include 5 | 6 | capability, 7 | file, 8 | mount, 9 | umount, 10 | remount, 11 | 12 | capability setgid, 13 | capability setuid, 14 | capability dac_override, 15 | 16 | # S6-Overlay 17 | /bin/** ix, 18 | /usr/bin/** ix, 19 | /usr/lib/bashio/** ix, 20 | /etc/s6/** rix, 21 | /run/s6/** rix, 22 | /etc/services.d/** rwix, 23 | /etc/cont-init.d/** rwix, 24 | /etc/cont-finish.d/** rwix, 25 | /init rix, 26 | /var/run/** mrwkl, 27 | /var/run/ mrwkl, 28 | /proc/self/attr/** mrwkl, 29 | # Files required 30 | /dev/sda1 mrwkl, 31 | /dev/sdb1 mrwkl, 32 | /dev/mmcblk0p1 mrwkl, 33 | /dev/* mrwkl, 34 | /tmp/** mrkwl, 35 | 36 | # Data access 37 | /data/** rw, 38 | 39 | 40 | # suppress ptrace denials when using 'docker ps' or using 'ps' inside a container 41 | ptrace (trace,read) peer=docker-default, 42 | 43 | # docker daemon confinement requires explict allow rule for signal 44 | signal (receive) set=(kill,term) peer=/usr/bin/docker, 45 | 46 | } 47 | -------------------------------------------------------------------------------- /HassOsEnableSSH/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HassOS SSH port 22222 Configurator", 3 | "version": "0.9.3", 4 | "slug": "hassos_ssh_configurator_addon", 5 | "description": "This enables the SSH HassOS Console on port 22222. Only for Home Assistant OS", 6 | "arch": ["amd64", "i386", "armhf", "armv7", "aarch64"], 7 | "startup": "once", 8 | "boot": "manual", 9 | "url":"https://community.home-assistant.io/t/add-on-hassos-ssh-port-22222-configurator/264109", 10 | "apparmor": "true", 11 | "init": false, 12 | "ingress": "true", 13 | "stage": "experimental", 14 | "privileged": ["SYS_ADMIN"], 15 | "full_access": true, 16 | "options": { 17 | "SSHKey": "ssh-rsa AAA.. Insert the full contents (i.e. ssh-rsa AAA...) of your public ssh key (id_rsa.pub, id_ecdsa.pub, ...) here." 18 | }, 19 | "schema": { 20 | "SSHKey": "str" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /HassOsEnableSSH/configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/HassOsEnableSSH/configuration.png -------------------------------------------------------------------------------- /HassOsEnableSSH/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/HassOsEnableSSH/icon.png -------------------------------------------------------------------------------- /HassOsEnableSSH/icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/HassOsEnableSSH/icon.xcf -------------------------------------------------------------------------------- /HassOsEnableSSH/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/HassOsEnableSSH/logo.png -------------------------------------------------------------------------------- /HassOsEnableSSH/logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/HassOsEnableSSH/logo.xcf -------------------------------------------------------------------------------- /HassOsEnableSSH/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | 3 | set +e 4 | 5 | fun() { while true; do nc -l -p 8099 -e echo -e 'HTTP/1.1 200 OK\r\nServer: DeskPiPro\r\nDate:$(date)\r\nContent-Type: text/html; charset=UTF8\r\nCache-Control: no-store, no cache, must-revalidate\r\n\r\n

This addon gains 2 security points for implementing this page. So it is here.\r\n\n\n'; done; } 6 | fun & 7 | 8 | key=$(jq -r '.SSHKey' options.json) 9 | 10 | mountAttempts=0 11 | mountFailures=0 12 | 13 | copyKeyToDevicePartition() { 14 | partition="/dev/${1}" 15 | tmp_path="/tmp/${1}" 16 | config_dir="${tmp_path}/CONFIG" 17 | authorized_keys_file="${config_dir}/authorized_keys" 18 | 19 | if [ ! -e "${partition}" ]; then 20 | echo "[skip] ${partition} does not exist." 21 | return 22 | fi 23 | 24 | mkdir -p "${tmp_path}" 2>/dev/null 25 | mountAttempts=$((mountAttempts + 1)) 26 | mount "${partition}" "${tmp_path}" 2>/dev/null 27 | 28 | # NOTE: This check must be run immediately after the `mount` command above. 29 | if [ $? -ne 0 ]; then 30 | mountFailures=$((mountFailures + 1)) 31 | return 32 | fi 33 | 34 | if [ ! -e "${tmp_path}/cmdline.txt" ]; then 35 | echo "[skip] No config file found in ${partition}" 36 | return 37 | fi 38 | 39 | if test -e "${config_dir}/" && grep "$key" "${authorized_keys_file}" >/dev/null 2>&1; then 40 | echo "[skip] Key already exists in ${partition}" 41 | return 42 | fi 43 | 44 | echo "Writing authorized_keys in ${partition}" 45 | mkdir -p "${config_dir}" 46 | echo "$key" >>"${authorized_keys_file}" 47 | echo "[SUCCESS] Key written to ${partition}." 48 | } 49 | partitions=( 50 | vda1 51 | sda1 52 | sdb1 53 | mmcblk0p1 54 | mmcblk1p1 55 | nvme0n1p1 56 | xvda8 57 | ) 58 | for partition in "${partitions[@]}"; do 59 | copyKeyToDevicePartition "${partition}" 60 | done 61 | 62 | if [ $mountAttempts -eq $mountFailures ]; then 63 | echo "=============================================================" 64 | echo "= # # # ###### # # ### # # ##### =" 65 | echo "= # # # # # # # ## # # ## # # # =" 66 | echo "= # # # # # # # # # # # # # # # =" 67 | echo "= # # # # # ###### # # # # # # # # #### =" 68 | echo "= # # # ####### # # # # # # # # # # # =" 69 | echo "= # # # # # # # # ## # # ## # # =" 70 | echo "= ## ## # # # # # # ### # # ##### =" 71 | echo "=============================================================" 72 | echo "=" 73 | echo "= Issue: Failed to mount all attempted partitions (${mountAttempts} partition(s))." 74 | echo "=" 75 | echo "= Possible Solution: Ensure that 'Protection mode' is disabled in the 'Info' tab of this Add-On." 76 | echo "=" 77 | echo "=============================================================" 78 | echo "[FAILURE] Configurator failed. Please follow the steps above, then restart this Add-On." 79 | sleep 99999 80 | exit 1 81 | fi 82 | 83 | echo "[Done] Configurator complete. Perform a hard power-off now. This configurator only works once and is no longer needed." 84 | sleep 99999 85 | -------------------------------------------------------------------------------- /Pi4EnableI2C/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | | Version | Change | 2 | |---|---| 3 | | 0.14 | Add nvme0n1p1 | 4 | | 0.13 | cleanup error in supervisor for device access with full access | 5 | | 0.11 | removing support for deprecated non-protected mode, and increasing to sec level 6! | 6 | | 0.10 | Support new Addon API | 7 | | 0.9 | Support for Raspian | 8 | | 0.8 | Do not run on startup | 9 | | 0.7 | Incresed security to absolute maximum because, why not? | 10 | | 0.6 | Testing increased security | 11 | | 0.4 | Improving security | 12 | | 0.3 | Supporting odroid | 13 | | 0.2 | fixed problem with not mounting partition correctly | 14 | | 0.1 | initial release | 15 | -------------------------------------------------------------------------------- /Pi4EnableI2C/DOCS.md: -------------------------------------------------------------------------------- 1 | No configuration required. If problems are encountered please get all "Karen" in the forums and make sure to display attitude, because developers love that. Alternatively, you can provide a log and tell us the problem, what you did, the model of your device, and what happened differently than what you expected. 2 | 3 | Support is provided on the Home Assistant Community forums, [here](https://community.home-assistant.io/t/hassos-i2c-configurator/264167) 4 | 5 | Just hit the start button and observe the logs. Perform 2- pull-the-plug restart after starting to ensure it takes effect. The first restart will emplace files. The second will activate I2C. You will see a message in the logs that I2C was found after the 2nd restart. You may uninstall the Add-On when complete. 6 | -------------------------------------------------------------------------------- /Pi4EnableI2C/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM 2 | FROM $BUILD_FROM 3 | ENV LANG C.UTF-8 4 | COPY run.sh / 5 | WORKDIR /data 6 | RUN chmod a+x /run.sh 7 | 8 | CMD [ "/run.sh" ] 9 | -------------------------------------------------------------------------------- /Pi4EnableI2C/README.md: -------------------------------------------------------------------------------- 1 | # HassOS I2C Configurator 2 | Enables the Raspberry Pi I2C bus. You can connect an SDCard and up to two hard disks or USB drives, which are detected as sda or sdb, and they will all have I2C enabled. 3 | 4 | # Support 5 | Support is provided on the Home Assistant Community forums, [here](https://community.home-assistant.io/t/hassos-i2c-configurator/264167) 6 | 7 | # Operation 8 | Hit the start button and observe the logs. You may uninstall the Add-On when complete. -------------------------------------------------------------------------------- /Pi4EnableI2C/apparmor.txt: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | profile hassosi2cconfiguratoraddon flags=(attach_disconnected,mediate_deleted) { 4 | #include 5 | 6 | capability, 7 | file, 8 | mount options=(user,rw,noatime) /dev/sda1, 9 | mount options=(user,rw,noatime) /dev/sda2, 10 | mount options=(user,rw,noatime) /dev/sdb1, 11 | mount options=(user,rw,noatime) /dev/sdb2, 12 | mount options=(user,rw,noatime) /dev/mmcblk0p1, 13 | mount options=(user,rw,noatime) /dev/mmcblk0p2, 14 | 15 | mount, 16 | umount, 17 | remount, 18 | 19 | capability setgid, 20 | capability setuid, 21 | capability dac_override, 22 | 23 | # S6-Overlay 24 | /bin/** ix, 25 | /usr/bin/** ix, 26 | /usr/lib/bashio/** ix, 27 | /etc/s6/** rix, 28 | /run/s6/** rix, 29 | /etc/services.d/** rwix, 30 | /etc/cont-init.d/** rwix, 31 | /etc/cont-finish.d/** rwix, 32 | /init rix, 33 | /var/run/** mrwkl, 34 | /var/run/ mrwkl, 35 | /proc/self/attr/** mrwkl, 36 | # Files required 37 | /dev/sda1 mrwkl, 38 | /dev/sda2 mrkwl, 39 | /dev/sdb1 mrwkl, 40 | /dev/sdb2 mrkwl, 41 | /dev/mmcblk0p1 mrwkl, 42 | /dev/mmcblk0p1 mrkwl, 43 | /dev/* mrwkl, 44 | /tmp/* mrwkl, 45 | /tmp/ mrkwl, 46 | 47 | # Data access 48 | /data/** rw, 49 | 50 | 51 | # suppress ptrace denials when using 'docker ps' or using 'ps' inside a container 52 | ptrace (trace,read) peer=docker-default, 53 | 54 | # docker daemon confinement requires explict allow rule for signal 55 | signal (receive) set=(kill,term) peer=/usr/bin/docker, 56 | 57 | } 58 | -------------------------------------------------------------------------------- /Pi4EnableI2C/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HassOS I2C Configurator", 3 | "version": "0.14", 4 | "slug": "hassosi2cconfiguratoraddon", 5 | "description": "This enables i2c. You can uninstall this when it has run once. Check logs for information.", 6 | "arch": ["armhf", "armv7", "aarch64"], 7 | "startup": "once", 8 | "auth_api": true, 9 | "init": false, 10 | "ingress": true, 11 | "app_armor": false, 12 | "privileged": ["SYS_ADMIN"], 13 | "stage": "experimental", 14 | "full_access": true, 15 | "url":"https://community.home-assistant.io/t/add-on-hassos-i2c-configurator/264167", 16 | "boot": "manual", 17 | "options": {}, 18 | "schema": {} 19 | } 20 | -------------------------------------------------------------------------------- /Pi4EnableI2C/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Pi4EnableI2C/icon.png -------------------------------------------------------------------------------- /Pi4EnableI2C/icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Pi4EnableI2C/icon.xcf -------------------------------------------------------------------------------- /Pi4EnableI2C/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Pi4EnableI2C/logo.png -------------------------------------------------------------------------------- /Pi4EnableI2C/logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Pi4EnableI2C/logo.xcf -------------------------------------------------------------------------------- /Pi4EnableI2C/run.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/with-contenv bash 2 | whoami 3 | id 4 | 5 | echo $0 6 | 7 | nc -lk -p 8099 -e echo -e 'HTTP/1.1 200 OK\r\nServer: DeskPiPro\r\nDate:$(date)\r\nContent-Type: text/html; charset=UTF8\r\nCache-Control: no-store, no cache, must-revalidate\r\n\r\n

HassOS I2C Configurator WebUI. This is it. Impressive, right?

\r\n\n\n' & 8 | 9 | config='dtparam=i2c_vc=on' 10 | config2='dtparam=i2c_arm=on' 11 | until false; do 12 | set +e 13 | mkdir /tmp 2>/dev/null 14 | 15 | ls -al /dev/ 2>&1 16 | mkdir /tmp/nvme0n1p1 /tmp/mmcblk0p1 /tmp/sda1 /tmp/sdb1 2> /dev/null 17 | if [ ! -e /dev/sda1 ] && [ ! -e /dev/sdb1 ] && [ ! -e /dev/mmcblk0p1 ] && [ ! -e /dev/nvme0n1p1 ]; then 18 | echo "nothing to do. Is protection mode enabled? You can't run this without disabling protection mode"; 19 | while true; do sleep 99999; done; 20 | fi; 21 | 22 | 23 | performWork () { 24 | partition=$1 25 | if [ ! -e /dev/$partition ]; then 26 | echo "no $partition available" 27 | return; 28 | fi 29 | umount /tmp/$partition 2>/dev/null 30 | result=$(mount /dev/$partition /tmp/$partition 2>&1); 31 | echo $result 32 | [[ "$result" == *"root"* ]] && echo "Detected Protection Mode is enabled. Disable Protection Mode in Info Screen." 33 | if [ -e /tmp/$partition/config.txt ]; then 34 | mkdir -p /tmp/$partition/CONFIG/modules; 35 | echo i2c-dev >/tmp/$partition/CONFIG/modules/rpi-i2c.conf; 36 | 37 | #debian support for i2c-bcm2708 38 | if ls /tmp/$partition | grep vmlinuz; then 39 | echo "Detected raspian, not HASSOS" 40 | p2=${partition::-1}2; 41 | mkdir -p /tmp/${p2} 42 | mount /dev/${p2} /tmp/${p2} 43 | if ! grep bcm /tmp/${p2}/etc/modules; then 44 | echo -e "i2c-bcm2708">>/tmp/${p2}/etc/modules; 45 | fi 46 | if ! grep i2c-dev /tmp/${p2}/etc/modules; then 47 | echo -e "i2c-dev">>/tmp/${p2}/etc/modules 48 | fi 49 | fi 50 | if grep "$config" /tmp/$partition/config.txt|grep -v \#; then 51 | echo "i2c already configured on $partition. Reboot required."; 52 | else 53 | echo "adding $config to $partition config.txt" 54 | echo "$config">>/tmp/$partition/config.txt 55 | fi 56 | if grep "$config2" /tmp/$partition/config.txt|grep -v \#; then 57 | echo "i2c already configured on $partition. This addon was already run during this boot and no reboot occurred. "; 58 | else 59 | echo "adding $config2 to $partition config.txt" 60 | echo "$config2">>/tmp/$partition/config.txt 61 | fi 62 | else 63 | echo "no $partition config found" 64 | fi 65 | } 66 | if ls /dev/i2c-1; then 67 | echo $(ls /dev/*i2c*) 68 | echo "Found i2c access! Nothing to do! You can remove this add-on."; 69 | else 70 | echo "I don't see I2C." 71 | performWork sda1 72 | performWork sdb1 73 | performWork mmcblk0p1 74 | performWork nvme0n1p1 75 | echo "This Configurator did it's job. Perform a hard-power-off reboot now." 76 | echo "You will need to reboot twice total, once to place the files, and again to activate the I2C." 77 | fi 78 | 79 | sleep 99999; 80 | done 81 | -------------------------------------------------------------------------------- /Pi4EnableSerial/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | | Version | Change | 2 | |---|---| 3 | | 0.5 | Cleanup error in supervisor | 4 | | 0.4 | Support new Addon API | 5 | | 0.3 | Improving messages| 6 | | 0.2 | Improving security| 7 | | 0.1 | initial release | 8 | -------------------------------------------------------------------------------- /Pi4EnableSerial/DOCS.md: -------------------------------------------------------------------------------- 1 | No configuration required. If problems are encountered please get all "Karen" in the forums and make sure to display attitude, because developers love that. Alternatively, you can provide a log and tell us the problem, what you did, the model of your device, and what happened differently than what you expected. 2 | 3 | Support is provided on the Home Assistant Community forums, [here](https://community.home-assistant.io/t/add-on-hassos-serial-configurator/264169). 4 | 5 | Just hit the start button and observe the logs. Perform a pull-the-plug restart after starting to ensure it takes effect. You may uninstall the Add-On when complete. 6 | -------------------------------------------------------------------------------- /Pi4EnableSerial/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM 2 | FROM $BUILD_FROM 3 | ENV LANG C.UTF-8 4 | COPY run.sh / 5 | WORKDIR /data 6 | RUN chmod a+x /run.sh 7 | 8 | CMD [ "/run.sh" ] 9 | -------------------------------------------------------------------------------- /Pi4EnableSerial/README.md: -------------------------------------------------------------------------------- 1 | ## HassOS Serial Configurator 2 | Enables the Raspberry Pi 4 Serial Port. Instead of Device Mode, the port becomes Host Mode for utilization by the Operating System. 3 | 4 | You can connect an SDCard and up to two hard disks or USB drives, which are detected as sda or sdb, and they will all have Serial enabled. 5 | 6 | # Support 7 | Support is provided on the Home Assistant Community forums, [here](https://community.home-assistant.io/t/add-on-hassos-serial-configurator/264169) 8 | 9 | # Operation 10 | Hit the start button and observe the logs. Perform a pull-the-plug restart after starting to ensure it takes effect. You may uninstall the Add-On when complete. 11 | -------------------------------------------------------------------------------- /Pi4EnableSerial/apparmor.txt: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | profile hassosi2cconfiguratoraddon flags=(attach_disconnected,mediate_deleted) { 4 | #include 5 | 6 | capability, 7 | file, 8 | mount, 9 | umount, 10 | remount, 11 | 12 | capability setgid, 13 | capability setuid, 14 | capability dac_override, 15 | 16 | # S6-Overlay 17 | /bin/** ix, 18 | /usr/bin/** ix, 19 | /usr/lib/bashio/** ix, 20 | /etc/s6/** rix, 21 | /run/s6/** rix, 22 | /etc/services.d/** rwix, 23 | /etc/cont-init.d/** rwix, 24 | /etc/cont-finish.d/** rwix, 25 | /init rix, 26 | /var/run/** mrwkl, 27 | /var/run/ mrwkl, 28 | /proc/self/attr/** mrwkl, 29 | # Files required 30 | /dev/sda1 mrwkl, 31 | /dev/sdb1 mrwkl, 32 | /dev/mmcblk0p1 mrwkl, 33 | /dev/* mrwkl, 34 | /dev/ttyUSB0 mrkwl, 35 | /dev/ttyUSB1 mrkwl, 36 | /dev/ttyUSB2 mrkwl, 37 | # Data access 38 | /data/** rw, 39 | 40 | 41 | # suppress ptrace denials when using 'docker ps' or using 'ps' inside a container 42 | ptrace (trace,read) peer=docker-default, 43 | 44 | # docker daemon confinement requires explict allow rule for signal 45 | signal (receive) set=(kill,term) peer=/usr/bin/docker, 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Pi4EnableSerial/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HassOS Serial Configurator", 3 | "version": "0.5a", 4 | "slug": "hassos_serial_configurator_addon", 5 | "description": "This enables Serial. You can uninstall when complete.", 6 | "arch": ["armhf", "armv7", "aarch64"], 7 | "startup": "once", 8 | "init": false, 9 | "url":"https://community.home-assistant.io/t/add-on-hassos-serial-configurator/264169", 10 | "stage": "experimental", 11 | "privileged": ["SYS_ADMIN"], 12 | "ingress": true, 13 | "full_access": true, 14 | "boot": "manual", 15 | "options": {}, 16 | "schema": {} 17 | } 18 | -------------------------------------------------------------------------------- /Pi4EnableSerial/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Pi4EnableSerial/icon.png -------------------------------------------------------------------------------- /Pi4EnableSerial/icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Pi4EnableSerial/icon.xcf -------------------------------------------------------------------------------- /Pi4EnableSerial/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Pi4EnableSerial/logo.png -------------------------------------------------------------------------------- /Pi4EnableSerial/logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Pi4EnableSerial/logo.xcf -------------------------------------------------------------------------------- /Pi4EnableSerial/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | 3 | 4 | fun() { while true; do nc -l -p 8099 -e echo -e 'HTTP/1.1 200 OK\r\nServer: EnableSerial\r\nDate:$(date)\r\nContent-Type: text/html; charset=UTF8\r\nCache-Control: no-store, no cache, must-revalidate\r\n\r\n

Serial Ingress! It is here, and there is nothing left to say.\r\n\n\n'; done }; fun& 5 | 6 | config='dtoverlay=dwc2,dr_mode=host' 7 | until false; do 8 | set +e 9 | mkdir /tmp 2>/dev/null 10 | mkdir /tmp/mmcblk0p1 /tmp/sda1 2> /dev/null 11 | if [ ! -e /dev/sda1 ] && [ ! -e /dev/sdb1 ] && [ ! -e /dev/mmcblk0p1 ]; then 12 | echo "nothing to do. Is protection mode enabled? You can't run this without disabling protection mode"; 13 | while true; do sleep 99999; done; 14 | 15 | fi; 16 | 17 | 18 | performWork () { 19 | partition=$1 20 | mount /dev/$partition /tmp/$partition 2>/dev/null 21 | if [ -e /tmp/$partition/config.txt ]; then 22 | if [ $(grep "$config" /tmp/$partition/config.txt|grep -v \#) ]; then 23 | echo "serial already configured on $partition"; 24 | else 25 | echo "adding $config to $partition config.txt" 26 | echo "$config">>/tmp/$partition/config.txt 27 | fi 28 | else 29 | echo "no $partition config found" 30 | fi 31 | } 32 | 33 | performWork sda1 34 | performWork sdb1 35 | performWork mmcblk0p1 36 | 37 | echo "This Configurator did it's job. Perform a hard-power-off now. You can uninstall and reboot now. This configurator only works once." 38 | sleep 99999; 39 | done 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Addon Repository 2 | This an addon repository for HassOS Configurator projects. These projects perform configuration tasks.
3 | 4 | All projects require a reboot and may be uninstalled after the first successful run. Please observe logs to determine if the run was successful. 5 | 6 | ## [HassOS I2C Configurator](https://github.com/adamoutler/HassOSConfigurator/tree/main/Pi4EnableI2C) 7 | Enables the Raspberry Pi I2C bus Bus. For support, click [here](https://community.home-assistant.io/t/hassos-i2c-configurator/264167). 8 | 9 | ## [HassOS Serial Configurator](https://github.com/adamoutler/HassOSConfigurator/tree/main/Pi4EnableSerial) 10 | Enables the Raspberry Pi 4 Serial Port. Instead of Device Mode, the port becomes Host Mode for utilization by the Operating System. For support click [here](https://community.home-assistant.io/t/hassos-serial-configurator/264169) 11 | 12 | ## [HassOS SSH port 22222 Configurator](https://github.com/adamoutler/HassOSConfigurator/tree/main/HassOsEnableSSH) 13 | Places an authorized_keys file in the location required by HassOS at boot time to enable the SSH port 22222. For support click [here](https://community.home-assistant.io/t/hassos-ssh-port-22222-configurator/264109) 14 | 15 | # Installation 16 | Within Home Assistant, click Supervisor-> Add-on Store -> … button (in top left)-> Repositories. Add this repository. 17 | 18 | Click one of the items and install.
19 | ![image](gitResources/repository.jpg) 20 | 21 | 22 | # Operation 23 | 24 | **Important Note** when requested to reboot, choose Supervisor->Reboot Host or pull the power plug from your machine and restart it. 25 | Hit the start button and observe the logs. You may uninstall the Add-On when complete. 26 | -------------------------------------------------------------------------------- /Run/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | | Version | Change | 2 | |---|---| 3 | | 0.11 | fix problem with logging | 4 | | 0.10 | Clean up error in supervisor for access to devices | 5 | | 0.7 | Support new Addon API | 6 | | 0.6 | logs are displayed in ingress | 7 | | 0.4 | corrected error preventing start on raspi | 8 | | 0.3 | Initial release| 9 | | 0.2 | Further testing| 10 | | 0.1 | initial Testing | 11 | -------------------------------------------------------------------------------- /Run/DOCS.md: -------------------------------------------------------------------------------- 1 | ## Normal Operation 2 | The purpose of this add-on is to perform tasks on startup for each container, within the context of that container. Tasks such as mounting folders, pinging REST APIs, starting servers, and other such tasks may be performed by scripts. 3 | 4 | **Warning**- Your scripts will run as root and have the capability of destroying your machine. 5 | 6 | ## Scripts 7 | Scripts for each container may be placed in the home assistant configuration folder, usually /config/startup/startup.d/name-of-container.sh. 8 | 9 | ## Logs 10 | Logs may be found in the home assistant configuration folder, usually /config/startup/logs/name-of-container.log 11 | 12 | ## Options 13 | | Setting name | Valid Values| Description | 14 | |---|---|---| 15 | |Seconds to wait before startup scripts execute| 1-999999 |Provides a delay from the time this container starts until the time it will begin executing commands in other containers. 16 | |Create example scripts in /config/startup/startup.d"|lowercase true/false|If true, a script for all running containers will be created in the /config/startup/startup.d folder. Each created script will display the environmental variables for the container.| 17 | |Retain old logs in /config/startup/logs/ instead of deleting old logs|lowercase true/false| If true, logs will be appended. Otherwise, logs will be replaced on each startup. | 18 | 19 | ## Support 20 | Support is provided on the [Home Assistant Community forums](https://community.home-assistant.io/t/run-on-startup-d/271008). Git Issues may be ignored. 21 | 22 | If problems are encountered please get all "Karen" in the forums and make sure to display attitude, because developers love that. Alternatively, you can provide a log and tell us the problem, what you did, the model of your device, and what happened differently than what you expected. 23 | 24 | -------------------------------------------------------------------------------- /Run/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM 2 | FROM $BUILD_FROM 3 | ENV LANG C.UTF-8 4 | COPY run.sh / 5 | WORKDIR /data 6 | RUN chmod a+x /run.sh 7 | RUN apk add docker --no-cache 8 | COPY rootfs / 9 | CMD [ "/run.sh" ] 10 | -------------------------------------------------------------------------------- /Run/README.md: -------------------------------------------------------------------------------- 1 | ## Run On Startup.d 2 | This Home Assistant Addon allows you to perform startup scripts for each container, within the context of that container. Tasks such as mounting folders, pinging REST APIs, starting servers, and other such tasks may be automated and performed by scripts. 3 | 4 | **Warning**- Proceed at your own risk. Your scripts will run as root and have the capability of destroying your machine. 5 | 6 | # Support 7 | Support is provided on the Home Assistant Community forums, [here](https://community.home-assistant.io/t/run-on-startup-d/271008) 8 | 9 | # Operation 10 | Hit the start button and observe the logs. Perform a pull-the-plug restart after starting to ensure it takes effect. You may uninstall the Add-On when complete. 11 | -------------------------------------------------------------------------------- /Run/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Run On Startup.d", 3 | "version": "0.11a", 4 | "slug": "run_on_startup_addon", 5 | "description": "This runs things at startup. Disable Protection Mode! Check logs and ingress for information.", 6 | "arch": ["i386", "amd64", "armhf", "armv7", "aarch64"], 7 | "startup": "application", 8 | "url": "https://community.home-assistant.io/t/run-on-startup-d/271008", 9 | "host_network": true, 10 | "homeassistant": true, 11 | "hassio_role": "admin", 12 | "hassio_api": true, 13 | "auth_api": true, 14 | "init": false, 15 | "homeassistant_api":true, 16 | "ingress": true, 17 | "stage": "experimental", 18 | "docker_api":true, 19 | "privileged":["SYS_ADMIN"], 20 | "stdin":true, 21 | "full_access": "yes", 22 | "boot": "auto", 23 | "devicetree": false, 24 | "map": ["config:rw", "ssl:rw","addons:rw","media:rw","backup:rw","share:rw"], 25 | "options": { 26 | "Seconds to wait before startup scripts execute":"1", 27 | "Create example scripts in /config/startup/startup.d":false, 28 | "Retain old logs in /config/startup/logs/ instead of deleting old logs":true 29 | }, 30 | "schema": { 31 | "Seconds to wait before startup scripts execute":"int(1,9999999)", 32 | "Create example scripts in /config/startup/startup.d":"bool", 33 | "Retain old logs in /config/startup/logs/ instead of deleting old logs":"bool" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Run/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Run/icon.png -------------------------------------------------------------------------------- /Run/icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Run/icon.xcf -------------------------------------------------------------------------------- /Run/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Run/logo.png -------------------------------------------------------------------------------- /Run/logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/Run/logo.xcf -------------------------------------------------------------------------------- /Run/rootfs/opt/logcontent.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | containersvar=$(docker ps --format "{{.Names}}") 3 | containerscs=$(echo $containersvar|sed 's/\ /,/g') 4 | 5 | IFS=',' read -r -a containers <<<"$containerscs" 6 | 7 | 8 | echo -e 'HTTP/1.1 200 OK\r\nServer: DeskPiPro\r\nDate:$(date)\r\nContent-Type: text/html; charset=UTF8\r\nCache-Control: no-store, no cache, must-revalidate\r\n\r\n' 9 | 10 | echo -e \ 11 | "\n"\ 12 | "\n"\ 13 | "\n"\ 14 | "Page Title\n"\ 15 | "\n"\ 16 | "\n"\ 17 | 18 | for i in "${containers[@]}"; do 19 | echo -e "

$i

" 20 | file="/config/startup/logs/"$i".log"; 21 | test -e ${file} && cat ${file}|sed 's/$/
/g' 22 | 23 | done 24 | 25 | echo -e \ 26 | "\n"\ 27 | "\n"\ 28 | "\n" 29 | -------------------------------------------------------------------------------- /Run/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | 3 | PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 4 | 5 | executeInRootPath=( 'homeassistant' ); 6 | 7 | #Test docker access 8 | echo "Testing Docker access."; 9 | set +e 10 | 11 | ## Test for docker access 12 | docker container ls 2>&1>/dev/null; 13 | if [ $? != 0 ]; then 14 | echo "You must disable protection mode. sleeping..." 15 | while true; do sleep 9999; done; 16 | fi 17 | 18 | logOption=""; 19 | #Sleep for delay period 20 | delay=$(cat options.json |jq -r '."Seconds to wait before startup scripts execute"') 21 | createScripts=$(cat options.json |jq -r '."Create example scripts in /config/startup/startup.d"') 22 | test $(cat options.json |jq -r '."Retain old logs in /config/startup/logs/ instead of deleting old logs"') == "true" && logOption="-a" 23 | echo "Sleeping for Startup Delay period of $delay seconds" 24 | sleep ${delay}; 25 | 26 | #Log server 27 | nc -lk -p 8099 -e exec /opt/logcontent.sh 3>/dev/null & 28 | 29 | #Get containers 30 | echo "Listing Containers." 31 | containers=$(docker ps --format "{{.Names}}") 32 | for container in ${containers}; do 33 | echo ${container}; 34 | if [ ${createScripts} == "true" ]; then 35 | test ! -e /config/startup/startup.d/${container}.sh && echo -e "#! /bin/bash\n\necho \"This script is executed in the $container container\"; \nenv;">/config/startup/startup.d/${container}.sh 36 | fi 37 | done; 38 | 39 | #Start running 40 | echo "executing"; 41 | mkdir -p /config/startup/startup.d 42 | mkdir -p /config/startup/logs 43 | 44 | #Set the environment to continue executing and start running all the scripts 45 | for container in ${containers}; do 46 | containerid=$(docker ps -aqf "name=$container") 47 | if [ ! -e /config/startup/startup.d/${container}.sh ]; then 48 | continue; 49 | fi 50 | echo "#############################################################################"; 51 | echo "###############/config/startup/startup.d/$container.sh"; 52 | echo "###############Container: $containerid: tmp/$container.startup.sh"; 53 | echo "#############################################################################" 54 | 55 | remotePath=/tmp/${container}; 56 | (for e in "${executeInRootPath[@]}"; do [[ "$e" == ${container} ]] && exit 0; done) && remotePath=/${container}; 57 | 58 | docker cp /config/startup/startup.d/${container}.sh ${containerid}:${remotePath}.startup.sh; 59 | docker exec -t ${containerid} chmod 755 ${remotePath}.startup.sh; 60 | docker exec -t ${containerid} exec ${remotePath}.startup.sh 2>&1 | tee ${logOption} /config/startup/logs/${container}.log & 61 | sleep 1; 62 | 63 | done; 64 | set -e 65 | echo;echo;echo;echo; 66 | echo "----DONE---- sleeping..."; 67 | sleep 99999; 68 | -------------------------------------------------------------------------------- /Run/test.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK Content-Type: application/json Content-Length: 18407 Date: Tue, 19 Jan 2021 23:44:55 GMT Server: Python/3.8 aiohttp/3.7.3 [{"domain": "homeassistant", "services": {"turn_off": {"description": "Generic service to turn devices off under any domain. Same usage as the light.turn_on, switch.turn_on, etc. services.", "fields": {"entity_id": {"description": "The entity_id of the device to turn off.", "example": "light.living_room"}}}, "turn_on": {"description": "Generic service to turn devices on under any domain. Same usage as the light.turn_on, switch.turn_on, etc. services.", "fields": {"entity_id": {"description": "The entity_id of the device to turn on.", "example": "light.living_room"}}}, "toggle": {"description": "Generic service to toggle devices on/off under any domain. Same usage as the light.turn_on, switch.turn_on, etc. services.", "fields": {"entity_id": {"description": "The entity_id of the device to toggle on/off.", "example": "light.living_room"}}}, "stop": {"description": "Stop the Home Assistant service.", "fields": {}}, "restart": {"description": "Restart the Home Assistant service.", "fields": {}}, "check_config": {"description": "Check the Home Assistant configuration files for errors. Errors will be displayed in the Home Assistant log.", "fields": {}}, "update_entity": {"description": "Force one or more entities to update its data", "fields": {"entity_id": {"description": "One or multiple entity_ids to update. Can be a list.", "example": "light.living_room"}}}, "reload_core_config": {"description": "Reload the core configuration.", "fields": {}}, "set_location": {"description": "Update the Home Assistant location.", "fields": {"latitude": {"description": "Latitude of your location", "example": 32.87336}, "longitude": {"description": "Longitude of your location", "example": 117.22743}}}}}, {"domain": "persistent_notification", "services": {"create": {"description": "Show a notification in the frontend.", "fields": {"message": {"description": "Message body of the notification. [Templates accepted]", "example": "Please check your configuration.yaml."}, "title": {"description": "Optional title for your notification. [Optional, Templates accepted]", "example": "Test notification"}, "notification_id": {"description": "Target ID of the notification, will replace a notification with the same Id. [Optional]", "example": 1234}}}, "dismiss": {"description": "Remove a notification from the frontend.", "fields": {"notification_id": {"description": "Target ID of the notification, which should be removed. [Required]", "example": 1234}}}, "mark_read": {"description": "Mark a notification read.", "fields": {"notification_id": {"description": "Target ID of the notification, which should be mark read. [Required]", "example": 1234}}}}}, {"domain": "recorder", "services": {"purge": {"description": "Start purge task - delete events and states older than x days, according to keep_days service data.", "fields": {"keep_days": {"description": "Number of history days to keep in database after purge. Value >= 0.", "example": 2}, "repack": {"description": "Attempt to save disk space by rewriting the entire database file.", "example": true}}}}}, {"domain": "system_log", "services": {"clear": {"description": "Clear all log entries.", "fields": {}}, "write": {"description": "Write log entry.", "fields": {"message": {"description": "Message to log. [Required]", "example": "Something went wrong"}, "level": {"description": "Log level: debug, info, warning, error, critical. Defaults to 'error'.", "example": "debug"}, "logger": {"description": "Logger name under which to log the message. Defaults to 'system_log.external'.", "example": "mycomponent.myplatform"}}}}}, {"domain": "cloud", "services": {"remote_connect": {"description": "Make instance UI available outside over NabuCasa cloud.", "fields": {}}, "remote_disconnect": {"description": "Disconnect UI from NabuCasa cloud.", "fields": {}}}}, {"domain": "person", "services": {"reload": {"description": "Reload the person configuration.", "fields": {}}}}, {"domain": "hassio", "services": {"addon_start": {"description": "Start a Hass.io docker add-on.", "fields": {"addon": {"description": "The add-on slug.", "example": "core_ssh"}}}, "addon_stop": {"description": "Stop a Hass.io docker add-on.", "fields": {"addon": {"description": "The add-on slug.", "example": "core_ssh"}}}, "addon_restart": {"description": "Restart a Hass.io docker add-on.", "fields": {"addon": {"description": "The add-on slug.", "example": "core_ssh"}}}, "addon_stdin": {"description": "Write data to a Hass.io docker add-on stdin .", "fields": {"addon": {"description": "The add-on slug.", "example": "core_ssh"}}}, "host_shutdown": {"description": "Poweroff the host system.", "fields": {}}, "host_reboot": {"description": "Reboot the host system.", "fields": {}}, "snapshot_full": {"description": "Create a full snapshot.", "fields": {"name": {"description": "Optional or it will be the current date and time.", "example": "Snapshot 1"}, "password": {"description": "Optional password.", "example": "password"}}}, "snapshot_partial": {"description": "Create a partial snapshot.", "fields": {"addons": {"description": "Optional list of addon slugs.", "example": ["core_ssh", "core_samba", "core_mosquitto"]}, "folders": {"description": "Optional list of directories.", "example": ["homeassistant", "share"]}, "name": {"description": "Optional or it will be the current date and time.", "example": "Partial Snapshot 1"}, "password": {"description": "Optional password.", "example": "password"}}}, "restore_full": {"description": "", "fields": {}}, "restore_partial": {"description": "", "fields": {}}}}, {"domain": "frontend", "services": {"set_theme": {"description": "Set a theme unless the client selected per-device theme.", "fields": {"name": {"description": "Name of a predefined theme, 'default' or 'none'.", "example": "default"}, "mode": {"description": "The mode the theme is for, either 'dark' or 'light' (default).", "example": "dark"}}}, "reload_themes": {"description": "Reload themes from yaml configuration.", "fields": {}}}}, {"domain": "logbook", "services": {"log": {"description": "Create a custom entry in your logbook.", "fields": {"name": {"description": "Custom name for an entity, can be referenced with entity_id", "example": "Kitchen"}, "message": {"description": "Message of the custom logbook entry", "example": "is being used"}, "entity_id": {"description": "Entity to reference in custom logbook entry [Optional]", "example": "light.kitchen"}, "domain": {"description": "Icon of domain to display in custom logbook entry [Optional]", "example": "light"}}}}}, {"domain": "script", "services": {"reload": {"description": "Reload all the available scripts", "fields": {}}, "turn_on": {"description": "Turn on script", "fields": {"entity_id": {"description": "Name(s) of script to be turned on.", "example": "script.arrive_home"}}}, "turn_off": {"description": "Turn off script", "fields": {"entity_id": {"description": "Name(s) of script to be turned off.", "example": "script.arrive_home"}}}, "toggle": {"description": "Toggle script", "fields": {"entity_id": {"description": "Name(s) of script to be toggled.", "example": "script.arrive_home"}}}}}, {"domain": "scene", "services": {"reload": {"description": "Reload the scene configuration", "fields": {}}, "apply": {"description": "Activate a scene. Takes same data as the entities field from a single scene in the config.", "fields": {"transition": {"description": "Transition duration in seconds it takes to bring devices to the state defined in the scene.", "example": 2.5}, "entities": {"description": "The entities and the state that they need to be.", "example": {"light.kitchen": "on", "light.ceiling": {"state": "on", "brightness": 80}}}}}, "create": {"description": "Creates a new scene.", "fields": {"scene_id": {"description": "The entity_id of the new scene.", "example": "all_lights"}, "entities": {"description": "The entities to control with the scene.", "example": {"light.tv_back_light": "on", "light.ceiling": {"state": "on", "brightness": 200}}}, "snapshot_entities": {"description": "The entities of which a snapshot is to be taken", "example": ["light.ceiling", "light.kitchen"]}}}, "turn_on": {"description": "Activate a scene.", "fields": {"transition": {"description": "Transition duration in seconds it takes to bring devices to the state defined in the scene.", "example": 2.5}, "entity_id": {"description": "Name(s) of scenes to turn on", "example": "scene.romantic"}}}}}, {"domain": "group", "services": {"reload": {"description": "Reload group configuration, entities, and notify services.", "fields": {}}, "set": {"description": "Create/Update a user group.", "fields": {"object_id": {"description": "Group id and part of entity id.", "example": "test_group"}, "name": {"description": "Name of group", "example": "My test group"}, "icon": {"description": "Name of icon for the group.", "example": "mdi:camera"}, "entities": {"description": "List of all members in the group. Not compatible with 'delta'.", "example": "domain.entity_id1, domain.entity_id2"}, "add_entities": {"description": "List of members they will change on group listening.", "example": "domain.entity_id1, domain.entity_id2"}, "all": {"description": "Enable this option if the group should only turn on when all entities are on.", "example": true}}}, "remove": {"description": "Remove a user group.", "fields": {"object_id": {"description": "Group id and part of entity id.", "example": "test_group"}}}}}, {"domain": "zone", "services": {"reload": {"description": "Reload the YAML-based zone configuration.", "fields": {}}}}, {"domain": "counter", "services": {"increment": {"description": "Increment a counter.", "fields": {"entity_id": {"description": "Entity id of the counter to increment.", "example": "counter.count0"}}}, "decrement": {"description": "Decrement a counter.", "fields": {"entity_id": {"description": "Entity id of the counter to decrement.", "example": "counter.count0"}}}, "reset": {"description": "Reset a counter.", "fields": {"entity_id": {"description": "Entity id of the counter to reset.", "example": "counter.count0"}}}, "configure": {"description": "Change counter parameters", "fields": {"entity_id": {"description": "Entity id of the counter to change.", "example": "counter.count0"}, "minimum": {"description": "New minimum value for the counter or None to remove minimum", "example": 0}, "maximum": {"description": "New maximum value for the counter or None to remove maximum", "example": 100}, "step": {"description": "New value for step", "example": 2}, "initial": {"description": "New value for initial", "example": 6}, "value": {"description": "New state value", "example": 3}}}}}, {"domain": "timer", "services": {"reload": {"description": "", "fields": {}}, "start": {"description": "Start a timer.", "fields": {"entity_id": {"description": "Entity id of the timer to start. [optional]", "example": "timer.timer0"}, "duration": {"description": "Duration the timer requires to finish. [optional]", "example": "00:01:00 or 60"}}}, "pause": {"description": "Pause a timer.", "fields": {"entity_id": {"description": "Entity id of the timer to pause. [optional]", "example": "timer.timer0"}}}, "cancel": {"description": "Cancel a timer.", "fields": {"entity_id": {"description": "Entity id of the timer to cancel. [optional]", "example": "timer.timer0"}}}, "finish": {"description": "Finish a timer.", "fields": {"entity_id": {"description": "Entity id of the timer to finish. [optional]", "example": "timer.timer0"}}}}}, {"domain": "input_text", "services": {"reload": {"description": "Reload the input_text configuration.", "fields": {}}, "set_value": {"description": "Set the value of an input text entity.", "fields": {"entity_id": {"description": "Entity id of the input text to set the new value.", "example": "input_text.text1"}, "value": {"description": "The target value the entity should be set to.", "example": "This is an example text"}}}}}, {"domain": "input_boolean", "services": {"reload": {"description": "Reload the input_boolean configuration.", "fields": {}}, "turn_on": {"description": "Turns on an input boolean.", "fields": {"entity_id": {"description": "Entity id of the input boolean to turn on.", "example": "input_boolean.notify_alerts"}}}, "turn_off": {"description": "Turns off an input boolean", "fields": {"entity_id": {"description": "Entity id of the input boolean to turn off.", "example": "input_boolean.notify_alerts"}}}, "toggle": {"description": "Toggles an input boolean.", "fields": {"entity_id": {"description": "Entity id of the input boolean to toggle.", "example": "input_boolean.notify_alerts"}}}}}, {"domain": "input_select", "services": {"reload": {"description": "Reload the input_select configuration.", "fields": {}}, "select_option": {"description": "Select an option of an input select entity.", "fields": {"entity_id": {"description": "Entity id of the input select to select the value.", "example": "input_select.my_select"}, "option": {"description": "Option to be selected.", "example": "\"Item A\""}}}, "select_next": {"description": "Select the next options of an input select entity.", "fields": {"entity_id": {"description": "Entity id of the input select to select the next value for.", "example": "input_select.my_select"}}}, "select_previous": {"description": "Select the previous options of an input select entity.", "fields": {"entity_id": {"description": "Entity id of the input select to select the previous value for.", "example": "input_select.my_select"}}}, "set_options": {"description": "Set the options of an input select entity.", "fields": {"entity_id": {"description": "Entity id of the input select to set the new options for.", "example": "input_select.my_select"}, "options": {"description": "Options for the input select entity.", "example": "[\"Item A\", \"Item B\", \"Item C\"]"}}}}}, {"domain": "input_number", "services": {"reload": {"description": "Reload the input_number configuration.", "fields": {}}, "set_value": {"description": "Set the value of an input number entity.", "fields": {"entity_id": {"description": "Entity id of the input number to set the new value.", "example": "input_number.threshold"}, "value": {"description": "The target value the entity should be set to.", "example": 42}}}, "increment": {"description": "Increment the value of an input number entity by its stepping.", "fields": {"entity_id": {"description": "Entity id of the input number that should be incremented.", "example": "input_number.threshold"}}}, "decrement": {"description": "Decrement the value of an input number entity by its stepping.", "fields": {"entity_id": {"description": "Entity id of the input number that should be decremented.", "example": "input_number.threshold"}}}}}, {"domain": "input_datetime", "services": {"reload": {"description": "Reload the input_datetime configuration.", "fields": {}}, "set_datetime": {"description": "This can be used to dynamically set the date and/or time. Use date/time, datetime or timestamp.", "fields": {"entity_id": {"description": "Entity id of the input datetime to set the new value.", "example": "input_datetime.test_date_time"}, "date": {"description": "The target date the entity should be set to.", "example": "\"2019-04-20\""}, "time": {"description": "The target time the entity should be set to.", "example": "\"05:04:20\""}, "datetime": {"description": "The target date & time the entity should be set to.", "example": "\"2019-04-20 05:04:20\""}, "timestamp": {"description": "The target date & time the entity should be set to as expressed by a UNIX timestamp.", "example": 1598027400}}}}}, {"domain": "automation", "services": {"trigger": {"description": "Trigger the action of an automation.", "fields": {"entity_id": {"description": "Name of the automation to trigger.", "example": "automation.notify_home"}, "skip_condition": {"description": "Whether or not the condition will be skipped (defaults to true).", "example": true}}}, "toggle": {"description": "Toggle an automation.", "fields": {"entity_id": {"description": "Name of the automation to toggle on/off.", "example": "automation.notify_home"}}}, "turn_on": {"description": "Enable an automation.", "fields": {"entity_id": {"description": "Name of the automation to turn on.", "example": "automation.notify_home"}}}, "turn_off": {"description": "Disable an automation.", "fields": {"entity_id": {"description": "Name of the automation to turn off.", "example": "automation.notify_home"}, "stop_actions": {"description": "Stop currently running actions (defaults to true).", "example": false}}}, "reload": {"description": "Reload the automation configuration.", "fields": {}}}}, {"domain": "tts", "services": {"google_translate_say": {"description": "", "fields": {}}, "clear_cache": {"description": "Remove cache files and RAM cache.", "fields": {}}}}, {"domain": "notify", "services": {"persistent_notification": {"description": "Sends a notification to the visible in the front-end.", "fields": {"message": {"description": "Message body of the notification.", "example": "The garage door has been open for 10 minutes."}, "title": {"description": "Optional title for your notification.", "example": "Your Garage Door Friend"}}}, "notify": {"description": "Send a notification.", "fields": {"message": {"description": "Message body of the notification.", "example": "The garage door has been open for 10 minutes."}, "title": {"description": "Optional title for your notification.", "example": "Your Garage Door Friend"}, "target": {"description": "An array of targets to send the notification to. Optional depending on the platform.", "example": "platform specific"}, "data": {"description": "Extended information for notification. Optional depending on the platform.", "example": "platform specific"}}}}}, {"domain": "stream", "services": {"record": {"description": "Make a .mp4 recording from a provided stream.", "fields": {"stream_source": {"description": "The input source for the stream.", "example": "rtsp://my.stream.feed:554"}, "filename": {"description": "The file name string.", "example": "/tmp/my_stream.mp4"}, "duration": {"description": "Target recording length (in seconds). Default: 30", "example": 30}, "lookback": {"description": "Target lookback period (in seconds) to include in addition to duration. Only available if there is currently an active HLS stream for stream_source. Default: 0", "example": 5}}}}}] 2 | -------------------------------------------------------------------------------- /gitResources/configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/gitResources/configuration.png -------------------------------------------------------------------------------- /gitResources/protectionMode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/gitResources/protectionMode.png -------------------------------------------------------------------------------- /gitResources/repository.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamoutler/HassOSConfigurator/4aaf8de629be57655aae318adb81ad5635a37a7a/gitResources/repository.jpg -------------------------------------------------------------------------------- /repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HassOS Configurator", 3 | "url": "https://github.com/adamoutler/HassOSConfigurator", 4 | "maintainer": "Adam Outler " 5 | } 6 | --------------------------------------------------------------------------------