Skip to content

Instantly share code, notes, and snippets.

View snowdd1's full-sized avatar
👴
Getting older, each day

Raoul snowdd1

👴
Getting older, each day
  • Home automation enthusiast
  • Germany
View GitHub Profile
@snowdd1
snowdd1 / octoprint.log
Created June 4, 2018 21:29
octoprint.log
2018-06-04 22:31:46,318 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2018-06-04 22:46:46,320 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2018-06-04 23:01:44,919 - octoprint.util.comm - ERROR - Exception while processing line
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 3570, in getNext
line = self._handle.readline()
File "/home/pi/oprint/lib/python2.7/codecs.py", line 690, in readline
return self.reader.readline(size)
File "/home/pi/oprint/lib/python2.7/codecs.py", line 545, in readline
data = self.read(readsize, firstline=True)
@snowdd1
snowdd1 / knxd-parameters.md
Last active June 13, 2021 08:01
knxd parameters - rework to avoid user errors

knxd parameters

General remarks

The order of parameters is crucial to knxd. Only a few parameters can be placed everywhere in the command line, and to avoid errors, these are treated here as if their position is fixed as it is with all the other parameters.

Though the one-letter abbreviations (POSIX style) are much less type work, the long parameter versions are better readable. --error=9 is easier to understand than f 9 (in most languages, at least.).

Please note that POSIX parameters behave differently than the "long" versions:

  • POSIX parameters can be concatenated: -DTRS is the same as -D -T -R -S
  • POSIX parameters with arguments do not need a space (but can have) as separator: -f9 is ok
@snowdd1
snowdd1 / testingDPT9.js
Created October 2, 2015 06:34
Testing program for automated exponent calc for DPT9
/**
* Testing program for automated exponent calc for DPT9
*/
var encodeDPT9 = function(value, exp) {
var data = [0,0];
if(exp === undefined) {
exp = Math.floor(Math.max(Math.log(Math.abs(value)*100)/Math.log(2)-10,0));
}