SIM800L esp32

Hi I’m trying to get my sim to send me a message when the temperature picked up by my sensor is getting to a specific value but I can’t compile it.

Code:

esphome:
  name: hot-lake
  platform: ESP32
  board: esp32dev

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  password: ""

ota:
  password: ""

wifi:
  ssid: "XXX"
  password: "XXX"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Hot-Water-Lake-Esp32"
    password: "iAZP1T0BOxke"

captive_portal:



# defining sensors:

# relay:
switch:
  - platform: gpio
    name: "Relay"
    id: relay_1
    pin: GPIO26

# sim:
uart:
  baud_rate: 9600
  tx_pin: GPIO1
  rx_pin: GPIO3


# dallas temperature sensor:
dallas:
  - pin: GPIO32


# conditions:

sensor:
  - platform: dallas
    address: 0x2e0319a27968ac28
    name: "Water Temperature ESP32"

    on_value_range:
      - below: 24.0
        then:
        - sim800l.send_sms:
          recipient: 'XXX'
          message: Cold
      - above: 32.0
        then:
        - sim800l.send_sms:
          recipient: 'XXX'
          message: Hot

Terminal:

PS C:\Coding\Home Assistant\Water Temp\Test> esphome run test.yml
INFO Reading configuration test.yml...
Failed config

sensor.dallas: [source test.yml:58]
  platform: dallas
  address: 3315521936287116328
  name: Water Temperature ESP32
  on_value_range: 
    - below: 24.0
      then: 
        - 
          Unable to find action with the name 'sim800l.send_sms'.
          sim800l.send_sms:
          recipient: XXX
          message: Cold
    - above: 32.0
      then:
        - sim800l.send_sms:
          recipient: XXX
          message: Hot
PS C:\Coding\Home Assistant\Water Temp\Test> 

I’m Using an:
ESP32dev board
sim800l
where it says XXX is confidential (Phone Number, wifi password, and address) and shouldn’t be the problem…

Does anybody see where I was wrong ?
Thanks for the help.

You don’t have a sim800l: line

Hi, thanks for replying just saw this but it still won’t send me an SMS…

Code:

esphome:
  name: hot-lake
  platform: ESP32
  board: esp32dev





# Enable logging
logger:
  baud_rate: 0
  level: VERBOSE


# Enable Home Assistant API
api:
  password: ""

ota:
  password: ""

wifi:
  ssid: "XXX"
  password: "XXX"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Hot-Water-Lake-Esp32"
    password: "iAZP1T0BOxke"

captive_portal:



# defining sensors:

# relay:
switch:
  - platform: gpio
    name: "Relay"
    id: relay_1
    pin: GPIO26

# sim:
uart:
  baud_rate: 9600
  tx_pin: GPIO1
  rx_pin: GPIO3


sim800l:


# dallas temperature sensor:
dallas:
  - pin: GPIO32


# conditions:

sensor:




  - platform: dallas
    address: 0x2e0319a27968ac28
    name: "Water Temperature ESP32"

    on_value_range:
      - below: 24.0
        then:
        - sim800l.send_sms:
            recipient: 'XXX'
            message: Cold
      - above: 32.0
        then:
        - sim800l.send_sms:
            recipient: 'XXX'
            message: Hot





binary_sensor:
  - platform: sim800l
    registered:
      name: "Sim800L Registered"


  - platform: gpio
    pin: GPIO25
    name: "Button"

    on_press:
      then:
        - sim800l.send_sms:
            recipient: 'XXX'
            message: Hot



# deep_sleep:
#   run_duration: 2min
#   sleep_duration: 58min

I tried to isolate the SMS problem so I made a trigger that suppose to send me an SMS whenever I press the button but it still ain’t working.

this is the logs:

PS C:\Coding\Home Assistant\Water Temp\Test> esphome logs test.yml
INFO Reading configuration test.yml...
INFO Starting log output from hot-lake.local using esphome API
INFO Successfully connected to hot-lake.local
[17:53:47][I][app:102]: ESPHome version 2022.10.2 compiled on Dec  3 2022, 23:33:05
[17:53:47][C][wifi:502]: WiFi:
[17:53:47][C][wifi:360]:   Local MAC: 4C:11:AE:F9:7A:94
[17:53:47][C][wifi:361]:   SSID: 'vadai'
[17:53:47][C][wifi:362]:   IP Address: 192.168.1.5
[17:53:47][C][wifi:364]:   BSSID: AC:84:C6:46:38:DA
[17:53:47][C][wifi:365]:   Hostname: 'hot-lake'
[17:53:47][C][wifi:367]:   Signal strength: -57 dB ▂▄▆█
[17:53:47][V][wifi:369]:   Priority: 0.0
[17:53:47][C][logger:276]:   Level: VERBOSE
[17:53:47][C][logger:277]:   Log Baud Rate: 0
[17:53:47][C][logger:278]:   Hardware UART: UART0
[17:53:47][C][uart.arduino_esp32:107]: UART Bus:
[17:53:47][C][uart.arduino_esp32:108]:   TX Pin: GPIO1
[17:53:47][C][uart.arduino_esp32:109]:   RX Pin: GPIO3
[17:53:47][C][uart.arduino_esp32:111]:   RX Buffer Size: 256
[17:53:47][C][uart.arduino_esp32:113]:   Baud Rate: 9600 baud
[17:53:47][C][uart.arduino_esp32:114]:   Data Bits: 8
[17:53:47][C][uart.arduino_esp32:115]:   Parity: NONE
[17:53:47][C][uart.arduino_esp32:116]:   Stop bits: 1
[17:53:47][C][switch.gpio:050]: GPIO Switch 'Relay'
[17:53:48][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Button'
[17:53:48][C][gpio.binary_sensor:016]:   Pin: GPIO25
[17:53:48][C][sim800l:463]: SIM800L:
[17:53:48][C][sim800l:465]:   Registered 'Sim800L Registered'
[17:53:48][C][sim800l:465]:     Device Class: 'connectivity'
[17:53:48][C][dallas.sensor:075]: DallasComponent:
[17:53:48][C][dallas.sensor:076]:   Pin: GPIO32
[17:53:48][C][dallas.sensor:077]:   Update Interval: 60.0s
[17:53:48][D][dallas.sensor:082]:   Found sensors:
[17:53:48][D][dallas.sensor:084]:     0x2e0319a27968ac28
[17:53:48][C][dallas.sensor:089]:   Device 'Water Temperature ESP32'
[17:53:48][C][dallas.sensor:089]:     Device Class: 'temperature'
[17:53:48][C][dallas.sensor:089]:     State Class: 'measurement'
[17:53:48][C][dallas.sensor:089]:     Unit of Measurement: '°C'
[17:53:48][C][captive_portal:088]: Captive Portal:
[17:53:48][C][mdns:100]: mDNS:
[17:53:48][C][mdns:101]:   Hostname: hot-lake
[17:53:48][V][mdns:102]:   Services:
[17:53:48][V][mdns:104]:   - _esphomelib, _tcp, 6053
[17:53:48][V][mdns:106]:     TXT: version = 2022.10.2
[17:53:48][V][mdns:106]:     TXT: mac = 4c11aef97a94
[17:53:48][V][mdns:106]:     TXT: platform = ESP32
[17:53:48][V][mdns:106]:     TXT: board = esp32dev
[17:53:48][V][mdns:106]:     TXT: network = wifi
[17:53:48][C][ota:089]: Over-The-Air Updates:
[17:53:48][C][ota:090]:   Address: hot-lake.local:3232
[17:53:48][C][api:138]: API Server:
[17:53:48][C][api:139]:   Address: hot-lake.local:6053
[17:53:48][C][api:143]:   Using noise encryption: NO
[17:53:55][D][esp32.preferences:113]: Saving 1 preferences to flash...
[17:53:55][V][esp32.preferences:136]: NVS data not changed skipping 1938662975  len=1
[17:53:55][D][esp32.preferences:142]: Saving 1 preferences to flash: 1 cached, 0 written, 0 failed
[17:54:10][D][api:102]: Accepted ::FFFF:C0A8:10C
[17:54:10][V][api.connection:899]: Hello from client: 'Home Assistant 2022.11.4 (::FFFF:C0A8:10C)' | API Version 1.7
[17:54:10][W][api.connection:083]: Home Assistant 2022.11.4 (::FFFF:C0A8:10C): Connection closed
[17:54:10][V][api:114]: Removing connection to Home Assistant 2022.11.4 (::FFFF:C0A8:10C)
[17:54:20][D][binary_sensor:036]: 'Button': Sending state OFF
[17:54:20][D][binary_sensor:036]: 'Button': Sending state ON
[17:54:45][D][dallas.sensor:143]: 'Water Temperature ESP32': Got Temperature=20.6°C
[17:54:45][V][sensor:076]: 'Water Temperature ESP32': Received new state 20.625000
[17:54:45][D][sensor:127]: 'Water Temperature ESP32': Sending state 20.62500 °C with 1 decimals of accuracy
[17:54:55][D][esp32.preferences:113]: Saving 1 preferences to flash...
[17:54:55][V][esp32.preferences:136]: NVS data not changed skipping 1938662975  len=1
[17:54:55][D][esp32.preferences:142]: Saving 1 preferences to flash: 1 cached, 0 written, 0 failed

If you would be able to look over it and help me that would be awesome
thanks anyway :slight_smile:

which SIM800 board you buyed?

  • ch340k v15
  • ch9102 v1.4
  • cp2104 v1.4

I have to buy it; any suggestions?

:point_down:

Maybe instead of copy and pasting your (same) post to various old threads @pilot1981 you could think of opening a new thread and describe what you want or what your problem is.

1 Like