Here you can see the script that will get the binary value from the component inside the project and pubblish its value like an ON value throught the topic. if (payload==0) { var info = { "value":"OFF" }; return JSON.stringify(info); } else { var info = { "value":"ON" }; return JSON.stringify(info); }