My home automation runs fully on ESPeasy. It has lots of 6-way wallswitches (pushbuttons) which are connected through MCP23017 I²C port expanders to ESP32 boards. The ESP's run local rules to read buttonpresses and switch a teleruptor like this:
Code: Select all
on mcp#1 do
If [plugin#mcp#pinstate#1]=0 //button pressed
MCPLongPulse_mS,13,0,20 // switch teleruptor
endif
endon
So far I have take the following steps to reduce the load on the ESP's:
- disabled hardware serial
- set Serial Log Level to none
- set Web Log Level to Info
- ensure I²C runs at 400kHz
- init SPI is disabled
Other things that use CPU that I would rather not disable:
- OpenHAB MQTT controller
- NTP
The timing stats show that Loop has a duty cycle of 91% and an average cycle time of 7.502 ms. Load = 69.39% (LC=166)
Are there any further steps I can take to reduce the load on the ESP's? Or anything I can try to troubleshoot this and make buttonpresses more responsive?
Thanks in advance!
John