now that it is working you need to modify your code according to this post Sending MQTT messages within notification limit