Loxone Support Community

Find answers, ask questions and become part of the Loxone Community.

Loxone Support CommunityCategory: Loxone ConfigConvert seconds in time format hh:mm:ss
2 years ago
Convert seconds in time format hh:mm:ss

Hello Loxone Comunity,

I am strugling with converting seconds (in AI) into readable time format hh:mm:ss. Any ideas how to convert it?

Thanks!

1 Answers
2 years ago

Not sure if I understand well your question, but I will try it.

In my case I have an analog input with number of seconds (the remaining time from my dryer machine) and I want to display this time in Loxone app.

My solution:

The analog input is connected to Formula function block with this formula:

INT(I1/60/60)*256*256 + INT(I1/60 - INT(I1/60/60)*60)*256 + (I1 - INT(I1/60)*60)

The formula converts number of seconds to EIB time (three bytes, each contains one part of the time – hours, minutes and seconds).

Output from Formula block is connected to AI1 input of Status function block and the remaining time <v1.m> string is used in Status-text filed in status editor.

Then in Loxone app I see the status text "remaining time 01:45:00"