diff --git a/homeassistant/HA_part_4.html b/homeassistant/HA_part_4.html new file mode 100644 index 0000000..d5d0b5c --- /dev/null +++ b/homeassistant/HA_part_4.html @@ -0,0 +1,2095 @@ + + +


 

+


 

+


 

+

add csv data to influxdb / grafana

+

https://community.home-assistant.io/t/importing-csv-file-into-influxdb/323933

+


 

+

manual entry:

+

Nutrition,measurement=Water,unit=grams value=2000 1645750800000000000

+

Consumption,measurement=Gas,unit=kWh value=2000 1645750800000000000

+

Consumption,measurement=Electricity,unit=kWh value=2000 1645750800000000000

+

Consumption,measurement=Electricity,unit=kWh value=3000 1687377128078000000

+


 

+

https://www.timestamp-converter.com/

+

Timestamp 1687377128

+

Timestamp in milliseconds 1687377128078 + 000000

+

ISO 8601 2023-06-21T19:52:08.078Z

+

Date Time (UTC) 21. Juni 2023, 19:52:08

+

Date Time (your time zone) 21. Juni 2023, 21:52:08

+


 

+


 

+


 

+


 

+

https://stackoverflow.com/questions/58599352/how-to-convert-formatted-date-to-unix-epoch-in-libreoffice-calc

+


 

+

Operations performed on date data should be automatic provided that the cells are formatted as as a user defined DD.MM.YYYY HH:MM:SS in the 'Format' > 'Cells' > 'Numbers' tab.

+


 

+

If you're using the standard settings, LibreOffice Calc uses 12/30/1899 as it's default date. So the first step is getting the number of days between 12/30/1899 and 1/1/1970:

+


 

+

=(DATE(1970,1,1) - DATE(1899,12,30)) = 25569

+

Number of seconds in a day:

+


 

+

=(60 * 60 * 24) = 86400

+

If, for example, in cell A2 you have the date 03.12.2013 14:01:49. I subtract the difference between Calc's default date and the Unix Epoch we just calculated, and multiply it by the number of seconds in a day:

+


 

+

=(A2 - 25569) * 86400

+

The result is a value of 1363096909 which is the Epoch time in seconds. If you need it in milliseconds, multiply the equation by 1000.

+


 

+


 

+


 

+


 

+


 

+


 

+

NOUS A1T with homeassistant

+

https://tasmota.github.io/docs/MQTT/#command-flow

+


 

+


 

+

https://tasmota.github.io/docs/Home-Assistant/

+


 

+


 

+

https://www.synology-forum.de/threads/brauche-mal-hilfe-bei-home-assistant-und-tasmota-einbindung.116762/

+

integrate via MQTT → Zum Schluss über die Tasmota Console noch folgenden Befehl senden: SetOption19 1

+

integrate via Tasmota Integration → SetOption19 0

+


 

+


 

+

http://192.168.4.1/

+

FRITZ!Box 7530 GD

+

78302839617779115068

+


 

+

http://192.168.178.50/

+

tasmota-832BEA-3050 with IP address 192.168.178.50

+

tasmota-836841-2113 with IP address 192.168.178.49

+

tasmota-8386C8-1736 with IP address 192.168.178.47

+

tasmota-C68576-1398 with IP address 192.168.178.48

+

tasmota-833CA2-7330 with IP address 192.168.178.61

+

tasmota-836841-7745 with IP address 192.168.178.60

+

tasmota-83310D-4365 with IP address 192.168.178.62

+

tasmota-837743-5955 with IP address 192.168.178.63

+


 

+

voltageset 220

+


 

+

192.168.178.52

+

User: note4

+

Password: note4

+


 

+

stat/tasmota_832BEA/RESULT

+

tele/tasmota_832BEA/STATE

+

tele/tasmota_832BEA/SENSOR

+


 

+


 

+

https://tasmota.github.io/docs/Peripherals/#update-interval

+

TelePeriod 10

+


 

+


 

+


 

+

how to keep smart plug powered off after unplugging and re-plugging?

+

https://tasmota.github.io/docs/Commands/#commands-list

+

0 / OFF = keep power(s) OFF after power up → PowerOnState 0

+

1 / ON = turn power(s) ON after power up

+


 

+

disable use of button

+

SetOption73 Detach buttons from relays and send multi-press and hold MQTT messages instead

+

0 = disable (default)

+

1 = enable → SetOption73 1

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+

configure network storage (fritz.nas) in home assistant:

+


 

+

https://www.home-assistant.io/common-tasks/os/#network-storage

+


 

+

\\192.168.178.1\FRITZ.NAS\USB-SanDisk3-2Gen1-01

+

http://fritz.box/nas?sid=41098e807aea021b

+


 

+


 

+


 

+


 

+


 

+


 

+

https://smartebude.de/einrichtung-einer-nas-als-speicherort-fuer-home-assistant-backups-z-b-fritzbox-als-nas/

+

user: homeassistant

+

password: bhasfonworf34534thb

+

fritz.nas/USB-SanDisk3-2Gen1-01/Data

+


 

+
+
+
+


 

+


 

+


 

+


 

+


 

+


 

+

Zeitpläne nutzen, um mehrere Temperaturen in Home Assistant zu steuern

+

https://smartebude.de/zeitplaene-nutzen-um-mehrere-temperaturen-in-home-assistant-zu-steuern/

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+

use Raspberry Pi as WiFi repeater

+

https://pimylifeup.com/raspberry-pi-wifi-extender/

+

https://blog.balena.io/turn-a-raspberry-pi-into-a-wi-fi-access-point-or-repeater/

+


 

+


 

+


 

+


 

+


 

+


 

+

Timercard (Ein-Aus-Zeit) in HomeAssistant

+

https://smarthomeyourself.de/wiki/homeassistant/timercard-ein-aus-zeit-in-homeassistant/

+


 

+


 

+

Ähnlich wie beim Lichtwecker zum Aufstehen erstellen wir eine Timercard mit On-Off-Time (ideal für die Gartenbewässerung oder ähnliches)

+

Als erstes benötigen wir wieder einige Helfer:

+
#-
+

 

+
+

Im Gegensatz zum Lichtwecker benötigen wir hier nun 2 Sensoren – einen für die Startzeit und einen wo Beendet werden soll

+
#######################################################
+

 

+
+

Und zum Schluss wieder ein Paar Automatisierung, damit alles funktioniert.

+
alias
+

 

+
+

Zum Schluss alles ins Dashboard….

+
+
type
+

# https://smarthomeyourself.de/wiki/homeassistant/naechsten-ausfuehrungszeitpunkt-von-aktiven-zeitplaenen-der-scheduler-card-mit-einem-template-sensor-ermitteln/

+

- platform: template

+

sensors:

+

next_scheduler:

+

friendly_name: "Nächster Scheduler"

+

state: >

+

{%- set x = states.switch | selectattr('entity_id', 'in', state_attr('group.schedulers', 'entity_id'))| selectattr('state','eq','on')|list -%}

+

{% if x | count > 0 %}

+

{{ x[0].name }}

+

{% else %}

+

Kein Eintrag in der Liste

+

{%- endif -%}

+

attributes:

+

next_run: >

+

{%- set x = states.switch | selectattr('entity_id', 'in', state_attr('group.schedulers', 'entity_id'))| selectattr('state','eq','on')|list -%}

+

{% if x | count > 0 %}

+

{{ as_timestamp( x[0].attributes.next_trigger ) | timestamp_custom("%d.%m.%Y, %H:%M Uhr") }}

+

{% else %}

+

Kein Eintrag in der Liste

+

{%- endif -%}

+


 

+


 

+


 

+


 

+


 

+

ESP32-CAM PIR Motion Detector with Photo Capture

+

https://edistechlab.com/esp32-cam-2-projekte-mit-micro-sd-karte/?v=3a52f3c22ed6

+
+


 

+


 

+


 

+

https://randomnerdtutorials.com/esp32-cam-pir-motion-detector-photo-capture/

+


 

+

PIR is connected via a transistor!!

+


 

+

For this project, you’ll need the following parts:

+


 

+

ESP32-CAM with OV2640 – read Best ESP32-CAM Dev Boards

+

MicroSD card

+

PIR motion sensor

+

2N3904 transistor

+

FTDI programmer

+

Female-to-female jumper wires

+

5V power supply for ESP32-CAM or power bank (optional)

+


 

+
+
+


 

+


 

+

/*********

+

+

+

  Rui Santos

+

+

+

  Complete project details at https://RandomNerdTutorials.com/esp32-cam-pir-motion-detector-photo-capture/

+

+

+

 

+

+

+

  IMPORTANT!!!

+

+

+

   - Select Board "AI Thinker ESP32-CAM"

+

+

+

   - GPIO 0 must be connected to GND to upload a sketch

+

+

+

   - After connecting GPIO 0 to GND, press the ESP32-CAM on-board RESET button to put your board in flashing mode

+

+

+

 

+

+

+

  Permission is hereby granted, free of charge, to any person obtaining a copy

+

+

+

  of this software and associated documentation files.

+

+

+

  The above copyright notice and this permission notice shall be included in all

+

+

+

  copies or substantial portions of the Software.

+

+

+

*********/

+

+

+

 

+

+

+

#include "esp_camera.h"

+

+

+

#include "Arduino.h"

+

+

+

#include "FS.h"                // SD Card ESP32

+

+

+

#include "SD_MMC.h"            // SD Card ESP32

+

+

+

#include "soc/soc.h"           // Disable brownour problems

+

+

+

#include "soc/rtc_cntl_reg.h"  // Disable brownour problems

+

+

+

#include "driver/rtc_io.h"

+

+

+

#include <EEPROM.h>            // read and write from flash memory

+

+

+

// define the number of bytes you want to access

+

+

+

#define EEPROM_SIZE 1

+

+

+

 

+

+

+

RTC_DATA_ATTR int bootCount = 0;

+

+ +

+

// Pin definition for CAMERA_MODEL_AI_THINKER

+

+

+

#define PWDN_GPIO_NUM     32

+

+

+

#define RESET_GPIO_NUM    -1

+

+

+

#define XCLK_GPIO_NUM      0

+

+

+

#define SIOD_GPIO_NUM     26

+

+

+

#define SIOC_GPIO_NUM     27

+

+

+

#define Y9_GPIO_NUM       35

+

+

+

#define Y8_GPIO_NUM       34

+

+

+

#define Y7_GPIO_NUM       39

+

+

+

#define Y6_GPIO_NUM       36

+

+

+

#define Y5_GPIO_NUM       21

+

+

+

#define Y4_GPIO_NUM       19

+

+

+

#define Y3_GPIO_NUM       18

+

+

+

#define Y2_GPIO_NUM        5

+

+

+

#define VSYNC_GPIO_NUM    25

+

+

+

#define HREF_GPIO_NUM     23

+

+

+

#define PCLK_GPIO_NUM     22

+

+

+

 

+

+

+

int pictureNumber = 0;

+

+

+

  

+

+

+

void setup() {

+

+

+

  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector

+

+

+

  Serial.begin(115200);

+

+

+

 

+

+

+

  Serial.setDebugOutput(true);

+

+

+

 

+

+

+

  camera_config_t config;

+

+

+

  config.ledc_channel = LEDC_CHANNEL_0;

+

+

+

  config.ledc_timer = LEDC_TIMER_0;

+

+

+

  config.pin_d0 = Y2_GPIO_NUM;

+

+

+

  config.pin_d1 = Y3_GPIO_NUM;

+

+

+

  config.pin_d2 = Y4_GPIO_NUM;

+

+

+

  config.pin_d3 = Y5_GPIO_NUM;

+

+

+

  config.pin_d4 = Y6_GPIO_NUM;

+

+

+

  config.pin_d5 = Y7_GPIO_NUM;

+

+

+

  config.pin_d6 = Y8_GPIO_NUM;

+

+

+

  config.pin_d7 = Y9_GPIO_NUM;

+

+

+

  config.pin_xclk = XCLK_GPIO_NUM;

+

+

+

  config.pin_pclk = PCLK_GPIO_NUM;

+

+

+

  config.pin_vsync = VSYNC_GPIO_NUM;

+

+

+

  config.pin_href = HREF_GPIO_NUM;

+

+

+

  config.pin_sscb_sda = SIOD_GPIO_NUM;

+

+

+

  config.pin_sscb_scl = SIOC_GPIO_NUM;

+

+

+

  config.pin_pwdn = PWDN_GPIO_NUM;

+

+

+

  config.pin_reset = RESET_GPIO_NUM;

+

+

+

  config.xclk_freq_hz = 20000000;

+

+

+

  config.pixel_format = PIXFORMAT_JPEG;

+

+

+

  

+

+

+

  pinMode(4, INPUT);

+

+

+

  digitalWrite(4, LOW);

+

+

+

  rtc_gpio_hold_dis(GPIO_NUM_4);

+

+

+

 

+

+

+

  if(psramFound()){

+

+

+

    config.frame_size = FRAMESIZE_UXGA; // FRAMESIZE_ + QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA

+

+

+

    config.jpeg_quality = 10;

+

+

+

    config.fb_count = 2;

+

+

+

  } else {

+

+

+

    config.frame_size = FRAMESIZE_SVGA;

+

+

+

    config.jpeg_quality = 12;

+

+

+

    config.fb_count = 1;

+

+

+

  }

+

+

+

 

+

+

+

  // Init Camera

+

+

+

  esp_err_t err = esp_camera_init(&config);

+

+

+

  if (err != ESP_OK) {

+

+

+

    Serial.printf("Camera init failed with error 0x%x", err);

+

+

+

    return;

+

+

+

  }

+

+

+

 

+

+

+

  Serial.println("Starting SD Card");

+

+

+

 

+

+

+

  delay(500);

+

+

+

  if(!SD_MMC.begin()){

+

+

+

    Serial.println("SD Card Mount Failed");

+

+

+

    //return;

+

+

+

  }

+

+

+

 

+

+

+

  uint8_t cardType = SD_MMC.cardType();

+

+

+

  if(cardType == CARD_NONE){

+

+

+

    Serial.println("No SD Card attached");

+

+

+

    return;

+

+

+

  }

+

+

+

   

+

+

+

  camera_fb_t * fb = NULL;

+

+

+

 

+

+

+

  // Take Picture with Camera

+

+

+

  fb = esp_camera_fb_get();  

+

+

+

  if(!fb) {

+

+

+

    Serial.println("Camera capture failed");

+

+

+

    return;

+

+

+

  }

+

+

+

  // initialize EEPROM with predefined size

+

+

+

  EEPROM.begin(EEPROM_SIZE);

+

+

+

  pictureNumber = EEPROM.read(0) + 1;

+

+

+

 

+

+

+

  // Path where new picture will be saved in SD Card

+

+

+

  String path = "/picture" + String(pictureNumber) +".jpg";

+

+

+

 

+

+

+

  fs::FS &fs = SD_MMC;

+

+

+

  Serial.printf("Picture file name: %s\n", path.c_str());

+

+

+

 

+

+

+

  File file = fs.open(path.c_str(), FILE_WRITE);

+

+

+

  if(!file){

+

+

+

    Serial.println("Failed to open file in writing mode");

+

+

+

  }

+

+

+

  else {

+

+

+

    file.write(fb->buf, fb->len); // payload (image), payload length

+

+

+

    Serial.printf("Saved file to path: %s\n", path.c_str());

+

+

+

    EEPROM.write(0, pictureNumber);

+

+

+

    EEPROM.commit();

+

+

+

  }

+

+

+

  file.close();

+

+

+

  esp_camera_fb_return(fb);

+

+

+

  

+

+

+

  delay(1000);

+

+

+

  

+

+

+

  // Turns off the ESP32-CAM white on-board LED (flash) connected to GPIO 4

+

+

+

  pinMode(4, OUTPUT);

+

+

+

  digitalWrite(4, LOW);

+

+

+

  rtc_gpio_hold_en(GPIO_NUM_4);

+

+ +

+

  esp_sleep_enable_ext0_wakeup(GPIO_NUM_13, 0);

+

+

+

 

+

+

+

  Serial.println("Going to sleep now");

+

+

+

  delay(1000);

+

+

+

  esp_deep_sleep_start();

+

+

+

  Serial.println("This will never be printed");

+

+

+

+

+

+

 

+

+

+

void loop() {

+

+

+

 

+

+

+

}

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+

ESP32-CAM Video Streaming Web Server (works with Home Assistant)

+

https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/

+


 

+


 

+

/*********

+

+

+

  Rui Santos

+

+

+

  Complete project details at https://RandomNerdTutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/

+

+

+

  

+

+

+

  IMPORTANT!!! 

+

+

+

   - Select Board "AI Thinker ESP32-CAM"

+

+

+

   - GPIO 0 must be connected to GND to upload a sketch

+

+

+

   - After connecting GPIO 0 to GND, press the ESP32-CAM on-board RESET button to put your board in flashing mode

+

+

+

  

+

+

+

  Permission is hereby granted, free of charge, to any person obtaining a copy

+

+

+

  of this software and associated documentation files.

+

+ +

+

  The above copyright notice and this permission notice shall be included in all

+

+

+

  copies or substantial portions of the Software.

+

+

+

*********/

+

+ +

+

#include "esp_camera.h"

+

+

+

#include <WiFi.h>

+

+

+

#include "esp_timer.h"

+

+

+

#include "img_converters.h"

+

+

+

#include "Arduino.h"

+

+

+

#include "fb_gfx.h"

+

+

+

#include "soc/soc.h" //disable brownout problems

+

+

+

#include "soc/rtc_cntl_reg.h"  //disable brownout problems

+

+

+

#include "esp_http_server.h"

+

+ +

+

//Replace with your network credentials

+

+

+

const char* ssid = "REPLACE_WITH_YOUR_SSID";

+

+

+

const char* password = "REPLACE_WITH_YOUR_PASSWORD";

+

+ +

+

#define PART_BOUNDARY "123456789000000000000987654321"

+

+ +

+

// This project was tested with the AI Thinker Model, M5STACK PSRAM Model and M5STACK WITHOUT PSRAM

+

+

+

#define CAMERA_MODEL_AI_THINKER

+

+

+

//#define CAMERA_MODEL_M5STACK_PSRAM

+

+

+

//#define CAMERA_MODEL_M5STACK_WITHOUT_PSRAM

+

+ +

+

// Not tested with this model

+

+

+

//#define CAMERA_MODEL_WROVER_KIT

+

+ +

+

#if defined(CAMERA_MODEL_WROVER_KIT)

+

+

+

  #define PWDN_GPIO_NUM    -1

+

+

+

  #define RESET_GPIO_NUM   -1

+

+

+

  #define XCLK_GPIO_NUM    21

+

+

+

  #define SIOD_GPIO_NUM    26

+

+

+

  #define SIOC_GPIO_NUM    27

+

+

+

  

+

+

+

  #define Y9_GPIO_NUM      35

+

+

+

  #define Y8_GPIO_NUM      34

+

+

+

  #define Y7_GPIO_NUM      39

+

+

+

  #define Y6_GPIO_NUM      36

+

+

+

  #define Y5_GPIO_NUM      19

+

+

+

  #define Y4_GPIO_NUM      18

+

+

+

  #define Y3_GPIO_NUM       5

+

+

+

  #define Y2_GPIO_NUM       4

+

+

+

  #define VSYNC_GPIO_NUM   25

+

+

+

  #define HREF_GPIO_NUM    23

+

+

+

  #define PCLK_GPIO_NUM    22

+

+ +

+

#elif defined(CAMERA_MODEL_M5STACK_PSRAM)

+

+

+

  #define PWDN_GPIO_NUM     -1

+

+

+

  #define RESET_GPIO_NUM    15

+

+

+

  #define XCLK_GPIO_NUM     27

+

+

+

  #define SIOD_GPIO_NUM     25

+

+

+

  #define SIOC_GPIO_NUM     23

+

+

+

  

+

+

+

  #define Y9_GPIO_NUM       19

+

+

+

  #define Y8_GPIO_NUM       36

+

+

+

  #define Y7_GPIO_NUM       18

+

+

+

  #define Y6_GPIO_NUM       39

+

+

+

  #define Y5_GPIO_NUM        5

+

+

+

  #define Y4_GPIO_NUM       34

+

+

+

  #define Y3_GPIO_NUM       35

+

+

+

  #define Y2_GPIO_NUM       32

+

+

+

  #define VSYNC_GPIO_NUM    22

+

+

+

  #define HREF_GPIO_NUM     26

+

+

+

  #define PCLK_GPIO_NUM     21

+

+ +

+

#elif defined(CAMERA_MODEL_M5STACK_WITHOUT_PSRAM)

+

+

+

  #define PWDN_GPIO_NUM     -1

+

+

+

  #define RESET_GPIO_NUM    15

+

+

+

  #define XCLK_GPIO_NUM     27

+

+

+

  #define SIOD_GPIO_NUM     25

+

+

+

  #define SIOC_GPIO_NUM     23

+

+

+

  

+

+

+

  #define Y9_GPIO_NUM       19

+

+

+

  #define Y8_GPIO_NUM       36

+

+

+

  #define Y7_GPIO_NUM       18

+

+

+

  #define Y6_GPIO_NUM       39

+

+

+

  #define Y5_GPIO_NUM        5

+

+

+

  #define Y4_GPIO_NUM       34

+

+

+

  #define Y3_GPIO_NUM       35

+

+

+

  #define Y2_GPIO_NUM       17

+

+

+

  #define VSYNC_GPIO_NUM    22

+

+

+

  #define HREF_GPIO_NUM     26

+

+

+

  #define PCLK_GPIO_NUM     21

+

+ +

+

#elif defined(CAMERA_MODEL_AI_THINKER)

+

+

+

  #define PWDN_GPIO_NUM     32

+

+

+

  #define RESET_GPIO_NUM    -1

+

+

+

  #define XCLK_GPIO_NUM      0

+

+

+

  #define SIOD_GPIO_NUM     26

+

+

+

  #define SIOC_GPIO_NUM     27

+

+

+

  

+

+

+

  #define Y9_GPIO_NUM       35

+

+

+

  #define Y8_GPIO_NUM       34

+

+

+

  #define Y7_GPIO_NUM       39

+

+

+

  #define Y6_GPIO_NUM       36

+

+

+

  #define Y5_GPIO_NUM       21

+

+

+

  #define Y4_GPIO_NUM       19

+

+

+

  #define Y3_GPIO_NUM       18

+

+

+

  #define Y2_GPIO_NUM        5

+

+

+

  #define VSYNC_GPIO_NUM    25

+

+

+

  #define HREF_GPIO_NUM     23

+

+

+

  #define PCLK_GPIO_NUM     22

+

+

+

#else

+

+

+

  #error "Camera model not selected"

+

+

+

#endif

+

+ +

+

static const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY;

+

+

+

static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n";

+

+

+

static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n";

+

+ +

+

httpd_handle_t stream_httpd = NULL;

+

+ +

+

static esp_err_t stream_handler(httpd_req_t *req){

+

+

+

  camera_fb_t * fb = NULL;

+

+

+

  esp_err_t res = ESP_OK;

+

+

+

  size_t _jpg_buf_len = 0;

+

+

+

  uint8_t * _jpg_buf = NULL;

+

+

+

  char * part_buf[64];

+

+ +

+

  res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE);

+

+

+

  if(res != ESP_OK){

+

+

+

    return res;

+

+

+

  }

+

+ +

+

  while(true){

+

+

+

    fb = esp_camera_fb_get();

+

+

+

    if (!fb) {

+

+

+

      Serial.println("Camera capture failed");

+

+

+

      res = ESP_FAIL;

+

+

+

    } else {

+

+

+

      if(fb->width > 400){

+

+

+

        if(fb->format != PIXFORMAT_JPEG){

+

+

+

          bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len);

+

+

+

          esp_camera_fb_return(fb);

+

+

+

          fb = NULL;

+

+

+

          if(!jpeg_converted){

+

+

+

            Serial.println("JPEG compression failed");

+

+

+

            res = ESP_FAIL;

+

+

+

          }

+

+

+

        } else {

+

+

+

          _jpg_buf_len = fb->len;

+

+

+

          _jpg_buf = fb->buf;

+

+

+

        }

+

+

+

      }

+

+

+

    }

+

+

+

    if(res == ESP_OK){

+

+

+

      size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);

+

+

+

      res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen);

+

+

+

    }

+

+

+

    if(res == ESP_OK){

+

+

+

      res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);

+

+

+

    }

+

+

+

    if(res == ESP_OK){

+

+

+

      res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));

+

+

+

    }

+

+

+

    if(fb){

+

+

+

      esp_camera_fb_return(fb);

+

+

+

      fb = NULL;

+

+

+

      _jpg_buf = NULL;

+

+

+

    } else if(_jpg_buf){

+

+

+

      free(_jpg_buf);

+

+

+

      _jpg_buf = NULL;

+

+

+

    }

+

+

+

    if(res != ESP_OK){

+

+

+

      break;

+

+

+

    }

+

+

+

    //Serial.printf("MJPG: %uB\n",(uint32_t)(_jpg_buf_len));

+

+

+

  }

+

+

+

  return res;

+

+

+

}

+

+ +

+

void startCameraServer(){

+

+

+

  httpd_config_t config = HTTPD_DEFAULT_CONFIG();

+

+

+

  config.server_port = 80;

+

+ +

+

  httpd_uri_t index_uri = {

+

+

+

    .uri       = "/",

+

+

+

    .method    = HTTP_GET,

+

+

+

    .handler   = stream_handler,

+

+

+

    .user_ctx  = NULL

+

+

+

  };

+

+

+

  

+

+

+

  //Serial.printf("Starting web server on port: '%d'\n", config.server_port);

+

+

+

  if (httpd_start(&stream_httpd, &config) == ESP_OK) {

+

+

+

    httpd_register_uri_handler(stream_httpd, &index_uri);

+

+

+

  }

+

+

+

}

+

+ +

+

void setup() {

+

+

+

  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector

+

+

+

 

+

+

+

  Serial.begin(115200);

+

+

+

  Serial.setDebugOutput(false);

+

+

+

  

+

+

+

  camera_config_t config;

+

+

+

  config.ledc_channel = LEDC_CHANNEL_0;

+

+

+

  config.ledc_timer = LEDC_TIMER_0;

+

+

+

  config.pin_d0 = Y2_GPIO_NUM;

+

+

+

  config.pin_d1 = Y3_GPIO_NUM;

+

+

+

  config.pin_d2 = Y4_GPIO_NUM;

+

+

+

  config.pin_d3 = Y5_GPIO_NUM;

+

+

+

  config.pin_d4 = Y6_GPIO_NUM;

+

+

+

  config.pin_d5 = Y7_GPIO_NUM;

+

+

+

  config.pin_d6 = Y8_GPIO_NUM;

+

+

+

  config.pin_d7 = Y9_GPIO_NUM;

+

+

+

  config.pin_xclk = XCLK_GPIO_NUM;

+

+

+

  config.pin_pclk = PCLK_GPIO_NUM;

+

+

+

  config.pin_vsync = VSYNC_GPIO_NUM;

+

+

+

  config.pin_href = HREF_GPIO_NUM;

+

+

+

  config.pin_sscb_sda = SIOD_GPIO_NUM;

+

+

+

  config.pin_sscb_scl = SIOC_GPIO_NUM;

+

+

+

  config.pin_pwdn = PWDN_GPIO_NUM;

+

+

+

  config.pin_reset = RESET_GPIO_NUM;

+

+

+

  config.xclk_freq_hz = 20000000;

+

+

+

  config.pixel_format = PIXFORMAT_JPEG; 

+

+

+

  

+

+

+

  if(psramFound()){

+

+

+

    config.frame_size = FRAMESIZE_UXGA;

+

+

+

    config.jpeg_quality = 10;

+

+

+

    config.fb_count = 2;

+

+

+

  } else {

+

+

+

    config.frame_size = FRAMESIZE_SVGA;

+

+

+

    config.jpeg_quality = 12;

+

+

+

    config.fb_count = 1;

+

+

+

  }

+

+

+

  

+

+

+

  // Camera init

+

+

+

  esp_err_t err = esp_camera_init(&config);

+

+

+

  if (err != ESP_OK) {

+

+

+

    Serial.printf("Camera init failed with error 0x%x", err);

+

+

+

    return;

+

+

+

  }

+

+

+

  // Wi-Fi connection

+

+

+

  WiFi.begin(ssid, password);

+

+

+

  while (WiFi.status() != WL_CONNECTED) {

+

+

+

    delay(500);

+

+

+

    Serial.print(".");

+

+

+

  }

+

+

+

  Serial.println("");

+

+

+

  Serial.println("WiFi connected");

+

+

+

  

+

+

+

  Serial.print("Camera Stream Ready! Go to: http://");

+

+

+

  Serial.print(WiFi.localIP());

+

+

+

  

+

+

+

  // Start streaming web server

+

+

+

  startCameraServer();

+

+

+

}

+

+ +

+

void loop() {

+

+

+

  delay(1);

+

+

+

}

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+

ESP32-CAM with Tasmota

+

https://cgomesu.com/blog/Esp32cam-tasmota-webcam-server/#required-packages-and-user-permissions

+


 

+

https://tasmota.github.io/docs/ESP32/#flashing

+

https://ota.tasmota.com/tasmota32/release/

+

use webinstaller to flash webcam firmware

+


 

+

connect to AP and open 192.168.4.1

+


 

+


 

+


 

+

https://community.home-assistant.io/t/esp32-cam-with-tasmota-and-rtsp/334281/6

+


 

+

how can i activte the rtsp stream?

+

Enter on console:

+

wcrtsp 1

+

wcrtsp 0

+


 

+

wcstream 0 stops the HTTP stream

+


 

+


 

+

==> rtsp://IP_der_Kamera:8554/mjpeg/1

+

rtsp://192.168.178.76:8554/mjpeg/1

+


 

+


 

+

https://github.com/arendst/Tasmota/discussions/13788

+

http://192.168.178.76:81/stream

+

http://192.168.178.76:81/cam.mjpeg

+


 

+


 

+


 

+

https://ottelo.jimdofree.com/stromz%C3%A4hler-auslesen-tasmota/#4g

+

(4g) Tasmota Einstellungen - Sende- und Abrufintervall, Zeitzone und Home Assistant

+

1. Configure other (Configuration -> Configure Other): 

+

MQTT = enabled

+

Device Name = MT175 (oder wählt einen anderen Namen)

+

2. Sende/Abruf Intervall einstellen (Configuration -> Configure Logging)

+

Telemetry period
(Wie oft soll der Wert an HA geschickt werden z.B. 60s)

+

4. Main Menu -> Console:

+

Wenn ihr die Tasmota Home Assistant Integration nutzen wollt müsst nicht nichts ändern, da SetOption19 bereits auf 0 eingestellt ist

+

Wenn ihr verhindern wollt, dass Tasmota rebootet wenn euer WLAN Router mal nicht verfügbar ist dann folgendes eintippen: WifiConfig 5
(wait until selected AP is available again without rebooting)

+

Falls ihr Probleme mit der Uhrzeit/Zeitumstellung habt, folgendes eingeben:

+

Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120

+

Skript bezogene Einstellungen findet ihr direkt im Skript ganz oben erklärt (englisch)

+


 

+


 

+

https://loxwiki.atlassian.net/wiki/spaces/LOX/pages/1594589651/Befehle+f+r+die+Konsole+in+Tasmota

+


 

+
+ + + + + + + + +
SetOption191 / onaktiviert die automatische Erkennung von Home-Assistant Komponenten (auch: Domoticz MQTT Discovery).
Achtung: Setoption19 1 ändert die Reihenfolge der MQTT-Topics auf %topic%/%prefix%/ (Standard: %prefix%/%topic%/). Dies lässt sich auch nicht durch einen entsprechenden Konsolenbefehl fulltopic %prefix%/%topic%/ erzwingen.
+
+


 

+


 

+

SetOption19 0

+


 

+


 

+


 

+

https://tasmota.github.io/docs/Commands/#camera

+


 

+
+ + + + + + + +
WcStream1 = start webcam stream at http://<device_ip>:81/stream or http://<device_ip>:81/cam.mjpeg
0 = stop stream
+
+


 

+

WcStream 1

+


 

+
+ + + + + + + +
WcResolutionSet camera resolution.
0 = 96x96 (96x96)
1 = QQVGA2 (128x160)
2 = QCIF (176x144)
3 = HQVGA (240x176)
4 = QVGA (320x240)
5 = CIF (400x296)
6 = VGA (640x480)
7 = SVGA (800x600)
8 = XGA (1024x768)
9 = SXGA (1280x1024)
10 = UXGA (1600x1200)
+
+


 

+

WcResolution 10 → XGA (1024x768)

+

WcResolution 12 → UXGA (1600x1200)

+


 

+

WcClock 200

+


 

+


 

+


 

+

https://tasmota.github.io/docs/Commands/#rules

+


 

+

ON <trigger> DO <command> [ENDON | BREAK]

+


 

+

https://tasmota.github.io/docs/Rules/#rule-trigger

+


 

+
+ + + + + + + + + + + + + + + +
Time#Minuteevery minute
Time#Minute|5every five minutes
Time#Minute=241every day once at 04:01 (241 minutes after midnight)
+
+


 

+

Restart at specific time each da of the week:

+

Timer1 {"Enable":1,"Mode":0,"Time":"04:0","Window":0,"Days":"1111111","Repeat":1,"Action":3}

+

Rule1 ON clock#Timer=1 DO Restart 1 ENDON

+

Rule1 1

+


 

+

Restart every 5 min:

+

Rule1 ON Time#Minute|5 DO Restart 5 ENDON

+

Rule1 1

+


 

+


 

+


 

+


 

+


 

+


 

+

Petoneer Smart Dot Add-on

+

https://community.home-assistant.io/t/petoneer-smart-dot-add-on/331391

+

https://github.com/marcomow/hass-addon-petoneer-smartdot

+

add repository: https://github.com/marcomow/hass-addons

+


 

+


 

+


 

+

modification for tasmota

+

https://templates.blakadder.com/petoneer_TY011.html

+


 

+


 

+


 

+


 

+


 

+

Install Petkit devices

+


 

+

Account email:

+

account password:

+


 

+


 

+


 

+


 

+

perfboard design with fritzing

+

https://electronics.stackexchange.com/questions/1600/stripboard-veroboard-matrix-board-design-software

+


 

+

https://forum.fritzing.org/t/how-shall-i-get-a-perfboard-matrix-board-view/4118

+

Select breadboard view (probably delete the breadboard to reduce clutter) then in the parts window on the right select core and move down to the category breadboard view near the bottom. There select the type of perfboard you want and drag it to the breadboard window. Once it is in the window the inspector window on the bottom right will let you change various things about it such as size and prefboard / stripboard.

+


 

+


 

+


 

+


 

+


 

+


 

+

Frigate

+

https://www.youtube.com/watch?v=xx9DyCIHK-8

+


 

+

attention to frame size configuration and ffmpeg declaration!

+


 

+


 

+

LINKS:

+


 

+


 

+

Frigate repository: https://github.com/blakeblackshear/fr...

+


 

+

Go2RTC repository: https://github.com/AlexxIT/hassio-addons

+


 

+


 

+

Frigate configuration: https://docs.frigate.video/configurat...

+


 

+

Go2RTC: https://github.com/AlexxIT/go2rtc

+


 

+


 

+

Go2RTC.yaml: https://pastebin.com/Fagfm1sC

+


 

+

Frigate.yml: https://pastebin.com/x974kFUp

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+

stream Tapo C220 with Frigate

+

 

+

tapo:

+

ffmpeg:

+

inputs:

+

# Für 1080P (1920*1080) stream: rtsp://username:password@IP Address:554/stream1

+

# Für 360P (640*360) stream: rtsp://username:password@IP Address:554/stream2

+

- path: rtsp://tapocam:watchmyhome90@192.168.178.21:554/stream2?video&audio=all

+

roles:

+

- detect

+

detect:

+

width: 640

+

height: 360

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+

operating touch button with Arduino

+

https://electronics.stackexchange.com/questions/608515/i-want-to-trigger-buttons-on-a-touch-sensitive-control-panel-not-a-touchscreen

+


 

+

https://arduino.stackexchange.com/questions/25662/triggering-capacitive-touch-on-a-touch-device

+


 

+

https://electronics.stackexchange.com/questions/60385/how-to-use-a-capacitive-touch-screen-without-a-human-hand

+


 

+


 

+


 

+


 

+


 

+

control Duux Whisper Flex Ultimate

+

Add Duux to Tuya Smart Life app

+

add Tuya integration to homeassistant, which should automatically identif device

+

create scene in app and reload integration

+


 

+


 

+


 

+


 

+

use ESP32 as BLE hub or repeater

+

https://smart-live.net/switchbot-esp32-mqtt-die-beste-home-assistant-integration/

+

Hier fügst du folgende URL hinzu: https://dl.espressif.com/dl/package_esp32_index.json

+


 

+

Als nächstes müssen zusätzliche Bibliotheken installiert werden. Hier die Übersicht, welche das sind:

+


 

+

NimBLEDevice

+

EspMQTTClient

+

ArduinoJson

+

CRC32 library (by Christopher Baker)

+

ArduinoQueue

+


 

+

Sind Arduino Vorbereitungen erledigt kannst du den Projektcode vom Github herunter laden.

+

https://github.com/devWaves/SwitchBot-MQTT-BLE-ESP32

+


 

+

Die Zip Datei wird entpackt und die Datei SwitchBot-BLE2MQTT-ESP32.ino in Arduino geöffnet. Im Bereich „Configurations to change“ müssen nun noch ein paar Einstellungen vorgenommen werden.

+

Zunächst werden im ersten Abschnitt deine WLAN Daten eingetragen

+

Danach folgen die Angaben zu deinem MQTT Broker

+

Als nächsten werden die BLE Adressen der Switchbot Geräte hinterlegt und die Bereiche entsprechend einkommentiert.

+
Arduino Projektcode anpassen
+

Arduino Projektcode

+

Zum Schluss noch definieren ob dein Board eine LED hat oder nicht. Im Falle des von mir verwendeten ESP32 ist das folgende Einstellung

+
ESP32 LED on Board oder nicht.
+

ESP32 LED

+

Nun kann der Sketch kompiliert und auf den ESP32 geflasht werden.

+
ESP32 Switchbot Sketch kompilieren
+

ESP32 Sketch kompilieren

+

Switchbot Geräte per MQTT in Home Assistant

+

Nach einem Neustart des ESP32 sollten alle erreichbaren Switchbot Geräte per Auto-Discovery in der MQTT Karte in Home Assistant zu sehen sein.

+


 

+


 

+


 

+


 

+


 

+


 

+

Best thermostat to control tado

+


 

+

RU4251787008: wall thermostat

+

IB1670717952: internet bridge; connected to router

+


 

+


 

+


 

+

Definition of entity_id: climate.tado_wohnzimmer:

+

tado integration

+


 

+

correct tado temperature:

+

/config/sensor/templates.yaml

+


 

+

calculate average temperature of thermostates:

+

/config/sensor/temp_indoors_average.yaml

+


 

+

adjust temperature of tado with another sensor.sensor1:

+

/config/automations/automations.yaml

+

alias: Trigger if the state of either thermostat changes

+

standard is 0.5 °C delta

+


 

+

adjust dynamics of temperature controller

+


 

+


 

+

turn off central heater or single thermostat based on presence:

+

/config/automations/home-away.yaml

+


 

+


 

+


 

+


 

+


 

+


 

+

Fritz box: detect new devices in homeassistant

+

https://community.home-assistant.io/t/device-tracker-fritz-integration-detect-new-devices/392042

+

- platform: event

+

id: "state"

+

event_type: entity_registry_updated

+

event_data:

+

action: create

+


 

+

trigger.event.data.entity_id

+


 

+

- "{{trigger.event.data.entity_id.startswith('device_tracker')}}"

+


 

+


 

+


 

+


 

+


 

+

install Conbee III

+


 

+

/dev/serial/by-id/usb-dresden_elektronik_ConBee_III_DE03188934-if00-port0

+


 

+

ls /dev/serial/by-id

+


 

+


 

+


 

+


 

+

https://community.home-assistant.io/t/conbee-setup/67301/19

+

List your devices…

+
ls /dev > ~/devices.txt
+


NOW plug in ConBee II to USB Port (via USB extension cable)

+

Reboot.

+

Find the ConBee II device

+
ls /dev > ~/devices2.txt
+

This will show the new device.
In my case it was /dev/ttyACM0

+




 

+


 

+


 

+

https://phoscon.de/de/conbee3/install#hazha

+


 

+

https://community.home-assistant.io/t/conbee-iii-conbee-3-from-dresden-elektronik-based-on-silicon-labs-efr32mg21-20dbm-radio-soc-mcu/649835

+


 

+


 

+

https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/devices/#pair-with-install-code

+


 

+


 

+


 

+

firmware update

+

https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Update-deCONZ-manually

+

GCFFlasher -l

+

GCFFlasher -d COM29 -t 60 -f deCONZ_ConBeeIII_0x264f0900.bin.GCF

+


 

+

in case of powershell:

+

.\GCFFlasher -l

+

.\GCFFlasher -d COM29 -t 60 -f deCONZ_ConBeeIII_0x264f0900.bin.GCF

+


 

+


 

+

Connect Philips Hue bulb to Conbee

+

It seems as if activation of both ZHA and deConz leads to interferences → ZHA alone seems to work

+

Delete bulb in the app

+

if lamp is not immediately recognized, searching for devices with ZHA or deConz will find device automatically

+


 

+


 

+

Connect Philips Motion Sensor

+

delete the sensor from the app

+

push the reset button for 10 s

+

once the orange LED blinks, the device is read for pairing

+

 

+


 

+


 

+

Connect Bosch Smart radiatorThermostate to Conbee

+

Thermostate 1:

+

18FC2600000615BD

+

FC32-9603-E07B

+

5182-1390-11E8

+

209B-5433-A9D3

+

service: zha.permit
data:
duration: 60
ieee: 00:21:2e:ff:ff:0e:1d:f6
source_ieee: 18:fc:26:00:00:06:15:bd
install_code: FC32-9603-E07B-5182-1390-11E8-209B-5433-A9D3

+


 

+

Via HACS install ZHA toolkit

+

In configuration.yaml add a line zha_toolkit:

+

On the battery cap or on the radiator behind the batteries note the ZigBee EUI-64 code (‘Source IEEE’) and the Install Code.

+

Go to Developer tools, services, service: Zigbee Home Automation: Permit

+

Enter the Source IEEE code and the install code in the UI. INSTALL

+

YAML looks like this:

+

service: zha.permit

+

data:

+

install_code: 379E-1234-ABCD-E529-1234-E6FE-ABCD-A70F-1234

+

source_ieee: 18:fc:26:00:00:dc:ba:ab

+

After INSTALL, go to Settings, Intergrations, Zigbee Home Automation. Your device should be listed now

+

Done.

+


 

+

https://community.home-assistant.io/t/bosch-thermostat-2/492845

+

Via HACS install ZHA toolkit

+

In configuration.yaml add a line zha_toolkit:

+

On the battery cap or on the radiator behind the batteries note the ZigBee EUI-64 code (‘Source IEEE’) and the Install Code.

+

Go to Developer tools, services, service: Zigbee Home Automation: Permit

+

Enter the Source IEEE code and the install code in the UI. INSTALL

+

YAML looks like this:
service: zha.permit
data:
install_code: 379E-1234-ABCD-E529-1234-E6FE-ABCD-A70F-1234
source_ieee: 18:fc:26:00:00:dc:ba:ab

+

After INSTALL, go to Settings, Intergrations, Zigbee Home Automation. Your device should be listed now

+

Done.

+


 

+


 

+


 

+


 

+


 

+


 

+

https://www.bosch-smarthome.com/de/de/service/hilfe/hilfe-zum-produkt/hilfe-zum-heizkoerper-thermostat-2/

+

Wie setze ich das Bosch Smart Home Heizkörper-Thermostat II auf die Werkseinstellungen zurück (Zurücksetzen)?

+

Um das Bosch Smart Home Heizkörper-Thermostat II auf die Werkseinstellungen zurückzusetzen gehen Sie wie folgt vor:

+


 

+

Entfernen Sie eine Batterie. Während Sie die Bedientaste ("o") gedrückt halten, setzen Sie die Batterie wieder ein. Halten Sie die Taste solange gedrückt bis die Status-LED orange blinkt und auf dem Display "RES" steht. Lassen Sie die Taste nun kurz los und drücken Sie die Taste erneut solange bis die Status-LED grün aufleuchtet. Das Bosch Smart Home Heizkörper-Thermostat II wird nun auf die Werkseinstellungen zurückgesetzt.

+

Bitte beachten Sie, dass hierbei nur die Daten auf dem Bosch Smart Home Heizkörper-Thermostat II selbst, aber nicht auf dem Bosch Smart Home Controller gelöscht werden. Um die Daten auf dem Bosch Smart Home Controller zu löschen, öffnen Sie die Geräteeinstellungen in der Bosch Smart Home App und löschen dort das entsprechende Gerät.

+


 

+

Bitte beachten Sie hierzu auch unser Reset-Video in diesem Artikel. Sollte es Probleme bei der Darstellung des Videos geben, dann finden Sie unsere Installations- und Reset-Videos auch auf unserem Bosch Smart Home Youtube Channel unter folgendem Link.

+


 

+


 

+


 

+

https://www.home-assistant.io/integrations/zha/#service-zhapermit

+

To add new devices to the network, call the permit service on the zha domain. Do this by clicking the Service icon in Developer tools and typing zha.permit in the Service dropdown box. Next, follow the device instructions for adding, scanning or factory reset.


 

+


 

+


 

+


 

+


 

+

Use REST client

+

https://dresden-elektronik.github.io/deconz-rest-doc/getting_started/#rest-api-client

+


 

+

Talend API Tester - Free Edition

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+


 

+

install proxmox server

+


 

+


 

+

https://techbits.io/install-home-assistant-on-proxmox/

+

https://tteck.github.io/Proxmox/

+


 

+


 

+


 

+


 

+

Proxmox

+

https://www.cyberithub.com/how-to-install-proxmox-ve-step-by-step-guide/#Step_4_Install_Proxmox_VE

+


 

+


 

+

Nextcloud

+

ttek

+


 

+


 

+

Homeassistant

+

ttek

+

https://smarthomescene.com/guides/moving-home-assistants-database-to-mariadb-on-proxmox/

+

https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-8/201835

+


 

+


 

+

mqtt

+

ttek

+


 

+

Mariadb

+

ttek

+


 

+


 

+

influx db

+

ttek

+

https://smarthomescene.com/guides/how-to-keep-home-assistant-history-infinitely-with-influxdb-on-proxmox/

+


 

+


 

+

grafana

+

ttek

+


 

+


 

+

adguard

+

ttek

+


 

+


 

+

Node-RED

+

ttek

+


 

+

Visual Studio Code

+

tte

+


 

+


 

+

frigate

+

https://www.homeautomationguy.io/blog/running-frigate-on-proxmox

+


 

+


 

+

Vaultwarden

+

ttek

+


 

+

Nginx Proxy Manager

+

ttek

+


 

+

Syncthing

+

ttek

+


 

+


 

+

Wiki.js

+

ttek

+

https://docs.requarks.io/install/windows

+


 

+


 

+

WireGuard

+

ttek

+


 

+


 

+

deCONZ

+

ttek

+


 

+

grocy

+

ttek

+

https://leonardosmarthomemakers.com/how-to-track-chores-in-home-assistant-with-grocy-and-nfc-tags/

+

https://www.reddit.com/r/homeassistant/comments/kptfbg/track_chores_in_home_assistant_with_grocy_nfc/

+


 

+


 

+


 

+


 

+


 

+


 

+

Win tips

+

open disk manager as admin

+

Open Run from the Start menu or Apps screen. Type diskmgmt.msc and press Enter.

+


 

+


 

+

Formatting disk via command prompt → dangerous!!!

+

https://www.diskpart.com/de/articles/usb-stick-formatieren.html

+

Die Windows-Eingabeaufforderung hat ähnliche Funktionen wie die Datenträgerverwaltung, erfordert jedoch hervorragende Fähigkeiten, insbesondere in den Befehlszeilen. Es kann einige USB-Probleme lösen, indem es mit verschiedenen Befehlen formatiert wird. Befolgen Sie die Schritte, um zu sehen, wie Sie dieses Tool zum Formatieren von USB-Sticks verwenden.

+

Schritt 1. Geben Sie „cmd“ in die Suchleiste ein, klicken Sie mit der rechten Maustaste auf die Eingabeaufforderung und wählen Sie „Als Administrator ausführen“.

+

Schritt 2. Geben Sie nacheinander die folgenden Befehlszeilen ein und drücken Sie jedes Mal „Enter“:

+

diskpart

+

list disk

+

select disk n (n ist die Nummer des USB-Sticks)

+

clean

+

create partition primary

+

format fs=fat32 quick (Sie können fat32 durch ntfs oder exfat ersetzen.)

+
USB-Stick formatieren mit Eingabeaufforderung
+




 

+


 

+


 

+


 

+


 

+

Mycropython IDEs

+

Thonny

+

https://randomnerdtutorials.com/getting-started-thonny-micropython-python-ide-esp32-esp8266/

+


 

+

https://thonny.org/

+

https://github.com/thonny/thonny/wiki/Linux

+

sudo apt install python3-tk thonny

+


 

+


 

+

VSCode

+

https://randomnerdtutorials.com/micropython-esp32-esp8266-vs-code-pymakr/

+

https://randomnerdtutorials.com/raspberry-pi-pico-vs-code-micropython/

+


 

+


 

+


 

+

https://www.bordergate.co.uk/configuring-an-esp32-in-ubuntu-22-04/

+

First plug the device in, and check it’s recognised by the operating system using the lsusb command. You should see an entry similar to the following:

+

>>lsusb

+

Bus 001 Device 006: ID 303a:4001 Espressif Systems Espressif Device

+


 

+

Using the dmesg command, you should be able to see the device being allocated a TTY:

+

>> sudo dmesg

+

cdc_acm 1-4:1.0: ttyACM0: USB ACM device

+


 

+

>>screen /dev/ttyACM0 115200

+


 

+

You may need to add the user to the “dialout” and “tty” groups to access the TTY device:

+

>>sudo usermod -a -G dialout <user>

+

>>sudo usermod -a -G tty <user>

+


 

+

Log out after making the usermod change. Next attempt to connect to the device using screen:

+

>>screen /dev/ttyACM0 115200

+


 

+

If the device is working, you should get a blank screen. If you receive an error about screen terminating, something has went wrong…

+


 

+

https://askubuntu.com/questions/1219498/could-not-open-port-dev-ttyacm0-error-after-every-restart

+

ls -l /dev/ttyACM0

+


 

+

sudo usermod -aG dialout $USER

+

sudo usermod -aG tty $USER

+


 

+

sudo adduser $USER dialout

+

sudo chmod a+rw /dev/ttyACM0

+


 

+

==> need to reboot for effects to take place!!

+


 

+


 

+

Flashing Mycropython firmware

+

See also esptool.txt document

+

https://randomnerdtutorials.com/flashing-micropython-firmware-esptool-py-esp32-esp8266/

+

pip install esptool

+

pip install setuptools

+

python -m esptool

+


 

+

e.g., T-Display-S3:

+

cd "/home/bora/Documents/Home Assistant/Micropython"

+

python -u -m esptool --chip esp32s3 --port /dev/ttyACM0 erase_flash

+

python -u -m esptool --chip esp32s3 --port /dev/ttyACM0 write_flash -z 0x0 firmware_t-display-s3_st7789s3_esp_lcd_v1.20.1.bin

+

==> several trials with pushing the BOOT button might be required!

+


 

+


 

+