Not quite what your looking for but the principle should be the same.
I use a Raspberry Pi Zero W to collect various reading and post them to Cayenne using Node-Red MQTT nodes. I also have a couple of back channels from Cayenne to the RPi and a couple of buttons in the Cayenne dashboard that allow me to force reading/sending data (normally happens every 10 minutes) and another to power off the RPi.
My IP address is dynamic but once data has been uploaded to Cayenne the buttons seems to work.
I think they have code/examples for both the Arduino & ESP8266 MCU's.