Get the Token from Postman
Our first step before working with ioBroker is going to be to get the Token from Postman. For this you have to open Postman and create a new POST request.
Go to Authorization and change the typ to Basic Auth and enter your Username and Password.
After that you have to add grant_type, username and password to the Body.
Press on Send and if everything went right and will get your Token.
In Postman you can also generate a code snippet which you are going to use in ioBroker. Choose your language as NodeJS – Request and copy the code.
Programming in ioBroker
- Row 3-12: we create a unique Id for every process
- Row 15-70: we define every room and get the id, name, status, switch and the time
Send the Data to Data Lake
Every time we execute our code, we can check in Data Lake if it went through. There we can see The id, name, status, switch and the time of the room where we switched on/off the light.
If you want to read how to connect to Infor Data Lake you can check out our last post to this topic. Just click here.