Last active
May 24, 2025 14:52
-
-
Save h3xagn/f07a0d90f5ceee349cb8a973c7497851 to your computer and use it in GitHub Desktop.
NodeRed runction to create line protocol message for InfluxDB
This file contains hidden or 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
| let payload = msg.payload; | |
| let timestamp = new Date(payload.timestamp); | |
| timestamp = Math.floor(timestamp.getTime() / 1000); | |
| let lp_msg = { | |
| "payload": "homedb,sensor=lab_indoor_temp value=" + payload.value + " " + timestamp | |
| } | |
| return lp_msg; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
initial commit