LX40 and RV50 Discrete input

Has anyone setup an LX40 or RV50 to give the status of the Discrete input via Modbus TCP slave or MQTT?

Thanks