From 736efceb96c61da1cb67f55e322eecbf1d05378b Mon Sep 17 00:00:00 2001 From: Falko Richter Date: Wed, 10 Jul 2024 11:11:41 +0000 Subject: [PATCH 1/3] removed outdated readme --- README.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 11be0f5..3360fd2 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,12 @@ # Tasmota -Python Process Actor for FabAccess -The Hardware and Software supports only non-permanent locks. -It can trigger locks, identify them via an LED and return the state of the deadbolt. +This is the actor for `tasmota nous a1t` and other tasmota based actors. https://www.tasmota.info/ is an open firmware. -To communicate with the FabLock-Hardware MQTT is used. -Every FabLock Module must have an unique ID. The ID is 5 digits long and has leading zeros. -To distinguish the individual locks in the FabLock module, each has a 5-digit ID with leading zeros. +Links: +* https://tasmota.github.io/docs/ +* https://www.tasmotrol.com/de/was-ist-tasmota/ +* https://github.com/arendst/Tasmota -Since different locks have different trigger times and these must be adhered to in order to maintain the functionality of the lock, these can only be set on the hardware. - -The LED flashes every 500ms seconds, when identifying. And lights permanent up when the lock is unlocked. -The state of the deadbolt is reported every 30 seconds. - ## Paramters ### MQTT Configuration * `--host` MQTT Server Address From f06468b1ea38ae22bf963a436b702c4eef84a817 Mon Sep 17 00:00:00 2001 From: Falko Richter Date: Wed, 10 Jul 2024 11:27:13 +0000 Subject: [PATCH 2/3] Update README.md --- README.md | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 150 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3360fd2..3ad3268 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,153 @@ Links: * `--password` MQTT Password (optional) ### Tasmota Configuration -* `--tasmota` Tasmota ID \ No newline at end of file +* `--tasmota` Tasmota ID + + +# More documentation (copied from https://cloud.offene-werkstaetten.org/s/GwRDK6mq3giZXCC) + +## FabAccess Tasmota Actor konfigurieren + +### Actor verfügbar machen + +``` +git clone https://gitlab.com/fabinfra/fabaccess/actors/tasmota.git adapters/tasmota +chmod +x adapters/tasmota/main.py +``` + +### Actor in bffh.dhall konfigurieren + +``` + actors = + { + tasmota_F0A4FB = + { + module = "Process", + params = + { + cmd = "/usr/local/lib/bffh/adapters/tasmota/main.py", + args = "--host mqtt --tasmota F0A4FB" + } + } + }, +``` + +## Nous A1T / Tasmota konfigurieren + + + +### PowerOnState auf 0 setzen, um eine Art Wiederanlaufschutz zu haben + +> PowerOnState Control power state when the device is powered up. More information +> 0 / OFF = keep power(s) OFF after power up +> 1 / ON = turn power(s) ON after power up +> 2 / TOGGLE = toggle power(s) from last saved state +> 3 = switch power(s) to their last saved state (default) +> 4 = turn power(s) ON and disable further power control +> 5 = after a PulseTime period turn power(s) ON (acts as inverted PulseTime mode) + +### Ggf. FriendlyName auf etwas lesbares ändern + +!! Fuktioniert das noch mit dem Tasmota Actor? !! + +> FriendlyName 1 = Reset friendly name to firmware default +> = set friendly name (32 char limit) + +### Tasmota aktualiseren + +> Upgrade 1 = download firmware from OtaUrl and restart +> 2 = (ESP32 only) download safeboot firmware based on OtaUrl and restart into safeboot +> = download firmware from OtaUrl if is higher than device version + +### Werbserver ausschalten und konfiguration nur über MQTT machen + +!! Ist dann noch ein separates Netzwerk erforderlich? !! + +> Webserver 0 = stop web server +> 1 = start web server in user mode +> 2 = start web server in admin mode + +### Farbschema anpassen + + + +``` +WebColor {"WebColor":["#727272","#fafafa","#fafafa","#3f484e","#fafafa","#25d0aa","#3f484e","#ca291d","#1dca29","#000000","#25d0aa","#1a9378","#ca291d","#8a1b14","#25d0aa","#1a9378","#ffffff","#25d0aa","#3b474d"]} +``` + +### WiFi einrichten + +> SSId = 1..2 +> = set AP Wi-Fi SSID and restart +> 1 = reset AP Wi-Fi SSID to firmware default (STA_SSID1 or STA_SSID2) and restart +> SSID are limited to 32 characters. Do not use special characters or white spaces in the SSID + +> Password = 1..2 +> = set AP Wi-Fi password and restart +> 1 = reset AP Wi-Fi password to firmware default (STA_PASS1 or STA_PASS2) and restart +> Passwords are limited to 64 characters. Do not use special characters or white spaces in the password. +> Note that Password and Password1 are equivalent commands. + +### MQTT einrichten + +> MqttHost 0 = clear MQTT host field and allow mDNS to find MQTT host +> 1 = reset MQTT host to firmware default (MQTT_HOST) and restart +> = set MQTT host and restart (do NOT use .local) + +> MqttUser 0 = clear MQTT user name +> 1 = reset MQTT user name to firmware default (MQTT_USER) and restart +> = set MQTT user name and restart + +> MqttPassword 0 = clear MQTT password +> 1 = reset MQTT password to firmware default (MQTT_PASS) and restart +> = set MQTT password and restart (min 5 chars) + +> MqttPort 1 = reset MQTT port to firmware default (MQTT_PORT) and restart +> = set MQTT port between 2 and 32766 and restart + +## MQTT mit TLS + +### mosquitto mit traefik einrichten + + + +#### ggf. noch mit crowdsec absichern + + + +### ESP8266 unterstützen kein TLS mit Tasmota und muss selbst gebaut werden + + +!! Durch FabInfra bereitstellen, damit neue Nous per OTA geflashes werden können? !! + +platform.ini + +``` + ; uncomment the following to enable TLS with 4096 RSA certificates + -DUSE_4K_RSA +``` + +platformio_tasmota_env.ini + +``` +lib_extra_dirs = + ${common.lib_extra_dirs} + lib/lib_ssl +``` + +tasmota/user_config_override.h + +``` +#ifndef _USER_CONFIG_OVERRIDE_H_ +#define _USER_CONFIG_OVERRIDE_H_ + +#ifndef USE_MQTT_TLS +#define USE_MQTT_TLS // Use TLS for MQTT connection (+34.5k code, +7.0k mem and +4.8k additional during connection handshake) +#define MQTT_TLS_ENABLED true // [SetOption103] Enable TLS mode (requires TLS version) +#define USE_MQTT_TLS_CA_CERT // Force full CA validation instead of fingerprints, slower, but simpler to use. (+2.2k code, +1.9k mem during connection handshake) + // This includes the LetsEncrypt CA in tasmota_ca.ino for verifying server certificates +// #define USE_MQTT_TLS_FORCE_EC_CIPHER // Force Elliptic Curve cipher (higher security) required by some servers (automatically enabled with USE_MQTT_AWS_IOT) (+11.4k code, +0.4k mem) +#endif + +#endif // _USER_CONFIG_OVERRIDE_H_ +``` \ No newline at end of file From 6a9aea31767877abf91629eb41e444ea05b88c68 Mon Sep 17 00:00:00 2001 From: Falko Richter Date: Fri, 12 Jul 2024 10:47:07 +0000 Subject: [PATCH 3/3] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ad3268..3a0eda1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ # Tasmota This is the actor for `tasmota nous a1t` and other tasmota based actors. https://www.tasmota.info/ is an open firmware. -Links: +# integration with fabaccess + +https://gitlab.com/volkersfreunde/dockercompose#setup-tasmota has a suggestion on how to integrate this actor. It needs to be made available to your fabaccess installation. + +## Links: * https://tasmota.github.io/docs/ * https://www.tasmotrol.com/de/was-ist-tasmota/ * https://github.com/arendst/Tasmota