In the demanding landscape of industrial automation, reliability and adaptability are the benchmarks of success. The StamPLC, anchored by the high-performance Stamp-S3A module, is a specialized IoT controller engineered to bridge the divide between professional-grade logic control and the flexibility of the smart home. By bringing the StamPLC into your Home Assistant ecosystem via ESPHome, you gain access to an enterprise-level automation suite for everything from remote telemetry to high-voltage AC management. This guide provides a comprehensive walkthrough of the deployment process, from initial flashing to the configuration of specialized PoE and AC expansion modules.
Preparations
o A Home Assistant host
o Install and enable the ESPHome Builder add-on in Home Assistant
Open ESPHome Builder in Home Assistant and create an empty configuration file:
o Click the NEW DEVICE button at the bottom right
o In the dialog click CONTINUE
o Select Empty Configuration

o (Optional) Give the file a name
o Click EDIT on the newly created configuration file

o Then copy the contents of configuration.yaml from the example repository into your config file:

Modify network or API information as needed. For example, create an API Encryption Key for authentication:
api:
encryption:
key: "Your_Encryption_Key"
You can also change the timezone setting, for example:
timezone: America/Los_Angeles # Pacific
# timezone: America/New_York # Eastern
After editing, click SAVE and then INSTALL, choose Manual download.

This will generate code and compile the project.
When the build finishes, select Factory format to download the firmware.

Upload firmware
Open ESPHome Web in your browser to upload the firmware.
Connect StamPLC to the host via USB-C, click CONNECT and select the device.
Click INSTALL, select the previously downloaded firmware, and click INSTALL again to flash the device.
After flashing completes the device will automatically reset and boot.

Add device to Home Assistant Integrations
When the device boots it will connect to the configured Wi‑Fi. Under Settings -> Devices & services you should see the device.

Click Add to add StamPLC to Home Assistant. If you set an API Encryption Key, you may need to enter it here.
Example StamPLC dashboards:


Live device in action:

Expansion
The StamPLC support expansion via 16 pin headers on the right side of the device.
StamPLC AC is an AC relay expansion module compatible with the StamPLC host. The module integrates AC load control and entire system power supply functions, effectively simplifying power wiring during application development. It features a contact-type relay (single-pole single-throw - normally open), supporting up to AC 240V@10A line switching. It also includes a built-in AC-DC isolated conversion circuit supporting AC 100 ~ 240V input, capable of simultaneously powering the relay load and providing a stepped-down DC 12V output for the main system. A programmable tri-color RGB LED is available for working status indication.
Configure the StamPLC AC
In addition to previous StamPLC configurations, several components are required
o Add a new IO Expander
pi4ioe5v6408:
- id: pi4ioe5v6408_1
address: 0x43
# Configuration of i2c GPIO Expander 2
# on the StamPLC AC expansion
- id: pi4ioe5v6408_2
address: 0x44
o Add a new switch for AC Relay
switch:
...
# led indicator on StamPLC AC expansion
- platform: gpio
restore_mode: ALWAYS_OFF
id: "ac_relay_led_red"
pin:
pi4ioe5v6408: pi4ioe5v6408_2
number: 5
inverted: true
mode:
output: true
- platform: gpio
restore_mode: ALWAYS_OFF
id: "ac_relay_led_green"
pin:
pi4ioe5v6408: pi4ioe5v6408_2
number: 6
inverted: true
mode:
output: true
- platform: gpio
restore_mode: ALWAYS_OFF
id: "ac_relay_led_blue"
pin:
pi4ioe5v6408: pi4ioe5v6408_2
number: 7
inverted: true
mode:
output: true
o UI Update the UI display
display:
...
lambda: |-
...
it.print(5, 80, id(font1), Color(orange), "Relays 1-4");
it.filled_rectangle(5, 99, 25, 25, id(r1).state ? id(red) : id(grey));
it.filled_rectangle(34, 99, 25, 25, id(r2).state ? id(red) : id(grey));
it.filled_rectangle(63, 99, 25, 25, id(r3).state ? id(red) : id(grey));
it.filled_rectangle(92, 99, 25, 25, id(r4).state ? id(red) : id(grey));
it.print(141, 80, id(font1), Color(orange), "AC Expansion"); // The AC Relay Expansion
it.filled_rectangle(141, 99, 25, 25, id(ac_r1).state ? id(red) : id(grey));
...
When finishing the configuration, recompile and upload the firmware. Then, you should be able to control additional AC relay in your Home Assistant:

Turn on/off the switch, the UI element on LCD will change accordingly.

StamPLC PoE is an Ethernet control module designed for the StamPLC host. It supports PoE (Power over Ethernet) technology, enabling both data transmission and power supply through a single Ethernet cable. The module integrates a W5500 embedded Ethernet controller with a built-in TCP/IP protocol stack, providing 8 independent hardware sockets, a 10/100M Ethernet data link layer (MAC), and physical layer (PHY). It supports mainstream network communication methods such as UDP and TCP.
To enable PoE functionality, disable the wifi, display, and spi components (remove their declarations/definitions from the configuration file). Then add the following to the original configuration file:
ethernet:
id: ethernet_1
type: W5500
clk_pin: GPIO7
mosi_pin: GPIO8
miso_pin: GPIO9
cs_pin: GPIO11
clock_speed: 20MHz
Save and install, then upload the firmware. Use a PoE switch or router to power the device while providing network connectivity.

Ready for Deployment
With the firmware flashed and your expansion modules configured, your StamPLC is no longer just a piece of hardware—it is now a sophisticated gateway for your automation needs. The beauty of this setup lies in its modularity; whether you are scaling up with StamPLC PoE for high-reliability data or utilizing StamPLC AC relays for heavy-duty switching, the combination with Home Assistant provides a unified, professional interface for it all.
Now that your foundation is built, you can move beyond basic setup and start creating the complex logic, schedules, and automations that make your industrial or home environment truly intelligent.


