Fakir
Fakir

Reputation: 141

Thingsboard Rule Engine how to use my own javascript code

I wrote a code to convert HEX test string such as, 052202241720153F8F78FFA7149CAF1F2F0F2F, then split as required and convert to decimal etc. The reason is the device that I will use for the test sends payload in this format. But Thingsboard standard format is JSON. Want my conversion method in Thingsboard Rule Engine using 'script' for data transformation. Any idea how to do it?

Upvotes: 0

Views: 387

Answers (1)

Fakir
Fakir

Reputation: 141

Could solve the issue. Parsing and converting in Javascript was not difficult. But to implement the same in Thingsboard was tricky. There are not many examples, except a few easy one in Thingsboard documents. Tested by injecting data through Node-RED and seems working well.

Thanks.

Upvotes: 0

Related Questions