Created
January 2, 2020 17:35
-
-
Save nachocarballeda/eacf8c84bd7e5488e6c86c83dcf22865 to your computer and use it in GitHub Desktop.
nodered msg composer part
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (keychar === "12") { //12 is the keychar for OTA Configs | |
var payload = msg.payload.substr(2); | |
} else { | |
var payload = msg.payload.substr(4); | |
} | |
if(keychar === "12") { | |
msg.payload = eui + "/configuration/" + payload; | |
msg_is_config = true; | |
} else { | |
msg.payload = eui + "/messages/partials/"+ keychar + "?time=" + msg.time + "&msg=" + sequence_number + ";" + payload; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment