i configure my openhab2.4 in my raspy3B+.
I use only paper UI, and i can’t use a service trasformation for Modbus input.
Is there a solution to transform modbus data (in my case I have to divide the number by 2) without having to write code ?? I’m a newbie in programming.
Thank you all.
The short answer is no. This is going to require a little bit of code. You can create a Rule or you can create a JS Transformation.
The Modbus docs include an example for divide by 10. It’s not that hard to adapt; have a try and come back for help if you need it.
thank you very much for helping.
My problem, following the guide, is that on Raspberry I don’t know where to find the file to compile, of which the beautiful guides speak.
Also to add tags to items, I used restAPI which does it automatically.
I don’t know which file you are talking about. There is no compilation involved here.
You create a text file, called
dividebytwo.js or something like, and put it in your openHAB
Then you add a read transform parameter to your binding data Thing that describes the kind of transformation you want to make -
JS - and the file you want it to use -
Um, okay. There are no tags involved here.
thank’s. i try it.
with notepad i have creata a file “dividebytwo” and put it in folder /trasform/ (OK, i make it with windows,
After with paperUi i have write it:
but don’t work… what i havn’t understand???
Thank’s a lot
The docs include an example for divide-by-ten. You can modify that for divide-by-two.
When doing this sort of thing, you should keep an eye open for relevant messages in your
thank’s a lot.
i don’t know why, but i have resaved a file, and now work!!!
thank you very much