Coder Social home page Coder Social logo

brianhanifin / esphome-config Goto Github PK

View Code? Open in Web Editor NEW
109.0 109.0 19.0 294 KB

My ESPHome configuration files for my ESP8266 / ESP32 plugs and boards for use with Home Assistant.

C++ 0.43% HTML 99.57%
esphome-config esphomeyaml-config home-assistant homeassistant

esphome-config's People

Contributors

brianhanifin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esphome-config's Issues

Choose week days for watering.

Based on seasons and location is often better to water deeply a few days a week so you would encourage deep roots.
If we water too frequently it favors shallow roots, multiplication of pests (mosquitoes or bugs which eat roots) and development of moss which suffocates the grass.
It would be nice if we can choose the days of the week when the sprinklers would run.

Infinite zone runtime after reboot of irrigation controller

I thought it would be best to make a new thread, to keep things separated. The irrigation controller shows some weird behaviour after a reset. If a zone was running during shutdown with a remaining time of let's say 5 minutes, those 5 minutes end up to be more then a million after a reboot.

Here I have two logs. First a log where a 5 min run is initiated by the schedule:

[20:46:05][I][logger:170]: Log initialized
[20:46:05][I][app:029]: Running through setup()...
[20:46:05][C][switch.gpio:011]: Setting up GPIO Switch 'relay1'...
[20:46:05][D][switch:025]: 'relay1' Turning OFF.
[20:46:05][D][switch:045]: 'relay1': Sending state OFF
[20:46:05][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 0.00000 minutes with 0 decimals of accuracy
[20:46:05][D][text_sensor:015]: 'Irrigation Indoor Zone1 Next': Sending state ''
[20:46:05][D][switch:025]: 'relay1' Turning OFF.
[20:46:05][C][switch.gpio:011]: Setting up GPIO Switch 'relay2'...
[20:46:05][D][switch:025]: 'relay2' Turning OFF.
[20:46:05][D][switch:045]: 'relay2': Sending state OFF
[20:46:05][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 0.00000 minutes with 0 decimals of accuracy
[20:46:05][D][text_sensor:015]: 'Irrigation Indoor Zone2 Next': Sending state ''
[20:46:05][D][switch:025]: 'relay2' Turning OFF.
[20:46:05][C][light:097]: Setting up light 'status_led'...
[20:46:05][D][light:275]: 'status_led' Setting:
[20:46:05][D][light:284]:   State: ON
[20:46:05][D][light:288]:   Brightness: 50%
[20:46:05][D][binary_sensor:034]: 'Irrigation Indoor Controller Status': Sending initial state OFF
[20:46:05][C][ds1307:013]: Setting up DS1307...
[20:46:05][D][ds1307:088]: Read  18:46:06 2021-07-20  CH:OFF RS:3 SQWE:OFF OUT:OFF
[20:46:05][C][wifi:037]: Setting up WiFi...
[20:46:05][D][wifi:365]: Starting scan...
[20:46:05][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 0.00000 minutes with 0 decimals of accuracy
[20:46:05][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 0.00000 minutes with 0 decimals of accuracy
[20:46:05][D][sensor:117]: 'Irrigation Indoor Controller Uptime': Sending state 0.00000 h with 0 decimals of accuracy
[20:46:05][D][binary_sensor:034]: 'key2': Sending initial state OFF
[20:46:05][D][binary_sensor:034]: 'key1': Sending initial state OFF
[20:46:05][D][switch:045]: 'Irrigation Indoor Zone1': Sending state OFF
[20:46:05][D][switch:045]: 'Irrigation Indoor Zone2': Sending state OFF
[20:46:07][D][wifi:380]: Found networks:
[20:46:08][I][wifi:498]: WiFi Connected!
[20:46:08][C][wifi:344]:   SSID:
[20:46:08][C][ota:029]: Over-The-Air Updates:
[20:46:08][C][api:022]: Setting up Home Assistant API server...
[20:46:08][D][ds1307:088]: Read  18:46:09 2021-07-20  CH:OFF RS:3 SQWE:OFF OUT:OFF
[20:46:08][D][time:040]: Synchronized time: Tue Jul 20 20:46:09 2021
[20:46:08][D][light:275]: 'status_led' Setting:
[20:46:08][D][light:288]:   Brightness: 50%
[20:46:08][D][light:314]:   Transition Length: 1.0s
[20:46:08][I][app:059]: setup() finished successfully!
[20:46:08][D][sensor:117]: 'Irrigation Indoor Controller WiFi Signal': Sending state -65.00000 dBm with 0 decimals of accuracy
[20:46:08][I][app:105]: ESPHome version 1.19.4 compiled on Jul 20 2021, 20:27:19
[20:46:08][C][wifi:484]: WiFi:
[20:46:08][C][i2c:028]: I2C Bus:
[20:46:08][C][i2c:029]:   SDA Pin: GPIO21
[20:46:08][C][i2c:030]:   SCL Pin: GPIO22
[20:46:08][C][i2c:031]:   Frequency: 50000 Hz
[20:46:08][I][i2c:033]: Scanning i2c bus for active devices...
[20:46:08][I][i2c:040]: Found i2c device at address 0x68
[20:46:08][C][ledc.output:032]: LEDC Output:
[20:46:08][C][ledc.output:033]:   Pin GPIO5 (Mode: OUTPUT)
[20:46:08][C][ledc.output:034]:   LEDC Channel: 0
[20:46:08][C][ledc.output:035]:   Frequency: 1000.0 Hz
[20:46:08][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'key1'
[20:46:08][C][gpio.binary_sensor:016]:   Pin: GPIO13 (Mode: INPUT_PULLUP, INVERTED)
[20:46:08][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'key2'
[20:46:08][C][gpio.binary_sensor:016]:   Pin: GPIO14 (Mode: INPUT_PULLUP, INVERTED)
[20:46:08][C][template.switch:058]: Template Switch 'Irrigation Indoor Zone1'
[20:46:08][C][template.switch:059]:   Restore State: NO
[20:46:08][C][template.switch:060]:   Optimistic: YES
[20:46:08][C][template.switch:058]: Template Switch 'Irrigation Indoor Zone2'
[20:46:08][C][template.switch:059]:   Restore State: NO
[20:46:08][C][template.switch:060]:   Optimistic: YES
[20:46:08][C][switch.gpio:048]: GPIO Switch 'relay1'
[20:46:08][C][switch.gpio:049]:   Pin: GPIO23 (Mode: OUTPUT)
[20:46:08][C][switch.gpio:071]:   Restore Mode: Restore (Defaults to OFF)
[20:46:08][C][switch.gpio:048]: GPIO Switch 'relay2'
[20:46:08][C][switch.gpio:049]:   Pin: GPIO19 (Mode: OUTPUT)
[20:46:08][C][switch.gpio:071]:   Restore Mode: Restore (Defaults to OFF)
[20:46:08][C][uptime.sensor:030]: Uptime Sensor 'Irrigation Indoor Controller Uptime'
[20:46:08][C][uptime.sensor:030]:   State Class: ''
[20:46:08][C][uptime.sensor:030]:   Unit of Measurement: 'h'
[20:46:08][C][uptime.sensor:030]:   Accuracy Decimals: 0
[20:46:08][C][uptime.sensor:030]:   Icon: 'mdi:timer-outline'
[20:46:08][C][template.sensor:021]: Template Sensor 'Irrigation Indoor Zone1 Duration'
[20:46:08][C][template.sensor:021]:   State Class: ''
[20:46:08][C][template.sensor:021]:   Unit of Measurement: ''
[20:46:08][C][template.sensor:021]:   Accuracy Decimals: 1
[20:46:08][C][template.sensor:022]:   Update Interval: 60.0s
[20:46:08][C][template.sensor:021]: Template Sensor 'Irrigation Indoor Zone2 Duration'
[20:46:08][C][template.sensor:021]:   State Class: ''
[20:46:08][C][template.sensor:021]:   Unit of Measurement: ''
[20:46:09][C][template.sensor:021]:   Accuracy Decimals: 1
[20:46:09][C][template.sensor:022]:   Update Interval: 60.0s
[20:46:09][C][template.sensor:021]: Template Sensor 'Irrigation Indoor Zone1 Remaining'
[20:46:09][C][template.sensor:021]:   State Class: ''
[20:46:09][C][template.sensor:021]:   Unit of Measurement: 'minutes'
[20:46:09][C][template.sensor:021]:   Accuracy Decimals: 0
[20:46:09][C][template.sensor:021]:   Icon: 'mdi:timer-outline'
[20:46:09][C][template.sensor:022]:   Update Interval: 60.0s
[20:46:09][C][template.sensor:021]: Template Sensor 'Irrigation Indoor Zone2 Remaining'
[20:46:09][C][template.sensor:021]:   State Class: ''
[20:46:09][C][template.sensor:021]:   Unit of Measurement: 'minutes'
[20:46:09][C][template.sensor:021]:   Accuracy Decimals: 0
[20:46:09][C][template.sensor:021]:   Icon: 'mdi:timer-outline'
[20:46:09][C][template.sensor:022]:   Update Interval: 60.0s
[20:46:09][C][template.text_sensor:020]: Template Sensor 'Irrigation Indoor Zone1 Times'
[20:46:09][C][template.text_sensor:020]: Template Sensor 'Irrigation Indoor Zone2 Times'
[20:46:09][C][template.text_sensor:020]: Template Sensor 'Irrigation Indoor Zone1 Next'
[20:46:09][C][template.text_sensor:020]: Template Sensor 'Irrigation Indoor Zone2 Next'
[20:46:09][D][binary_sensor:036]: 'Irrigation Indoor Controller Status': Sending state ON
[20:46:09][D][api.connection:630]: Client 'Home Assistant 2021.7.3 ()' connected successfully!
[20:46:09][D][time:040]: Synchronized time: Tue Jul 20 20:46:11 2021
[20:46:09][D][ds1307:101]: Write 18:46:11 2021-07-20  CH:OFF RS:3 SQWE:OFF OUT:OFF
[20:46:09][C][logger:189]: Logger:
[20:46:09][C][logger:190]:   Level: DEBUG
[20:46:09][C][logger:191]:   Log Baud Rate: 115200
[20:46:09][C][logger:192]:   Hardware UART: UART0
[20:46:09][C][light:188]: Light 'status_led'
[20:46:09][C][light:190]:   Default Transition Length: 1.0s
[20:46:09][C][light:191]:   Gamma Correct: 2.80
[20:46:09][C][status:034]: Status Binary Sensor 'Irrigation Indoor Controller Status'
[20:46:09][C][status:034]:   Device Class: 'connectivity'
[20:46:09][C][ds1307:022]: DS1307:
[20:46:09][C][ds1307:023]:   Address: 0x68
[20:46:09][C][ds1307:027]:   Timezone: 'CET-1CEST-2,M3.4.0/2,M10.5.0/3'
[20:46:09][C][homeassistant.time:010]: Home Assistant Time:
[20:46:09][C][homeassistant.time:011]:   Timezone: 'CET-1CEST-2,M3.4.0/2,M10.5.0/3'
[20:46:09][C][ota:029]: Over-The-Air Updates:
[20:46:09][C][ota:030]:   Address: 
[20:46:09][C][ota:032]:   Using Password.
[20:46:09][C][api:095]: API Server:
[20:46:09][C][api:096]:   Address: 
[20:46:09][C][wifi_signal.sensor:009]: WiFi Signal 'Irrigation Indoor Controller WiFi Signal'
[20:46:09][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[20:46:09][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[20:46:09][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[20:46:09][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[20:46:09][C][homeassistant.sensor:029]: Homeassistant Sensor 'ui_ind_zone1_duration'
[20:46:09][C][homeassistant.sensor:029]:   State Class: ''
[20:46:09][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[20:46:09][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[20:46:09][C][homeassistant.sensor:030]:   Entity ID: 'input_number.irrigation_ind_zone1_duration'
[20:46:09][C][homeassistant.sensor:029]: Homeassistant Sensor 'ui_ind_zone2_duration'
[20:46:09][C][homeassistant.sensor:029]:   State Class: ''
[20:46:09][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[20:46:09][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[20:46:09][C][homeassistant.sensor:030]:   Entity ID: 'input_number.irrigation_ind_zone2_duration'
[20:46:09][C][homeassistant.text_sensor:022]: Homeassistant Text Sensor 'ui_ind_zone1_times'
[20:46:09][C][homeassistant.text_sensor:023]:   Entity ID: 'input_text.irrigation_ind_zone1_times'
[20:46:09][C][homeassistant.text_sensor:022]: Homeassistant Text Sensor 'ui_ind_zone2_times'
[20:46:09][C][homeassistant.text_sensor:023]:   Entity ID: 'input_text.irrigation_ind_zone2_times'
[20:46:10][D][homeassistant.sensor:023]: 'input_number.irrigation_ind_zone1_duration': Got state 5.00
[20:46:10][D][sensor:117]: 'ui_ind_zone1_duration': Sending state 5.00000  with 1 decimals of accuracy
[20:46:10][D][sensor:117]: 'Irrigation Indoor Zone1 Duration': Sending state 5.00000  with 1 decimals of accuracy
[20:46:10][D][homeassistant.sensor:023]: 'input_number.irrigation_ind_zone2_duration': Got state 5.00
[20:46:10][D][sensor:117]: 'ui_ind_zone2_duration': Sending state 5.00000  with 1 decimals of accuracy
[20:46:10][D][sensor:117]: 'Irrigation Indoor Zone2 Duration': Sending state 5.00000  with 1 decimals of accuracy
[20:46:10][D][homeassistant.text_sensor:016]: 'input_text.irrigation_ind_zone1_times': Got state '20:47'
[20:46:10][D][text_sensor:015]: 'ui_ind_zone1_times': Sending state '20:47'
[20:46:10][D][text_sensor:015]: 'Irrigation Indoor Zone1 Times': Sending state '20:47'
[20:46:10][D][text_sensor:015]: 'Irrigation Indoor Zone1 Next': Sending state '20:47'
[20:46:10][D][homeassistant.text_sensor:016]: 'input_text.irrigation_ind_zone2_times': Got state '20:47'
[20:46:10][D][text_sensor:015]: 'ui_ind_zone2_times': Sending state '20:47'
[20:46:10][D][text_sensor:015]: 'Irrigation Indoor Zone2 Times': Sending state '20:47'
[20:46:10][D][text_sensor:015]: 'Irrigation Indoor Zone2 Next': Sending state '20:47'
[20:46:23][D][main:776]: Irrigation Indoor Controller is connected to the Home Assistant API!
[20:46:23][D][light:275]: 'status_led' Setting:
[20:46:23][D][light:288]:   Brightness: 100%
[20:46:23][D][light:314]:   Transition Length: 1.0s
[20:46:23][D][light:275]: 'status_led' Setting:
[20:46:23][D][light:284]:   State: OFF
[20:46:23][D][light:314]:   Transition Length: 1.0s
[20:46:24][D][light:275]: 'status_led' Setting:
[20:46:24][D][light:284]:   State: ON
[20:46:24][D][light:288]:   Brightness: 100%
[20:46:24][D][light:314]:   Transition Length: 1.0s
[20:46:24][D][light:275]: 'status_led' Setting:
[20:46:24][D][light:284]:   State: OFF
[20:46:24][D][light:314]:   Transition Length: 1.0s
[20:46:25][D][light:275]: 'status_led' Setting:
[20:46:25][D][light:284]:   State: ON
[20:46:25][D][light:288]:   Brightness: 100%
[20:46:25][D][light:314]:   Transition Length: 1.0s
[20:46:25][D][light:275]: 'status_led' Setting:
[20:46:25][D][light:284]:   State: OFF
[20:46:25][D][light:314]:   Transition Length: 1.0s
[20:46:26][D][light:275]: 'status_led' Setting:
[20:46:26][D][light:284]:   State: ON
[20:46:26][D][light:288]:   Brightness: 100%
[20:46:26][D][light:314]:   Transition Length: 1.0s
[20:46:26][D][sensor:117]: 'Irrigation Indoor Controller WiFi Signal': Sending state -66.00000 dBm with 0 decimals of accuracy
[20:46:49][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 0.00000 minutes with 0 decimals of accuracy
[20:46:50][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 0.00000 minutes with 0 decimals of accuracy
[20:46:56][D][sensor:117]: 'Irrigation Indoor Controller WiFi Signal': Sending state -67.00000 dBm with 0 decimals of accuracy
[20:47:00][D][switch:021]: 'relay1' Turning ON.
[20:47:00][D][switch:045]: 'relay1': Sending state ON
[20:47:00][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:00][D][text_sensor:015]: 'Irrigation Indoor Zone1 Next': Sending state 'now'
[20:47:00][D][switch:045]: 'Irrigation Indoor Zone1': Sending state ON
[20:47:00][D][switch:021]: 'relay2' Turning ON.
[20:47:00][D][switch:045]: 'relay2': Sending state ON
[20:47:00][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:01][D][text_sensor:015]: 'Irrigation Indoor Zone2 Next': Sending state 'now'
[20:47:01][D][switch:045]: 'Irrigation Indoor Zone2': Sending state ON
[20:47:03][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:03][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:08][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:08][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:13][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:13][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:18][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:18][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 5.00000 minutes with 0 decimals of accuracy
[20:47:21]ets Jun  8 2016 00:22:57
[20:47:21]

Then I push the reset button (or unplug the power and plug it back in, it doesn't matter) As you will see, the 'remaining time' values will sky-rocket right away.

[20:47:21]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[20:47:21][I][app:029]: Running through setup()...
[20:47:21][C][switch.gpio:011]: Setting up GPIO Switch 'relay1'...
[20:47:21][D][switch:021]: 'relay1' Turning ON.
[20:47:21][D][switch:045]: 'relay1': Sending state ON
[20:47:21][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state nan minutes with 0 decimals of accuracy
[20:47:21][D][text_sensor:015]: 'Irrigation Indoor Zone1 Next': Sending state 'now'
[20:47:21][D][switch:021]: 'relay1' Turning ON.
[20:47:21][C][switch.gpio:011]: Setting up GPIO Switch 'relay2'...
[20:47:21][D][switch:021]: 'relay2' Turning ON.
[20:47:21][D][switch:045]: 'relay2': Sending state ON
[20:47:21][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state nan minutes with 0 decimals of accuracy
[20:47:21][D][text_sensor:015]: 'Irrigation Indoor Zone2 Next': Sending state 'now'
[20:47:21][D][switch:021]: 'relay2' Turning ON.
[20:47:22][C][light:097]: Setting up light 'status_led'...
[20:47:22][D][light:275]: 'status_led' Setting:
[20:47:22][D][light:284]:   State: ON
[20:47:22][D][light:288]:   Brightness: 100%
[20:47:22][D][binary_sensor:034]: 'Irrigation Indoor Controller Status': Sending initial state OFF
[20:47:22][C][ds1307:013]: Setting up DS1307...
[20:47:22][D][ds1307:088]: Read  18:47:23 2021-07-20  CH:OFF RS:3 SQWE:OFF OUT:OFF
[20:47:22][C][wifi:037]: Setting up WiFi...
[20:47:22][D][wifi:365]: Starting scan...
[20:47:22][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 0.00000 minutes with 0 decimals of accuracy
[20:47:22][D][sensor:117]: 'Irrigation Indoor Controller Uptime': Sending state 0.00000 h with 0 decimals of accuracy
[20:47:22][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 35791396.00000 minutes with 0 decimals of accuracy
[20:47:22][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 35791396.00000 minutes with 0 decimals of accuracy
[20:47:22][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 0.00000 minutes with 0 decimals of accuracy
[20:47:22][D][binary_sensor:034]: 'key1': Sending initial state OFF
[20:47:22][D][binary_sensor:034]: 'key2': Sending initial state OFF
[20:47:22][D][switch:045]: 'Irrigation Indoor Zone1': Sending state ON
[20:47:22][D][switch:045]: 'Irrigation Indoor Zone2': Sending state ON
[20:47:24][D][wifi:380]: Found networks:
[20:47:24][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 35791392.00000 minutes with 0 decimals of accuracy
[20:47:24][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 35791392.00000 minutes with 0 decimals of accuracy
[20:47:25][I][wifi:498]: WiFi Connected!
[20:47:25][C][wifi:344]:   SSID: '
[20:47:25][C][ota:029]: Over-The-Air Updates:
[20:47:25][C][ota:032]:   Using Password.
[20:47:25][C][api:022]: Setting up Home Assistant API server...
[20:47:25][D][ds1307:088]: Read  18:47:26 2021-07-20  CH:OFF RS:3 SQWE:OFF OUT:OFF
[20:47:25][D][time:040]: Synchronized time: Tue Jul 20 20:47:26 2021
[20:47:25][D][light:275]: 'status_led' Setting:
[20:47:25][D][light:288]:   Brightness: 50%
[20:47:25][D][light:314]:   Transition Length: 1.0s
[20:47:25][I][app:059]: setup() finished successfully!
[20:47:25][D][sensor:117]: 'Irrigation Indoor Controller WiFi Signal': Sending state -61.00000 dBm with 0 decimals of accuracy
[20:47:25][I][app:105]: ESPHome version 1.19.4 compiled on Jul 20 2021, 20:27:19
[20:47:25][C][wifi:484]: WiFi:
[20:47:25][C][wifi:344]:   SSID: '
[20:47:25][C][i2c:028]: I2C Bus:
[20:47:25][C][i2c:029]:   SDA Pin: GPIO21
[20:47:25][C][i2c:030]:   SCL Pin: GPIO22
[20:47:25][C][i2c:031]:   Frequency: 50000 Hz
[20:47:25][I][i2c:033]: Scanning i2c bus for active devices...
[20:47:25][I][i2c:040]: Found i2c device at address 0x68
[20:47:25][C][ledc.output:032]: LEDC Output:
[20:47:25][C][ledc.output:033]:   Pin GPIO5 (Mode: OUTPUT)
[20:47:25][C][ledc.output:034]:   LEDC Channel: 0
[20:47:25][C][ledc.output:035]:   Frequency: 1000.0 Hz
[20:47:25][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'key1'
[20:47:25][C][gpio.binary_sensor:016]:   Pin: GPIO13 (Mode: INPUT_PULLUP, INVERTED)
[20:47:25][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'key2'
[20:47:25][C][gpio.binary_sensor:016]:   Pin: GPIO14 (Mode: INPUT_PULLUP, INVERTED)
[20:47:25][C][template.switch:058]: Template Switch 'Irrigation Indoor Zone1'
[20:47:25][C][template.switch:059]:   Restore State: NO
[20:47:25][C][template.switch:060]:   Optimistic: YES
[20:47:25][C][template.switch:058]: Template Switch 'Irrigation Indoor Zone2'
[20:47:25][C][template.switch:059]:   Restore State: NO
[20:47:25][C][template.switch:060]:   Optimistic: YES
[20:47:25][C][switch.gpio:048]: GPIO Switch 'relay1'
[20:47:25][C][switch.gpio:049]:   Pin: GPIO23 (Mode: OUTPUT)
[20:47:25][C][switch.gpio:071]:   Restore Mode: Restore (Defaults to OFF)
[20:47:25][C][switch.gpio:048]: GPIO Switch 'relay2'
[20:47:25][C][switch.gpio:049]:   Pin: GPIO19 (Mode: OUTPUT)
[20:47:25][C][switch.gpio:071]:   Restore Mode: Restore (Defaults to OFF)
[20:47:25][C][uptime.sensor:030]: Uptime Sensor 'Irrigation Indoor Controller Uptime'
[20:47:25][C][uptime.sensor:030]:   State Class: ''
[20:47:25][C][uptime.sensor:030]:   Unit of Measurement: 'h'
[20:47:25][C][uptime.sensor:030]:   Accuracy Decimals: 0
[20:47:25][C][uptime.sensor:030]:   Icon: 'mdi:timer-outline'
[20:47:25][C][template.sensor:021]: Template Sensor 'Irrigation Indoor Zone1 Duration'
[20:47:25][C][template.sensor:021]:   State Class: ''
[20:47:25][C][template.sensor:021]:   Unit of Measurement: ''
[20:47:25][C][template.sensor:021]:   Accuracy Decimals: 1
[20:47:25][C][template.sensor:022]:   Update Interval: 60.0s
[20:47:25][C][template.sensor:021]: Template Sensor 'Irrigation Indoor Zone2 Duration'
[20:47:25][C][template.sensor:021]:   State Class: ''
[20:47:25][C][template.sensor:021]:   Unit of Measurement: ''
[20:47:25][C][template.sensor:021]:   Accuracy Decimals: 1
[20:47:25][C][template.sensor:022]:   Update Interval: 60.0s
[20:47:25][C][template.sensor:021]: Template Sensor 'Irrigation Indoor Zone1 Remaining'
[20:47:25][C][template.sensor:021]:   State Class: ''
[20:47:25][C][template.sensor:021]:   Unit of Measurement: 'minutes'
[20:47:25][C][template.sensor:021]:   Accuracy Decimals: 0
[20:47:25][C][template.sensor:021]:   Icon: 'mdi:timer-outline'
[20:47:25][C][template.sensor:022]:   Update Interval: 60.0s
[20:47:25][C][template.sensor:021]: Template Sensor 'Irrigation Indoor Zone2 Remaining'
[20:47:25][C][template.sensor:021]:   State Class: ''
[20:47:25][C][template.sensor:021]:   Unit of Measurement: 'minutes'
[20:47:25][C][template.sensor:021]:   Accuracy Decimals: 0
[20:47:25][C][template.sensor:021]:   Icon: 'mdi:timer-outline'
[20:47:25][C][template.sensor:022]:   Update Interval: 60.0s
[20:47:26][C][template.text_sensor:020]: Template Sensor 'Irrigation Indoor Zone1 Times'
[20:47:26][C][template.text_sensor:020]: Template Sensor 'Irrigation Indoor Zone2 Times'
[20:47:26][C][template.text_sensor:020]: Template Sensor 'Irrigation Indoor Zone1 Next'
[20:47:26][C][template.text_sensor:020]: Template Sensor 'Irrigation Indoor Zone2 Next'
[20:47:26][C][logger:189]: Logger:
[20:47:26][C][logger:190]:   Level: DEBUG
[20:47:26][C][logger:191]:   Log Baud Rate: 115200
[20:47:26][C][logger:192]:   Hardware UART: UART0
[20:47:26][C][light:188]: Light 'status_led'
[20:47:26][C][light:190]:   Default Transition Length: 1.0s
[20:47:26][C][light:191]:   Gamma Correct: 2.80
[20:47:26][C][status:034]: Status Binary Sensor 'Irrigation Indoor Controller Status'
[20:47:26][C][status:034]:   Device Class: 'connectivity'
[20:47:26][C][ds1307:022]: DS1307:
[20:47:26][C][ds1307:023]:   Address: 0x68
[20:47:26][C][ds1307:027]:   Timezone: 'CET-1CEST-2,M3.4.0/2,M10.5.0/3'
[20:47:26][C][homeassistant.time:010]: Home Assistant Time:
[20:47:26][C][homeassistant.time:011]:   Timezone: 'CET-1CEST-2,M3.4.0/2,M10.5.0/3'
[20:47:26][C][ota:029]: Over-The-Air Updates:
[20:47:26][C][ota:032]:   Using Password.
[20:47:26][C][api:095]: API Server:
[20:47:26][C][wifi_signal.sensor:009]: WiFi Signal 'Irrigation Indoor Controller WiFi Signal'
[20:47:26][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[20:47:26][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[20:47:26][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[20:47:26][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[20:47:26][C][homeassistant.sensor:029]: Homeassistant Sensor 'ui_ind_zone1_duration'
[20:47:26][C][homeassistant.sensor:029]:   State Class: ''
[20:47:26][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[20:47:26][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[20:47:26][C][homeassistant.sensor:030]:   Entity ID: 'input_number.irrigation_ind_zone1_duration'
[20:47:26][C][homeassistant.sensor:029]: Homeassistant Sensor 'ui_ind_zone2_duration'
[20:47:26][C][homeassistant.sensor:029]:   State Class: ''
[20:47:26][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[20:47:26][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[20:47:26][C][homeassistant.sensor:030]:   Entity ID: 'input_number.irrigation_ind_zone2_duration'
[20:47:26][C][homeassistant.text_sensor:022]: Homeassistant Text Sensor 'ui_ind_zone1_times'
[20:47:26][C][homeassistant.text_sensor:023]:   Entity ID: 'input_text.irrigation_ind_zone1_times'
[20:47:26][C][homeassistant.text_sensor:022]: Homeassistant Text Sensor 'ui_ind_zone2_times'
[20:47:26][C][homeassistant.text_sensor:023]:   Entity ID: 'input_text.irrigation_ind_zone2_times'
[20:47:27][D][binary_sensor:036]: 'Irrigation Indoor Controller Status': Sending state ON
[20:47:27][D][api.connection:630]: Client 'Home Assistant 2021.7.3  connected successfully!
[20:47:27][D][time:040]: Synchronized time: Tue Jul 20 20:47:29 2021
[20:47:27][D][ds1307:101]: Write 18:47:29 2021-07-20  CH:OFF RS:3 SQWE:OFF OUT:OFF
[20:47:27][D][homeassistant.sensor:023]: 'input_number.irrigation_ind_zone1_duration': Got state 5.00
[20:47:27][D][sensor:117]: 'ui_ind_zone1_duration': Sending state 5.00000  with 1 decimals of accuracy
[20:47:27][D][sensor:117]: 'Irrigation Indoor Zone1 Duration': Sending state 5.00000  with 1 decimals of accuracy
[20:47:27][D][homeassistant.sensor:023]: 'input_number.irrigation_ind_zone2_duration': Got state 5.00
[20:47:27][D][sensor:117]: 'ui_ind_zone2_duration': Sending state 5.00000  with 1 decimals of accuracy
[20:47:27][D][sensor:117]: 'Irrigation Indoor Zone2 Duration': Sending state 5.00000  with 1 decimals of accuracy
[20:47:27][D][homeassistant.text_sensor:016]: 'input_text.irrigation_ind_zone1_times': Got state '20:47'
[20:47:27][D][text_sensor:015]: 'ui_ind_zone1_times': Sending state '20:47'
[20:47:27][D][text_sensor:015]: 'Irrigation Indoor Zone1 Times': Sending state '20:47'
[20:47:27][D][text_sensor:015]: 'Irrigation Indoor Zone1 Next': Sending state '20:47'
[20:47:27][D][homeassistant.text_sensor:016]: 'input_text.irrigation_ind_zone2_times': Got state '20:47'
[20:47:27][D][text_sensor:015]: 'ui_ind_zone2_times': Sending state '20:47'
[20:47:27][D][text_sensor:015]: 'Irrigation Indoor Zone2 Times': Sending state '20:47'
[20:47:27][D][text_sensor:015]: 'Irrigation Indoor Zone2 Next': Sending state '20:47'
[20:47:29][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 35791392.00000 minutes with 0 decimals of accuracy
[20:47:29][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 35791392.00000 minutes with 0 decimals of accuracy
[20:47:34][D][sensor:117]: 'Irrigation Indoor Zone1 Remaining': Sending state 35791392.00000 minutes with 0 decimals of accuracy
[20:47:34][D][sensor:117]: 'Irrigation Indoor Zone2 Remaining': Sending state 35791392.00000 minutes with 0 decimals of accuracy
Serial port closed!

Is this expected behaviour? I know i changed the IDs in your original configuration and added a DS1307, but it also shows this behaviour when I upload the unchanged config to ESPhome.

I found a temporary solution by adding the following lines as a sanity check in the on_time loop, but it's an ugly solution:

              if (id(remaining_time1) > 100) {
                id(remaining_time1_previous) = 0;
                id(remaining_time1) = 0;
              }
              if (id(remaining_time2) > 100) {
                id(remaining_time2_previous) = 0;
                id(remaining_time2) = 0;
              }

Do you have any clue?

Compile issues with esphome 2022.2.1

Trying to compile this code in the latest esphome produces some errors such as these:

src/irrigation.h: In function 'bool scheduled_runtime(std::string)':
src/irrigation.h:10:22: error: 'homeassistant_time' was not declared in this scope
   10 |   auto time_now = id(homeassistant_time).now();
      |                      ^~~~~~~~~~~~~~~~~~
src/irrigation.h: In function 'std::string update_next_runtime(std::string)':
src/irrigation.h:41:22: error: 'homeassistant_time' was not declared in this scope
   41 |   auto time_now = id(homeassistant_time).now();
      |                      ^~~~~~~~~~~~~~~~~~
Compiling /data/sandbox/.pioenvs/sandbox/FrameworkArduino/Esp-version.cpp.o
*** [/data/sandbox/.pioenvs/sandbox/src/main.cpp.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.