Skip to content

Instantly share code, notes, and snippets.

@Sineos
Sineos / Build_Influxdb.md
Last active January 29, 2017 09:08
How to build influxdb with gvm

Introduction

Building influxdb with a dedicated package set can be tricky since go is quite bitchy about its path variables and will produce really strange error messages when these are not set properly. This short memo assumes gvm and the relevant go version are already installed.

Create folder structure for go:

This assumes we use a folder go in $HOME to manage all go projects in a dedicated package environment

@Sineos
Sineos / SyncNode-Red_SensorValues.md
Last active February 14, 2017 06:19
Sync node-red sensor values
// Wait for both messages to arrive
// Calculate delta between consumption and PV

context.power = context.power || {};
switch (msg.topic) {
	case 'power_cons_sum':
		context.power.cons = parseInt(msg.payload);
		//node.warn("context.power.cons " + context.power.cons);
		msg = null;

break;

{"701":"26.12.15 23:32:53","776":{"367":[["00:00:00",[[0,0],[274,0]]],["00:05:00",[[0,0],[273,22]]],["00:10:00",[[0,0],[334,50]]],["00:15:00",[[0,0],[291,75]]],["00:20:00",[[0,0],[261,97]]],["00:25:00",[[0,0],[340,125]]],["00:30:00",[[0,0],[359,155]]],["00:35:00",[[0,0],[352,184]]],["00:40:00",[[0,0],[378,216]]],["00:45:00",[[0,0],[499,258]]],["00:50:00",[[0,0],[543,303]]],["00:55:00",[[0,0],[467,342]]],["01:00:00",[[0,0],[469,381]]],["01:05:00",[[0,0],[415,416]]],["01:10:00",[[0,0],[414,450]]],["01:15:00",[[0,0],[405,484]]],["01:20:00",[[0,0],[375,515]]],["01:25:00",[[0,0],[344,543]]],["01:30:00",[[0,0],[319,570]]],["01:35:00",[[0,0],[345,598]]],["01:40:00",[[0,0],[274,621]]],["01:45:00",[[0,0],[262,643]]],["01:50:00",[[0,0],[256,664]]],["01:55:00",[[0,0],[346,692]]],["02:00:00",[[0,0],[285,716]]],["02:05:00",[[0,0],[304,743]]],["02:10:00",[[0,0],[290,767]]],["02:15:00",[[0,0],[310,792]]],["02:20:00",[[0,0],[316,819]]],["02:25:00",[[0,0],[261,840]]],["02:30:00",[[0,0],[250,862]]],["02:35:00",[[0,0],[284,886]
{"701":"26.12.15 23:33:00","776":{"366":[["00:00:00",[[0,0],[326,0]]],["00:05:00",[[0,0],[366,32]]],["00:10:00",[[0,0],[413,68]]],["00:15:00",[[0,0],[512,110]]],["00:20:00",[[0,0],[463,148]]],["00:25:00",[[0,0],[442,184]]],["00:30:00",[[0,0],[409,219]]],["00:35:00",[[0,0],[399,252]]],["00:40:00",[[0,0],[466,292]]],["00:45:00",[[0,0],[376,322]]],["00:50:00",[[0,0],[406,353]]],["00:55:00",[[0,0],[337,381]]],["01:00:00",[[0,0],[399,415]]],["01:05:00",[[0,0],[496,453]]],["01:10:00",[[0,0],[420,487]]],["01:15:00",[[0,0],[381,519]]],["01:20:00",[[0,0],[306,544]]],["01:25:00",[[0,0],[293,569]]],["01:30:00",[[0,0],[349,598]]],["01:35:00",[[0,0],[350,628]]],["01:40:00",[[0,0],[352,657]]],["01:45:00",[[0,0],[344,685]]],["01:50:00",[[0,0],[339,713]]],["01:55:00",[[0,0],[343,742]]],["02:00:00",[[0,0],[359,773]]],["02:05:00",[[0,0],[400,806]]],["02:10:00",[[0,0],[351,835]]],["02:15:00",[[0,0],[393,867]]],["02:20:00",[[0,0],[419,903]]],["02:25:00",[[0,0],[424,939]]],["02:30:00",[[0,0],[436,975]]],["02:35:00",[[0,0],[432,10