Skip to content

Instantly share code, notes, and snippets.

View gist:45d79c557fc8c2ba4118e1465157f600
- id: auto_light_desk_on
alias: auto_light_desk_on
trigger:
action:
- service: light.turn_on
entity_id: group.light
data_template:
brightness_pct: >
{% set v = ( states("sensor.0x04cf8cdf3c7727a6_illuminance_lux") | float * -0.18 + 100) | int %}
{{ v if v > 0 else 0 }}
View configuration.yaml
default_config:
homeassistant:
packages: !include_dir_named packages/
View configuration.yaml
default_config:
timer:
my_timer:
five_sec_after_button_press:
one_min_after_button_press:
input_text:
View gist:2077a873a3a65e3db7ef175136d5bff6
bessarabov@u:~/vacuum$ ./builder_vacuum.sh --run-custom-script=ALL \
> --timezone=Europe/Moscow \
> --ntpserver=pool.ntp.org \
> --public-key=/home/bessarabov/.ssh/id_rsa.pub \
> --enable-greeting \
> --disable-logs \
> --replace-adbd \
> --valetudo-path=~/Valetudo \
> --replace-miio \
> --enable-dns-catcher \
View gist:26d2ee3125e49379acd95fe99c64e8fa
(venv) bessarabov@u:~$ mirobo --ip=192.168.31.121 --token=397343367077514f49516230634e556e status
Error: Got checksum error which indicates use of an invalid token. Please check your token!
(venv) bessarabov@u:~$ mirobo --ip=192.168.31.5 --token=397343367077514f49516230634e556e status
ERROR:miio.miioprotocol:Got error when receiving: timed out
Error: No response from the device
(venv) bessarabov@u:~$ mirobo --ip=192.168.31.5 --token=397343367077514f49516230634e556e info
ERROR:miio.miioprotocol:Got error when receiving: timed out
Error: No response from the device
(venv) bessarabov@u:~$
View gist:00910240d7869b0e9717210d75735005
(venv) bessarabov@u:~$ mirobo --ip=192.168.8.1 --token=397343367077514f49516230634e556e update-firmware --ip 192.168.8.31 ./vacuum/output/vacuum_4004_valetudo_0_5_1.pkg
Going to update from ./vacuum/output/vacuum_4004_valetudo_0_5_1.pkg
INFO:miio.updater:Serving on 0.0.0.0:45583, timeout 10
INFO:miio.updater:Using local ./vacuum/output/vacuum_4004_valetudo_0_5_1.pkg (md5: bcc8f55ff6dbf8536d3e31c96498a5b8)
Hosting file at http://192.168.8.31:45583/vacuum_4004_valetudo_0_5_1.pkg
ERROR:miio.updater:No request was made..
ERROR:miio.protocol:unable to parse json '': Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/home/bessarabov/flasher/venv/lib/python3.8/site-packages/miio/miioprotocol.py", line 177, in send
data, addr = s.recvfrom(1024)
View gist:e8a0317b8c50846bd112a9e9ad1b7ed2
(venv) bessarabov@u:~$ mirobo --ip 192.168.8.1 --token 5352... update-firmware --ip 192.168.8.31 ./vacuum/output/vacuum_4004_valetudo_0_5_1.pkg
Going to update from ./vacuum/output/vacuum_4004_valetudo_0_5_1.pkg
INFO:miio.updater:Serving on 0.0.0.0:38663, timeout 10
INFO:miio.updater:Using local ./vacuum/output/vacuum_4004_valetudo_0_5_1.pkg (md5: bcc8f55ff6dbf8536d3e31c96498a5b8)
Hosting file at http://192.168.8.31:38663/vacuum_4004_valetudo_0_5_1.pkg
ERROR:miio.updater:No request was made..
ERROR:miio.protocol:unable to parse json '': Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/home/bessarabov/flasher/venv/lib/python3.8/site-packages/miio/miioprotocol.py", line 177, in send
data, addr = s.recvfrom(1024)
View gist:87692206ac38ac27a54456d5102dc279
установить docker-compose
дока со страницы https://docs.docker.com/compose/install/
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/usr/local/bin/docker-compose: line 1: Not: command not found
root@raspberrypi:~# vi /usr/local/bin/docker-compose
View toilet.yaml
timer:
toilet:
automation:
- alias: Turn on light in the toilet by aqara sensor motion
trigger:
platform: mqtt
topic: zigbee2mqtt/0x00158d000349236a
condition:
View a.md

это описание наших клиентов для сервера. указываем имя, ip из той же подсети, важно использовать маску /32 так как многие жаловались что, например /24 маска не работает. allowed_ips: [] client_allowed_ips: []


это описание наших клиентов для сервера. указываем имя, ip из той же подсети, важно использовать маску /32 так как многие жаловались что, например /24 маска не работает. allowed_ips: [] client_allowed_ips: []

You can’t perform that action at this time.