Hello,
Running an OpenHAB installation on a physical Ubuntu box, OpenHAB version 3.3.0.M2.
I have built a simple Arduino -device and have this setup at the summer villa 200km away, measuring outdoor and indoor temperatures and indoor humidity. It is sending all the data back to a MQTT server I have running on Unraid, I then have an mqtt thing for the arduino in OpenHAB which works fine and is collecting the outdoor temp and indoor humidity perfectly, without problem.
Now, I probably made a small mistake in the code of the arduino as it is sending the indoor temp with an extra space at the end of the number - like "-2.40 " at the moment. So OpenHAB says “not supported by type ‘NumberValue’” and does not accept the value. No problem, right, just transform the space out? Well…
I first tried a javascript transformation just like it is presented in the docs. Made a javascript that trims the space out, saved it in a file and pointed the channel configuration to it like this:
I also tried with the path transform\trim.js and also like JS(transform\trim.js) but the number did not change, OpenHAB is still complaining. In fact it turns out I can write complete gibberish in the trim.js file and OpenHAB does not react, so clearly something is wrong there.
I then thought to try REGEX as it does not require a file. So I created a suitable REGEX string and entered it like this:
I also tried different forms for the text, like having REGEX: in the beginning etc. but to no avail. Again, in fact, I can write any gibberish in the profile configuration without OpenHAB noticing it at all.
So apparently my transformations are not being accepted or even not read at all by OpenHAB. What might be the issue? They are definitely installed, but are they not being used for some reason?
I would appreaciate some help on this - I realize I can do this through rules but this should be about as simple a transformation that exists and still it is not working, I am very frustrated.