Ubidots Community

Machine ON time

Hello,
Screen Shot 2021-07-29 at 7.24.23 PM

I followed your example to show for how long the Machine was ON, but is showing in ms. Is there a way to show it for example like. H:M:S format? not in milliseconds?
Thanks

Hi @Redland,

Thank you for sharing your question with the community.

In this case, it is not possible to convert inside the synthetic to the H:M:S format. You can convert the value to hours or minutes by multiplying for the correct factor. Now, what you can do is create an HTML Canvas widget that makes a get request to the synthetic value and present the time in the format you need. Please refer to the following article for more information.

Let us know if you have any further questions.

All the best,
-Isabel

Thank You!

Hello @isalogi,
What would be the best approach if I want for example to send an email when the WaterPump is turned OFF showing the total time ON on the body of the email?
Thank You!!

Hi @Redland,

You can create an event that sends an alert when the Water Pump is OFF but unfortunately in the event message is not possible to include the value of another variable, which in this case will be the time. Now, I will pass this suggestion to our Product team so that they can consider this moving forward and weigh it against our current product roadmap.

Please tell me if there’s anything else that I can help with.
-Isabel