Quick and Dirty Co² Sensor mit ESP32 und SCD41

User stellen ihre Haussteuerung vor

Moderator: Co-Administratoren

tloeffel
Beiträge: 447
Registriert: 13.09.2017, 05:11
Hat sich bedankt: 1 Mal
Danksagung erhalten: 12 Mal

Re: Quick and Dirty Co² Sensor mit ESP32 und SCD41

Beitrag von tloeffel » 16.10.2021, 15:27

Danke :-)!

Hat alles soweit geklappt. Habe jetzt vier Werte mal getestet.

- Temperatur (DHT-22)
- Luftfeuchtigkeit (DTT-22)
- Bewegung/Vibration (sw420)
- Einfacher Taster

Lieben Gruß Thomas

Code: Alles auswählen

sensor:
  - platform: dht
    pin: GPIO14
    temperature:
      name: "Dachgeschoss Temperatur01"
      on_value:
        then:
         - http_request.get:
            url: !lambda |-
              char buf[128];
              snprintf(buf,sizeof(buf),"http://${hm_host}:8181/any.exe?w=dom.GetObject('${hm_sysvar_temp}').State(%0.1f)", x);
              return buf;
    humidity:
      name: "Dachgeschoss Luftfeuchtigkeit01"
      on_value:
        then:
         - http_request.get:
            url: !lambda |-
              char buf[128];
              snprintf(buf,sizeof(buf),"http://${hm_host}:8181/any.exe?w=dom.GetObject('${hm_sysvar_hum}').State(%0.1f)", x);
              return buf;
            
    update_interval: 60s
      
binary_sensor:  
  - platform: gpio  
    name: "Dachgeschoss_Vibration01"  
    pin:
      number: GPIO0
      inverted: true
      mode: INPUT
    device_class: vibration
    on_state:
        then:
           - http_request.get:
              url: !lambda |-
               return ((std::string) "http://${hm_host}:8181/any.exe?x=dom.GetObject('${hm_sysvar_vibra}').State(" + esphome::to_string(x) + ")" );
    
    filters:
     delayed_off: 2s

  - platform: gpio
    name: "Taster01"
    pin:
      number: GPIO12
      mode: INPUT_PULLUP
      inverted: true
    on_state:
      then:
         - http_request.get:
            url: !lambda |-
             return ((std::string) "http://${hm_host}:8181/any.exe?x=dom.GetObject('${hm_sysvar_button}').State(" + esphome::to_string(x) + ")" );  
972 Kanäle in 165 Geräten: Davon 16 HM, 145 HMIP, 2 Gruppen und 2 CUXD Geräte

cloudman88
Beiträge: 151
Registriert: 26.10.2020, 11:32
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 12 Mal
Danksagung erhalten: 22 Mal

Re: Quick and Dirty Co² Sensor mit ESP32 und SCD41

Beitrag von cloudman88 » 24.10.2021, 23:22

Hier V2 im Lego Gehäuse und Ws2812b zur Anzeige
20211024_231918.jpg

Antworten

Zurück zu „Projektvorstellungen“