Hello, I have been using the MQTT API to create a device that uses a GSM shield connected with a Raspberry Pi to send the MQTT messages to a data channel topic that corresponds to a 2 State digital widget. There is currently a mistake in the documentation where for the Digital Sensor data type at the top of the sensors table, the unit constant is "d", not "null" which I eventually figured out to get it working.
I'm using the 2 State digital widget for a trigger to send out email messages, but it is not working as well as I think it should. I set the trigger to send email when it receives a MQTT message indicating it is off (this is how my switch works, it is always set to an on state until it reaches a state to undergo a GPIO high-to-low transition and stays there, the MQTT message of the current state is sent every 5 seconds). I use the Cayenne MQTT python client to send MQTT messages and the dashboard gets the correct state which is sent through a GSM connection, but triggers never happen on time. Triggers do eventually happen but I got them two hours after the last message was sent and the trigger only worked twice when I assume it should be trigger a lot.
I'm pretty sure it's a backend problem because we know the MQTT messages sent are received and the dashboard updates correctly. Just in case, we checked with another RPi with different triggers (not using BYOT) and it does work when connected to WiFi. I don't think it's a problem with our GSM connection. I like to get to the bottom of this because the MQTT API is potentially useful for our IoT projects.