Hello @TH ,
You are using the Free tier version of the IoT Hub. where an S1 version is capable of receiving 400.000 D2C messages a day of size 4KB, the free tier support 8000 messages of size 0.5 KB. Sending C2D messages and Device provisioning is also part of this amount.
Keep in mind that sending a message with a size of 700 bytes is counted as two messages.
To work around this, there are a few options:
- Obviously, the S1 offers quite a lot more messages for ~1 dollar a day. Plus you can scale up and down if this is needed for some reason
- The Azure IoT SDK offers to send messages as a batch in C#. This way the use of the number of messages is more efficient if you batch more messages together and fill up the 'empty spaces' (up to 256KB in one go) I'm not sure if this is the case with Python too (You can submit a feature request)
- you can consider making your code resilient by queueing messages to be sent to the cloud at a later moment when sending messages is possible again (at the end of the day). The Azure IoT Edge has built-in temporary storage already.
- You can try to zip the message: