expiry for token

Due to issues with my energy suppliers and their inability to get the smart meters communicating with the Hildebrand IHD, I am temporarily using the API for retrieving details in my Home Assistant system.

When setting up node-red processes, I wanted to use the exp value in the api to better automate when I need to retrieve a new token.

This got a little confusing when the numeric value appeared to have been treated as a 2024 date, when the API documentation suggests that the token should expire in 7 days.

My latest token has an exp of 1712931823 and this appears to be interpreted as 2024-04-12T14:23:43.000Z by node-red. So my initial question is what does the exp value signify (thought it was second since beginning of 1970)?

If I have this wrong, is there code I can use as a function in node-red to produce the correct result?

Sign In or Register to comment.