How to send a signal through IO ports when ethernet interface is down/up

I’m trying to develop a python application that allows me to use a telemetry card 2 on a DigiWR41 to send a signal through one of the IO ports when the ethernet interface of the router goes up/down. Any thoughts on how to approach this?

if you are using python you can execute a CLI command to check the state of ethernet

eth 1 status
Activation Status: Inactive
Connection Status: Disconnected
Link: 10Base-T Half-Duplex
Physical Port: ETH 0
MAC: 00 04 2D 02 54 FC
IP Address:

then scrape the state

on the result set the io up or down

for ethernet port to go up and down you will needed to enable the “linkdeact” setting so when the cable is removed from ethernet the interface will go down

1 Like