If you are running MQTT there is a gateway that supports that or if you can read serial input you could use the serial gateway. You would probably want to look at the Serial protocol and the Full API