Skip to content

Instantly share code, notes, and snippets.

@Aculeasis
Aculeasis / .sh
Created July 2, 2023 17:29
Flash SONOFF Zigbee 3.0 USB Dongle plus
git clone https://github.com/JelmerT/cc2538-bsl
cd cc2538-bsl
# Get FW from https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0/bin
sudo python3 -m pip install pyserial intelhex
sudo python3 cc2538-bsl.py -p /dev/ttyUSB0 -evw --bootloader-sonoff-usb CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
homeassistant:
customize: !include customize.yaml
packages: !include_dir_named packages
whitelist_external_dirs:
- /config/smartctl
sensor:
- platform: command_line
name: smartctl_ssda_json
unique_id: 'smartctl_ssda_json_r0u8kk7kelwce9'
alias: Smartctl Warning
description: ""
trigger:
- platform: state
entity_id:
- sensor.hdd_ssdd
- sensor.hdd_ssda
- sensor.hdd_ssdc
- sensor.hdd_ssdb
attribute: Reallocated_Sector_Ct
alias: Smartctl JSONParser
description: ""
trigger:
- platform: state
entity_id: sensor.smartctl_ssda_json
enabled: true
- platform: state
entity_id: sensor.smartctl_ssdb_json
enabled: true
- platform: state
@Aculeasis
Aculeasis / main.py
Created May 31, 2020 13:48
test-catch-any-mqtt
from owner import Owner
from utils import TextBox
import logger
import paho.mqtt.client as mqtt
NAME = 'test-catch-any'
API = 999
TERMINAL_VER_MIN = (0, 15, 10)
# Отключить все http
@Aculeasis
Aculeasis / main.py
Created May 31, 2020 13:30
test-catch-any
from owner import Owner
from utils import TextBox
import logger
NAME = 'test-catch-any'
API = 999
TERMINAL_VER_MIN = (0, 15, 10)
# Отключить все http
# {
index edbeb6e..11e7616 100644
--- a/src/lib/snowboy_training.py
+++ b/src/lib/snowboy_training.py
@@ -45,7 +45,7 @@ class Training:
def _request(self):
try:
- response = requests.post(self.URL, json=self.__params, proxies=proxies('snowboy_training'))
+ response = requests.post(self.URL, json=self.__params, proxies=proxies('snowboy_training'), verify=False)
except REQUEST_ERRORS as e:
# For orange pi PC, legacy kernel && old packages, deb won't build ;(
sudo apt-get install --no-install-recommends git gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev automake
git clone https://github.com/shadowsocks/shadowsocks-libev && cd shadowsocks-libev
# Installation of libsodium
export LIBSODIUM_VER=1.0.16
wget https://download.libsodium.org/libsodium/releases/libsodium-$LIBSODIUM_VER.tar.gz
tar xvf libsodium-$LIBSODIUM_VER.tar.gz
pushd libsodium-$LIBSODIUM_VER
# 100% frames must be available for call read()
print(source.stream.read_available)
# if source.stream.read_available < source.CHUNK:
# time.sleep(0.002)
# continue
pcm.!default {
type asym
playback.pcm "playback"
capture.pcm "capture"
}
pcm.playback {
type plug
slave.pcm "dmixed"
}