I've got my TRB141 sending the status of a digital input pin via MQTT every 10 seconds. That's great, but I'd like to only send an MQTT message when the pin changes state (both ways, high to low, and low to high).
The equipment connected to the input will change state once every 30 seconds to 30 minutes, so it's not fast, but I don't want to send data every 10 seconds.
What would be a good way to approach this? I've thought about a custom script or a modbus alarm, but is there something built-in I could use?
I'm running firmware TRB1_R_00.07.00.1, which I updated yesterday.
Edited to add: it could probably be done with the I/O juggler, but MQTT is not listed as a possible action.