Example: Meraki - Control Device Policy via Exec and Python

You should try HABApp, you can create a Rule which listens directly to the your items and then issue the according request.