esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

climate config no longer connecting to home assistant #875

Closed spattinson closed 4 years ago

spattinson commented 4 years ago

Hassbian Operating environment/Installation (Hass.io/Docker/pip/etc.):

ESPHome version 1.14.3 compiled on Nov 22 2019, 18:57:36 ESP (ESP32/ESP8266, Board/Sonoff): Wemos D1 Mini

Affected component: climate bang bang

Description of problem: I had a working config using the below. I noticed that if I changed the temperature in the frontend the following day after "away" mode has been on the temperature reverted to the default in the config not the set temp in the frontend. IDK if this is by design or not?

I decided to not use away mode for night time and instead switch to mode OFF in the hope that my setpoint would be retained. So instead of "away" on/off in the below config I put "mode" off/auto. That resulted in the esp no longer connecting to HA. I reverted the changes, and the esp still does not connect to HA. The documentation for climate says: mode (Optional, string, templatable): Put the climate device in a specific mode. One of OFF, AUTO, COOL and HEAT. Now previously when my config was working it was HEAT/COOL when it was on. You may remember a previous bug report https://github.com/esphome/issues/issues/840 about that.There seems to be no way to set HEAT/COOL in esphome config that I can see. I am guessing that setting AUTO in esphome which it accepts my have broken the integration somehow because all the sensors, climate etc are all unavailable now. Thanks in advance

Problem-relevant YAML-configuration entries:

PASTE YAML FILE HERE
esphome:
  name: hw
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: 'home'
  password:
  fast_connect: true

web_server:
  port: 80

api:

# Enable logging
logger:

ota:
  password: 

time:
  - platform: sntp
    id: sntp_time
    timezone: GMT0BST,M3.5.0/1,M10.5.0
    on_time:
      - seconds: 0
        minutes: 30
        hours: 6
        then:
          - climate.control:
              id: hot_water_boiler
              away: 'off'
      - seconds: 0
        minutes: 00
        hours: 23
        then:
          - climate.control:
              id: hot_water_boiler
              away: 'on'
          - climate.control:
              id: hot_water_immersion
              away: 'on'

switch:
  - platform: gpio
    pin: D0
    name: "Immersion Heater"
    id: immersion_heater
  - platform: gpio
    pin: D5
    name: "HW Control"
    id: hw_control
dallas:
  - pin: D1
sensor:
  - platform: dallas
    index: 0
    name: "Hot Water Temperature"
    id: hot_water_temperature
    filters:
      - sliding_window_moving_average:
          window_size: 5
          send_every: 5

climate:
  - platform: bang_bang
    sensor: hot_water_temperature
    name: Hot Water Boiler
    id: hot_water_boiler
    visual:
      min_temperature: 40
      max_temperature: 70
      temperature_step: 1
    default_target_temperature_low: 46 °C
    default_target_temperature_high: 48 °C
    heat_action:
      - switch.turn_on: hw_control
    idle_action:
      - switch.turn_off: hw_control
    away_config:
      default_target_temperature_low: 5 °C
      default_target_temperature_high: 8 °C

  - platform: bang_bang
    sensor: hot_water_temperature
    name: Hot Water Immersion
    id: hot_water_immersion
    visual:
      min_temperature: 40
      max_temperature: 60
      temperature_step: 1
    default_target_temperature_low: 48 °C
    default_target_temperature_high: 52 °C
    heat_action:
      - switch.turn_on: immersion_heater
    idle_action:
      - switch.turn_off: immersion_heater
    away_config:
      default_target_temperature_low: 5 °C
      default_target_temperature_high: 8 °C

Logs (if applicable):

PASTE DEBUG LOG HERE
[19:28:19][I][app:100]: ESPHome version 1.14.3 compiled on Nov 22 2019, 18:57:36
[19:28:19][C][wifi:415]: WiFi:
[19:28:19][C][wifi:283]:   SSID: 'home'
[19:28:19][C][wifi:284]:   IP Address: 192.168.1.240
[19:28:19][C][wifi:286]:   BSSID: D8:50:E6:A8:1E:20
[19:28:19][C][wifi:287]:   Hostname: 'hw'
[19:28:19][C][wifi:291]:   Signal strength: -60 dB ▂▄▆█
[19:28:19][C][wifi:295]:   Channel: 1
[19:28:19][C][wifi:296]:   Subnet: 255.255.255.0
[19:28:19][C][wifi:297]:   Gateway: 192.168.1.1
[19:28:19][C][wifi:298]:   DNS1: 192.168.1.1
[19:28:19][C][wifi:299]:   DNS2: (IP unset)
[19:28:19][C][switch.gpio:042]: GPIO Switch 'Immersion Heater'
[19:28:19][C][switch.gpio:043]:   Pin: GPIO16 (Mode: OUTPUT)
[19:28:19][C][switch.gpio:059]:   Restore Mode: Restore (Defaults to OFF)
[19:28:19][C][switch.gpio:042]: GPIO Switch 'HW Control'
[19:28:19][C][switch.gpio:043]:   Pin: GPIO14 (Mode: OUTPUT)
[19:28:19][C][switch.gpio:059]:   Restore Mode: Restore (Defaults to OFF)
[19:28:19][C][logger:175]: Logger:
[19:28:19][C][logger:176]:   Level: DEBUG
[19:28:19][C][logger:177]:   Log Baud Rate: 115200
[19:28:19][C][logger:178]:   Hardware UART: UART0
[19:28:19][C][bang_bang.climate:149]: Bang Bang Climate 'Hot Water Boiler'
[19:28:19][C][bang_bang.climate:150]:   Supports HEAT: YES
[19:28:19][C][bang_bang.climate:151]:   Supports COOL: NO
[19:28:19][C][bang_bang.climate:152]:   Supports AWAY mode: YES
[19:28:19][C][bang_bang.climate:153]:   Default Target Temperature Low: 46.0°C
[19:28:19][C][bang_bang.climate:154]:   Default Target Temperature High: 48.0°C
[19:28:19][C][bang_bang.climate:149]: Bang Bang Climate 'Hot Water Immersion'
[19:28:20][C][bang_bang.climate:150]:   Supports HEAT: YES
[19:28:20][C][bang_bang.climate:151]:   Supports COOL: NO
[19:28:20][C][bang_bang.climate:152]:   Supports AWAY mode: YES
[19:28:20][C][bang_bang.climate:153]:   Default Target Temperature Low: 48.0°C
[19:28:20][C][bang_bang.climate:154]:   Default Target Temperature High: 52.0°C
[19:28:20][C][dallas.sensor:070]: DallasComponent:
[19:28:20][C][dallas.sensor:071]:   Pin: GPIO5 (Mode: INPUT)
[19:28:20][C][dallas.sensor:072]:   Update Interval: 60.0s
[19:28:20][D][dallas.sensor:077]:   Found sensors:
[19:28:20][D][dallas.sensor:080]:     0x8502169177D30428
[19:28:20][C][dallas.sensor:085]:   Device 'Hot Water Temperature'
[19:28:20][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[19:28:20][C][dallas.sensor:085]:     Accuracy Decimals: 1
[19:28:20][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[19:28:20][C][dallas.sensor:087]:     Index 0
[19:28:20][C][dallas.sensor:093]:     Address: 0x8502169177D30428
[19:28:20][C][dallas.sensor:094]:     Resolution: 12
[19:28:20][C][web_server:122]: Web Server:
[19:28:20][C][web_server:123]:   Address: hw.local:80
[19:28:20][C][ota:029]: Over-The-Air Updates:
[19:28:20][C][ota:030]:   Address: hw.local:8266
[19:28:20][C][ota:032]:   Using Password.
[19:28:20][C][api:095]: API Server:
[19:28:20][C][api:096]:   Address: hw.local:6053
[19:28:20][C][sntp:043]: SNTP Time:
[19:28:20][C][sntp:044]:   Server 1: '0.pool.ntp.org'
[19:28:20][C][sntp:045]:   Server 2: '1.pool.ntp.org'
[19:28:20][C][sntp:046]:   Server 3: '2.pool.ntp.org'
[19:28:20][C][sntp:047]:   Timezone: 'GMT0BST,M3.5.0/1,M10.5.0'

Additional information and things you've tried:

spattinson commented 4 years ago

Please put this on hold while I find out whats wrong with my network. Its a weird issue other devices can connect with esp node, HA cannot.

spattinson commented 4 years ago

Network issue resolved. setting mode "heat" does not heat without constraints from the temperature sensor like it does in front end. I'm confused about how this should work. Setting mode=heat in esphome is not the same as setting mode=heat in front end. the mode=heat in esphome is heat/cool in front end and setting heat in frontend heats without constraints. There seems to be mismatch between the documentation and and what is displayed in frontend, there is no option for heat/cool that is accepted? happy to do more config changes and feed back, it may help with my understanding of how it should work. Thanks for the great work you all do on this its awesome!!!

spattinson commented 4 years ago

I'll do some more investigation and open a different ticket if needs be that more accurately describes issue.