Hello
After i updated the esp home to version 2.0 i cant compilel eny more and the eror is maximum recursion depth exceeded .
I use esphome add on with last version of ha os vers. 2024.2.0 .
Thank you.
Hi without any more detail (yaml, logs) we can not help you.
2024-02-23 15:19:37,448 INFO 304 GET /static/images/logo-text.svg (0.0.0.0) 1.07ms
2024-02-23 15:19:37,490 INFO 304 GET /static/fonts/material-icons/MaterialIcons-Regular.woff2 (0.0.0.0) 1.02ms
2024-02-23 15:19:37,529 INFO 101 GET /compile (0.0.0.0) 0.77ms
2024-02-23 15:19:37,655 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/cazan.yaml’
2024-02-23 15:19:38,365 INFO Process exited with return code 1
2024-02-23 15:19:38,415 INFO 101 GET /compile (0.0.0.0) 0.37ms
2024-02-23 15:19:38,463 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/irrigation-advanced.yaml’
2024-02-23 15:19:39,174 INFO Process exited with return code 1
2024-02-23 15:19:39,205 INFO 101 GET /compile (0.0.0.0) 0.39ms
2024-02-23 15:19:39,216 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/irrigation.yaml’
2024-02-23 15:19:39,929 INFO Process exited with return code 1
2024-02-23 15:19:39,956 INFO 101 GET /compile (0.0.0.0) 0.40ms
2024-02-23 15:19:39,972 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/sprinkler.yaml’
2024-02-23 15:19:40,710 INFO Process exited with return code 1
2024-02-23 15:19:40,753 INFO 101 GET /compile (0.0.0.0) 0.40ms
2024-02-23 15:19:40,762 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/test-sprinkler.yaml’
2024-02-23 15:19:41,451 INFO Process exited with return code 1
2024-02-23 15:19:42,442 INFO 304 GET /devices (0.0.0.0) 1.39ms
2024-02-23 15:19:47,434 INFO 304 GET /devices (0.0.0.0) 1.81ms
2024-02-23 15:19:52,465 INFO 304 GET /devices (0.0.0.0) 1.82ms
2024-02-23 15:19:56,586 INFO 200 GET /static/js/esphome/c.L2HzI1eb.js (0.0.0.0) 50.13ms
2024-02-23 15:19:56,590 INFO 200 GET /edit?configuration=cazan.yaml (0.0.0.0) 1.79ms
2024-02-23 15:19:56,706 INFO 200 GET /static/js/esphome/monaco-editor/esm/vs/editor/editor.worker.js (0.0.0.0) 9.47ms
2024-02-23 15:19:56,710 INFO 101 GET /ace (0.0.0.0) 1.14ms
2024-02-23 15:19:56,802 INFO Running command ‘esphome --dashboard -q vscode --ace /config/esphome’
2024-02-23 15:19:57,564 INFO 200 GET /static/fonts/codicon.ttf (0.0.0.0) 136.14ms
2024-02-23 15:20:48,010 INFO 304 GET / (0.0.0.0) 1.02ms
2024-02-23 15:20:48,131 INFO 304 GET /devices (0.0.0.0) 2.53ms
2024-02-23 15:20:48,185 INFO 101 GET /compile (0.0.0.0) 0.75ms
2024-02-23 15:20:48,283 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/cazan.yaml’
2024-02-23 15:20:49,005 INFO Process exited with return code 1
2024-02-23 15:20:49,046 INFO 101 GET /compile (0.0.0.0) 0.37ms
2024-02-23 15:20:49,058 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/irrigation-advanced.yaml’
2024-02-23 15:20:49,776 INFO Process exited with return code 1
2024-02-23 15:20:49,826 INFO 101 GET /compile (0.0.0.0) 0.40ms
2024-02-23 15:20:49,832 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/irrigation.yaml’
2024-02-23 15:20:50,534 INFO Process exited with return code 1
2024-02-23 15:20:50,596 INFO 101 GET /compile (0.0.0.0) 0.35ms
2024-02-23 15:20:50,603 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/sprinkler.yaml’
2024-02-23 15:20:51,308 INFO Process exited with return code 1
2024-02-23 15:20:51,347 INFO 101 GET /compile (0.0.0.0) 0.41ms
2024-02-23 15:20:51,356 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/test-sprinkler.yaml’
2024-02-23 15:20:52,066 INFO Process exited with return code 1
2024-02-23 15:20:53,124 INFO 304 GET /devices (0.0.0.0) 1.74ms
2024-02-23 15:20:58,129 INFO 304 GET /devices (0.0.0.0) 2.20ms
2024-02-23 15:21:03,147 INFO 304 GET /devices (0.0.0.0) 2.12ms
2024-02-23 15:21:04,286 INFO 200 GET /static/js/esphome/c.RRHp3CCd.js (0.0.0.0) 1.85ms
2024-02-23 15:21:04,830 WARNING 422 GET /json-config?configuration=sprinkler.yaml (0.0.0.0) 504.69ms
2024-02-23 15:21:08,155 INFO 304 GET /devices (0.0.0.0) 1.94ms
2024-02-23 15:21:13,132 INFO 304 GET /devices (0.0.0.0) 1.82ms
2024-02-23 15:21:17,172 INFO 200 GET /edit?configuration=sprinkler.yaml (0.0.0.0) 1.94ms
2024-02-23 15:21:17,278 INFO 101 GET /ace (0.0.0.0) 0.80ms
2024-02-23 15:21:17,340 INFO Running command ‘esphome --dashboard -q vscode --ace /config/esphome’
2024-02-23 15:21:32,520 INFO 304 GET / (0.0.0.0) 1.07ms
2024-02-23 15:21:32,586 INFO 304 GET /devices (0.0.0.0) 1.40ms
2024-02-23 15:21:32,687 INFO 101 GET /compile (0.0.0.0) 0.77ms
2024-02-23 15:21:32,757 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/cazan.yaml’
2024-02-23 15:21:33,469 INFO Process exited with return code 1
2024-02-23 15:21:33,518 INFO 101 GET /compile (0.0.0.0) 0.38ms
2024-02-23 15:21:33,529 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/irrigation-advanced.yaml’
2024-02-23 15:21:34,264 INFO Process exited with return code 1
2024-02-23 15:21:34,322 INFO 101 GET /compile (0.0.0.0) 0.38ms
2024-02-23 15:21:34,354 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/irrigation.yaml’
2024-02-23 15:21:35,069 INFO Process exited with return code 1
2024-02-23 15:21:35,098 INFO 101 GET /compile (0.0.0.0) 0.44ms
2024-02-23 15:21:35,108 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/sprinkler.yaml’
2024-02-23 15:21:35,812 INFO Process exited with return code 1
2024-02-23 15:21:35,842 INFO 101 GET /compile (0.0.0.0) 0.36ms
2024-02-23 15:21:35,849 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/test-sprinkler.yaml’
2024-02-23 15:21:36,549 INFO Process exited with return code 1
2024-02-23 15:21:37,598 INFO 304 GET /devices (0.0.0.0) 1.35ms
2024-02-23 15:21:42,609 INFO 304 GET /devices (0.0.0.0) 2.56ms
2024-02-23 15:21:47,613 INFO 304 GET /devices (0.0.0.0) 1.90ms
2024-02-23 15:21:52,651 INFO 304 GET /devices (0.0.0.0) 2.25ms
2024-02-23 15:21:57,610 INFO 304 GET /devices (0.0.0.0) 1.91ms
2024-02-23 15:21:59,255 ERROR Uncaught exception GET /info?configuration=sprinkler.yaml (0.0.0.0)
HTTPServerRequest(protocol=‘http’, host=‘192.168.1.10:8123’, method=‘GET’, uri=‘/info?configuration=sprinkler.yaml’, version=‘HTTP/1.1’, remote_ip=‘0.0.0.0’)
Traceback (most recent call last):
File “/usr/local/lib/python3.11/dist-packages/tornado/web.py”, line 1790, in _execute
result = await result
12 Caret/chevron
File “/esphome/esphome/dashboard/web_server.py”, line 803, in get
self.write(entry.storage.to_json())
21 Caret/chevron
AttributeError: ‘NoneType’ object has no attribute ‘to_json’
2024-02-23 15:21:59,260 ERROR 500 GET /info?configuration=sprinkler.yaml (0.0.0.0) 5.35ms
2024-02-23 15:22:02,624 INFO 304 GET /devices (0.0.0.0) 1.98ms
2024-02-23 15:22:07,627 INFO 304 GET /devices (0.0.0.0) 1.84ms
2024-02-23 15:22:11,203 INFO 200 GET /static/js/esphome/c.J_GgTe55.js (0.0.0.0) 129.08ms
2024-02-23 15:22:11,260 INFO 101 GET /compile (0.0.0.0) 0.78ms
2024-02-23 15:22:11,264 INFO Running command ‘esphome --dashboard compile /config/esphome/sprinkler.yaml’
2024-02-23 15:22:11,985 INFO Process exited with return code 1
2024-02-23 15:22:22,813 INFO 200 GET /devices (0.0.0.0) 1.83ms
2024-02-23 15:22:48,037 INFO 304 GET /devices (0.0.0.0) 2.01ms
2024-02-23 15:27:22,814 INFO 200 GET /devices (0.0.0.0) 1.91ms
2024-02-23 15:30:12,226 INFO 304 GET /devices (0.0.0.0) 4.36ms
2024-02-23 15:30:16,946 INFO 304 GET /devices (0.0.0.0) 1.91ms
2024-02-23 15:30:21,948 INFO 304 GET /devices (0.0.0.0) 1.94ms
2024-02-23 15:30:26,948 INFO 304 GET /devices (0.0.0.0) 1.89ms
2024-02-23 15:30:31,957 INFO 304 GET /devices (0.0.0.0) 1.96ms
Based on ESPHome Sprinkler Controller - Sprinkler Controller — ESPHome
Change Log
2023 01 XX
Initial version
2023 04 09 V03
fix run duration to seconds
2023 04 22 V04
fix GPIO order to match relay 1- 4
added % at the lambda return for progress sensor return value
2023 04 25 V05
added nodemcu as sensor to display in HA ui
added includes for api key en ota password
2023 05 07 V06
added a NTC temp sensor to watch the enclosure temperature
2023 05 10 V07
addjusted settings reference voltage to adjust to actual temp (default 3.3)
Establish Substitutions
substitutions:
Modify only the following 6 lines.
zone_1_name: Sprinkler A
zone_2_name: Sprinkler B
zone_3_name: Drip Line A
zone_4_name: Drip Lane B
software_version: 2023 05 10 V07
sensor_update_frequency: 1s
log_level: debug # Enable levels logging Logger Component — ESPHome
none, error, warn, info, debug (default), verbose, very_verbose
##############################################
DO NOT CHANGE ANYTHING BELOW THIS LINE
##############################################
zone_1_valve_id: valve_0
zone_2_valve_id: valve_1
zone_3_valve_id: valve_2
zone_4_valve_id: valve_3
esphome_name: irrigation
esphome_platform: ESP8266
esphome_board: nodemcuv2
esphome_comment: Four Valve Irrigation Control
esphome_project_name: JAYA.Four Valve Irrigation Control
esphome_project_version: Irrigation Controller, $software_version
devicename: irrigation_controller
upper_devicename: “Irrigation Controller”
uom: Min # this overrides the uom in sprinkler → run_duration
#Define Project Deatils and ESP Board Type
esphome:
name: $esphome_name
platform: $esphome_platform
board: $esphome_board
comment: $esphome_comment
project:
name: $esphome_project_name
version: $esphome_project_version
on_boot:
priority: -100
then:
# Set default state for Valve Status
- text_sensor.template.publish:
id: valve_status
state: “Idle”
# Set multiplier to 60, convert seconds to minutes
- sprinkler.set_multiplier:
id: $devicename
multiplier: 60
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: “$esphome_name Fallback Hotspot”
password: !secret esphome_ap_password
logger:
level: ${log_level}
logs:
text_sensor: WARN
ota:
password: !secret esphome_ota_password
Enable Web server.
web_server:
port: 80
Sync time with Home Assistant.
time:
- platform: homeassistant
id: homeassistant_time
###############################################
Enable Home Assistant API
###############################################
api:
encryption:
key: !secret esphome_api_encrypt_key
reboot_timeout: 0s
###############################################
Binary Sensor.
###############################################
binary_sensor:
- platform: homeassistant
prevent deep sleep - Needs further investigation on usefullness
id: prevent_deep_sleep
name: “$upper_devicename Prevent Deep Sleep”
entity_id: input_boolean.prevent_deep_sleep
###############################################
Text sensors with general information.
###############################################
text_sensor:
- platform: version # Expose ESPHome version as sensor.
name: $esphome_name ESPHome Version
hide_timestamp: false - platform: wifi_info
ip_address:
name: “$esphome_name IP”
ssid:
name: “$esphome_name SSID”
bssid:
name: “$esphome_name BSSID”
Expose Time Remaining as a sensor.
- platform: template
id: time_remaining
name: $upper_devicename Time Remaining
update_interval: $sensor_update_frequency
icon: “mdi:timer-sand”
lambda: |-
int seconds = round(id($devicename).time_remaining_active_valve().value_or(0));
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return {
((days ? String(days) + "d " : “”) +
(hours ? String(hours) + "h " : “”) +
(minutes ? String(minutes) + "m " : “”) +
(String(seconds) + “s”)).c_str()};
Expose Progress Percent as a sensor.
- platform: template
id: progress_percent
name: $upper_devicename Progress %
update_interval: $sensor_update_frequency
icon: “mdi:progress-clock”
lambda: |-
int progress_percent = round(((id($devicename).valve_run_duration_adjusted(id($devicename).active_valve().value_or(0)) - id($devicename).time_remaining_active_valve().value_or(0)) * 100 / id($devicename).valve_run_duration_adjusted(id($devicename).active_valve().value_or(0))));
std::string progress_percent_as_string = std::to_string(progress_percent);
return progress_percent_as_string +“%”;
Expose Valve Status as a sensor.
-
platform: template
id: valve_status
name: $upper_devicename Status
update_interval: never
icon: “mdi:information-variant” -
platform: template # Expose the board type as a sensor
id: espboard_type
icon: “mdi:developer-board”
name: $esphome_name ESPBoard
lambda: |-
return to_string(“${esphome_board}”);
NodeMCU ESP8266 — ESPHome
Enable On-Board Status LED.
status_led:
pin:
# Pin D2 / GPIO4
number: GPIO04
inverted: false
sensor:
Uptime sensor.
- platform: uptime
name: $upper_devicename Uptime
WiFi Signal sensor.
- platform: wifi_signal
name: $upper_devicename WiFi Signal
update_interval: 60s
temperature sensor NTC Sensor — ESPHome using a switch every 1 minute. Pull Upp GPIO16 (3.3V). prevents self-heating NTC
- platform: ntc
sensor: resistance_sensor
name: $upper_devicename Temperature
calibration:
b_constant: 3950
reference_temperature: 25°C
reference_resistance: 10kOhm - platform: resistance
id: resistance_sensor
sensor: source_sensor
configuration: DOWNSTREAM
resistor: 10kOhm
name: Resistance Sensor
reference_voltage: 3.1V - platform: adc
pin: A0
id: source_sensorAdded:
update_interval: never
filters:- multiply: 3.3
interval:
- interval: 60s
then:- switch.turn_on: ntc_vcc
- component.update: source_sensor
- switch.turn_off: ntc_vcc
- logger.log: “Measure Temp”
###############################################
Configuration to set multiplier via number
###############################################
number:
- platform: template
id: $zone_1_valve_id
name: $zone_1_name
min_value: 1
max_value: 60
step: 1
unit_of_measurement: $uom
icon: “mdi:timer-outline”
mode: box # Defines how the number should be displayed in the UI
lambda: “return id($devicename).valve_run_duration(0);”
set_action:- sprinkler.set_valve_run_duration:
id: $devicename
valve_number: 0
run_duration: !lambda ‘return x;’
- sprinkler.set_valve_run_duration:
- platform: template
id: $zone_2_valve_id
name: $zone_2_name
min_value: 1
max_value: 60
step: 1
unit_of_measurement: $uom
icon: “mdi:timer-outline”
mode: box # Defines how the number should be displayed in the UI
lambda: “return id($devicename).valve_run_duration(1);”
set_action:- sprinkler.set_valve_run_duration:
id: $devicename
valve_number: 1
run_duration: !lambda ‘return x;’
- sprinkler.set_valve_run_duration:
- platform: template
id: $zone_3_valve_id
name: $zone_3_name
min_value: 1
max_value: 60
step: 1
unit_of_measurement: $uom
icon: “mdi:timer-outline”
mode: box # Defines how the number should be displayed in the UI
lambda: “return id($devicename).valve_run_duration(2);”
set_action:- sprinkler.set_valve_run_duration:
id: $devicename
valve_number: 2
run_duration: !lambda ‘return x;’
- sprinkler.set_valve_run_duration:
- platform: template
id: $zone_4_valve_id
name: $zone_4_name
min_value: 1
max_value: 60
step: 1
unit_of_measurement: $uom
icon: “mdi:timer-outline”
mode: box # Defines how the number should be displayed in the UI
lambda: “return id($devicename).valve_run_duration(3);”
set_action:- sprinkler.set_valve_run_duration:
id: $devicename
valve_number: 3
run_duration: !lambda ‘return x;’
- sprinkler.set_valve_run_duration:
###############################################
Main Sprinkler Controller
###############################################
sprinkler:
- id: $devicename
main_switch:
name: “Start/Stop/Resume”
id: main_switch
auto_advance_switch: “Auto Advance”
valve_open_delay: 2s
valves:- valve_switch: $zone_1_name
enable_switch: Enable $zone_1_name
run_duration: 20s
valve_switch_id: ${devicename}_1 - valve_switch: $zone_2_name
enable_switch: Enable $zone_2_name
run_duration: 20s
valve_switch_id: ${devicename}_2 - valve_switch: $zone_3_name
enable_switch: Enable $zone_3_name
run_duration: 15s
valve_switch_id: ${devicename}_3 - valve_switch: $zone_4_name
enable_switch: Enable $zone_4_name
run_duration: 15s
valve_switch_id: ${devicename}_4
- valve_switch: $zone_1_name
button:
- platform: template
id: sprinkler_pause
name: “Pause”
icon: “mdi:pause”
on_press:
then:
- text_sensor.template.publish:
id: valve_status
state: “Paused”
- sprinkler.pause: $devicename
####################################################
Switch Control to restart the irrigation system.
####################################################
switch:
- platform: restart
name: “Restart $devicename”
Switch for the NTC NTC Sensor — ESPHome, Prevent self heating by switching the voltage on a GPIO
- platform: gpio
pin:
number: GPIO5 #GPIO16 # Pin D0
inverted: false
id: ntc_vcc
####################################################
Hidden I/O Switches to control irrigation valve relays
####################################################
- platform: gpio
name: Relay Board Pin IN1
restore_mode: RESTORE_DEFAULT_OFF # Prevents GPIO pin from going high during boot
internal: true # Prevents GPIO switch NAME from showing up in Home Assistant
id: ${devicename}_1
on_turn_on:- text_sensor.template.publish:
id: valve_status
state: “$zone_1_name Active”
on_turn_off: - text_sensor.template.publish:
id: valve_status
state: “Idle”
pin: GPIO14 # D5
inverted: true
- text_sensor.template.publish:
- platform: gpio
name: Relay Board Pin IN2
restore_mode: RESTORE_DEFAULT_OFF # Prevents GPIO pin from going high during boot
internal: true # Prevents GPIO switch NAME from showing up in Home Assistant
id: ${devicename}_2
on_turn_on:- text_sensor.template.publish:
id: valve_status
state: “$zone_2_name Active”
on_turn_off: - text_sensor.template.publish:
id: valve_status
state: “Idle”
pin: GPIO12 # D6
inverted: true
- text_sensor.template.publish:
- platform: gpio
name: Relay Board Pin IN3
restore_mode: RESTORE_DEFAULT_OFF # Prevents GPIO pin from going high during boot
internal: true # Prevents GPIO switch NAME from showing up in Home Assistant
id: ${devicename}_3
on_turn_on:- text_sensor.template.publish:
id: valve_status
state: “$zone_3_name Active”
on_turn_off: - text_sensor.template.publish:
id: valve_status
state: “Idle”
pin: GPIO13 # D7
inverted: true
- text_sensor.template.publish:
- platform: gpio
name: Relay Board Pin IN4
restore_mode: RESTORE_DEFAULT_OFF # Prevents GPIO pin from going high during boot
internal: true # Prevents GPIO switch NAME from showing up in Home Assistant
id: ${devicename}_4
on_turn_on:- text_sensor.template.publish:
id: valve_status
state: “$zone_4_name Active”
on_turn_off: - text_sensor.template.publish:
id: valve_status
state: “Idle”
pin: GPIO15 # D8
inverted: true
- text_sensor.template.publish:
Above is the esp gome log file and the yaml file what i tried to compile .
Today i tried on my win. 10 lapton using python + esphome and i have the same issue.
Thanks for the help
Perfect! Last thing is the formatting, please try to get that right
.
You find a post in this forum on how to ask good questions and it describes how to use code tags!