Thanks, but Json-RPC is not suitable in this case. The ISP is using NAT and rfc1918 addresses, so it's not easy to reach the device. I could setup a VPN connection, but that seems like a lot of work, and feels a bit unreliable.
I am already using the RUT 240 MQTT bridge to exchange IOT-data with a remote location, and that works really well. If the router were able to subscribe to a topic that controlled the I/O, it would be the perfect IOT router. As the router already subscribes to the "router/get" topic, it seems to me that it would be an easy enough feature to implement. As a workaround, I am currently using the mosquitto-client opkg in combination with a shell script to achieve this.