Local architecture
Home Assistant, NetRelay, and preferably the MQTT broker can run on the same trusted LAN. Nabu Casa or an external tunnel is not required for core automation. If remote access is needed, evaluate Home Assistant's secure access options separately.
Choosing an integration
With ESPHome firmware, the native API provides quick discovery and entity management. If native NetRelay event handling, Ping Watchdog, or specialized I/O functions are required, MQTT or the HTTP API may be preferable. Choose according to required features.
Entity and automation design
Name relays and inputs after their physical function. Separate trigger, condition, and action; for example, evaluate a dry-contact change against a time condition before sending a relay command. Verify the result where feedback is available.
Outage scenarios
Define how relays behave if Home Assistant, the broker, or the network is temporarily unavailable. Do not delegate critical safety functions to home automation. Back up configuration and test the restart sequence.