Power fail setup using LilyGo TCall fasle alarms

I have setup a LilyGo T-Call module to send text messages in the even of a power failure,

Simple setup, uses a battery and a 12v power supply, when AC fails the relay drops and reverts to the power from the battery. This happens without the device loosing power and happens seamlessly.

Thus, when this happens it also uses a separate pole on the relay to switch the GPIO which sends the text.

The issue I seem to be getting in weird false alarms, when there has been no power cut. I do not believe that the relay is even changing state, as power is not dropping.

Any ideas why this could be?

Come on you know the drill by now. Yaml, logs.

True true, here is the YAML. Logs report nothing strange. I never have the logs opens when it false alarms as it only does it once randomly in the day, maybe even every 2 days.

I also increased the trigger delay.

text_sensor:
- platform: template
  id: sms_sender
  name: "Sms Sender"
- platform: template
  id: sms_message
  name: "Sms Message"

uart:
  baud_rate: 9600
  tx_pin: 27
  rx_pin: 26

sim800l:
  on_sms_received:
    - lambda: |-
        id(sms_sender).publish_state(sender);
        id(sms_message).publish_state(message);

binary_sensor:
  - platform: gpio
    pin:
      number: 21
      mode: INPUT_PULLUP
    name: "240v Power"
    device_class: door
    filters:
    - delayed_on: 5000ms
    - delayed_off: 5000ms
    on_release:
      then:
      - sim800l.send_sms:
          recipient: ''
          message:  !lambda 'return "Power Failure recorded at " + id(hatime).now().strftime("%Y-%m-%d %H:%M");'
#    # Templated:
#    - sim800l.send_sms:
#        recipient: !lambda |-
#          if (id(reed_switch).state) return "+15551234567";
#          else return "15551234568";
#        message: !lambda |-
#          return id(reed_switch).state ? "Door is now OPEN" : "Hey door just CLOSED";

    # Templated:
#    - sim800l.send_sms:
#        recipient: !lambda |-
#          if (id(reed_switch).state) return "+15551234567";
#          else return "15551234568";
#        message: !lambda |-
#          return id(reed_switch).state ? "Door is now OPEN" : "Hey door just CLOSED";

switch:
  - platform: gpio
    name: "SIM800_PWKEY"
    pin: 4
    restore_mode: ALWAYS_OFF
  - platform: gpio
    name: "SIM800_RST"
    pin: 5
    restore_mode: ALWAYS_ON
  - platform: gpio
    name: "SIM800_POWER"
    pin: 23
    restore_mode: ALWAYS_ON

time:
  - platform: homeassistant
    id: hatime

Does the binary sensor trigger on boot by chance?

If so perhaps you are getting WiFi/API connection related reboots.

Adding an uptime sensor may also help rule this out.

Great call,

Let me do this, and try narrow it down more.

Thanks

1 Like

I have manually rebooted the device and can confirm that no txt was received upon reboot.

1 Like