Skip to content

Instantly share code, notes, and snippets.


Henri Pihkala hpihkala

View GitHub Profile
hpihkala / lht65_decoder.js
Created Mar 25, 2021
Helium LHT65 decoder function
View lht65_decoder.js
function Decoder(bytes, port) {
//Payload Formats of LHT65 Deveice
return {
//Battery Level
"0":"Ultra Low",
hpihkala / produce-example.js
Created Feb 26, 2018
Produce data to Streamr over HTTP (example)
View produce-example.js
const fetch = require('node-fetch');
// Stream ID
// User API key (OR anonymous Stream key with write permission to the stream)
const TEST_KEY = 'MY_KEY'
// Function to POST data points to the API
async function produceToStreamr(msg, streamId, apiKey) {
const res = await fetch(''+streamId+'/data', {