Homey Community Forum

From a number to hexidecimals


#1

Hello everyone,

Does anyone know a solution?
I have a number from a calculation and would like to make a hexadecimal of it, which I can send to my phone for my work.
Here we use these codes to log in.
Now I have to calculate it every day and would like to have it sent automatically every day.
Would this be possible with Math.js?

I hope someone knows a solution.


#2

Not sure if you can use JS code, but if so:

number.toString(16)

#3

Ive just moved your thread into the developer forum, wouldnt want to scare people with talk of Hexadecimals or math.


#4

Are there any more options within Homey?

Because through the Number. toString(16) can’t do it because Homey doesn’t recognize this option.

Am I doing something wrong or can this denomination not be in Math. js?


#5

There doesn’t seem to be a function or option in Math.js to convert a number to a hexadecimal string :frowning:


#6

Then just see if an app can be made.


#7

I expect it to be possible with Homeyscript.
Just call the script with the value and set a string variable with the hex value.