logo elektroda
logo elektroda
X
logo elektroda

[Solved] Tasmot configuration: control of switch 2 based on CO flow sensor status

nieweglowski_m 387 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 20802754
    nieweglowski_m
    Level 2  
    I have a tasmota loaded on my Vemos d1 mini with a temperature sensor and a CO flow sensor which works by short-circuiting the circuit (it is plugged into the D1 port). When the sensor is short-circuited, the switch marked 1 is in the ON position. For control I created switch 2. The idea was that when the flow sensor is short-circuited, switch 2 should change status to ON, and when it is open it should be OFF. I wrote two rules:
    rule1 on Power1#state=1 to Power2 ON endon
    rule2 on Power1#state=0 to Power2 OFF endon
    which I then of course activated. Unfortunately the status of switch 2 is still OFF despite the sensor being shorted.
    What should I do to make it work as I described? Are the rules wrong or do I need to change something in the device configuration?
    The console sends messages like this:
    17:16:42.417 MQT: tele/czujnik_PC/STATE = {"Time":"2023-11-06T17:16:42","Uptime":"0T00:25:36","UptimeSec":1536,"Heap":25,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"ON","POWER2":"OFF","Wifi":{"AP":1,"SSId":"KOTLOWNIA","BSSId":"78:88:8A:05:F7:5C","Channel":6,"Mode":"11n","RSSI":40,"Signal":-80,"LinkCount":1,"Downtime":"0T00:00:04"}}
    17:16:42.445 MQT: tele/czujnik_PC/SENSOR = {"Time":"2023-11-06T17:16:42","Switch1":"OFF","DS18B20":{"Id":"3CDBE38117C9","Temperature":18.4}, "TempUnit":"C"}
    Tasmota module configuration screen with various GPIO settings.
    Tasmota control panel with two buttons and displayed temperature.


    Added after 1 [hour] 49 [minutes]:

    Topic taken care of, post to be closed
  • ADVERTISEMENT
  • #2 20803007
    nieweglowski_m
    Level 2  

    no need to add switch 2, the first one which originally controls the contact sensor is sufficient
ADVERTISEMENT