Avoid spamming users regarding push notification

Hi, I am doing a project about IOT which involves sensors such as temp sensor etc.  I am building a native mobile app as well as web dashboard.   I managed to send a push notification to notify users when temperature reaches a certain value, 24 degrees, for example, that the temperature is too high. However, I keep receiving notifications every 30 seconds and I do not want to spam the users about it.    I am aware that the proper way is to use scheduling feature to achieve this but I am using a free version of Mendix 8. Hence, I do not have access to this feature. I am using microflow timer as an alternative. I want users to receive push notification to notify them but I do not want to keep spamming the users. May I know how do I solve this issue please?  
2 answers

Use a boolean and a timestamp that you check first. If the boolean is set to true and the datetimestamp is not older then a time you choose (let's say less then one day old) skip the push. This way you only send one message each day.







Thanks for replying. After I wrote this post, I was thinking similar as to what you suggested. However, I am not sure of how to even make the changes and I am not sure if I am doing it right. 



My IOT microflow is just a “Call REST api” activity. I was thinking of something like this:

  1. First, I create an entity, with 2 attributes – one to store current date and the other to store the last sent notification. 
  2. When sensor reaches 24 degrees, it will send once only. It will send another notification, probably after 30mins, to remind users if the problem is not fixed. After that, it wont send anymore for the rest of the day. 


May I know if this is achievable please? I would really appreciate it if you could send some pictures to guide me on this please as I am extremely confused about this. I am really sorry to bother you Ronald.

Edit: I am really sorry about the pictures. I tried adjusting the pictures.