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
# Bridge to The Things Network | |
connection bridge | |
address eu1.cloud.thethings.network:8883 | |
remote_username <some-name>@ttn | |
remote_password <some password> | |
bridge_insecure false | |
topic # both 0 ttn/ APPID/devices/ |
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
mqtt: | |
binary_sensor: | |
- name: Tunnel | |
device_class: motion | |
state_topic: "external/ttn/v3/<ttn user name>@ttn/devices/motion-detector/up" | |
value_template: "{{ value_json.uplink_message.decoded_payload.motion }}" | |
payload_on: "1" | |
payload_off: "0" | |
- name: Inner door | |
device_class: door |
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
function hex2bin(hex) { | |
return (parseInt(hex, 16).toString(2)).padStart(8, '0'); | |
} | |
const changeEndianness = (string) => { | |
const result = []; | |
let len = string.length - 2; | |
while (len >= 0) { | |
result.push(string.substr(len, 2)); | |
len -= 2; |
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
function hex2bin(hex) { | |
return (parseInt(hex, 16).toString(2)).padStart(8, '0'); | |
} | |
const changeEndianness = (string) => { | |
const result = []; | |
let len = string.length - 2; | |
while (len >= 0) { | |
result.push(string.substr(len, 2)); | |
len -= 2; |
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
function hex2bin(hex) { | |
return (parseInt(hex, 16).toString(2)).padStart(8, '0'); | |
} | |
const changeEndianness = (string) => { | |
const result = []; | |
let len = string.length - 2; | |
while (len >= 0) { | |
result.push(string.substr(len, 2)); | |
len -= 2; |
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
function Decoder(bytes, port) { | |
var params = { | |
"bytes": bytes | |
}; | |
bytes = bytes.slice(bytes.length-11); | |
if ((bytes[0] & 0x8) === 0) { | |
params.gnss_fix = true; | |
} else { |
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
function Decoder(bytes, port) { | |
var params = { | |
"bytes": bytes | |
}; | |
bytes = bytes.slice(bytes.length-11); | |
if ((bytes[0] & 0x8) === 0) { | |
params.gnss_fix = true; | |
} else { |
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
31598 ? Sl 0:01 /usr/bin/docker-current -H unix:///var/run/docker.sock run --cpu-shares 102 --memory 268435456 -e HOST=hz2-n04.cluster.jacum.com -e LOG_DIR=/var/log -e MARATHON_APP_DOCKER_IMAGE=jacum/example-service -e MARATHON_APP_ID=/service-c -e MARATHON_APP_LABELS= -e MARATHON_APP_RESOURCE_CPUS=0.1 -e MARATHON_APP_RESOURCE_DISK=0.0 -e MARATHON_APP_RESOURCE_GPUS=0 -e MARATHON_APP_RESOURCE_MEM=256.0 -e MARATHON_APP_VERSION=2018-05-09T12:32:57.590Z -e MESOS_CONTAINER_NAME=mesos-ef0a2179-6d1d-441c-942c-e80e3ad6a38c -e MESOS_SANDBOX=/mnt/mesos/sandbox -e MESOS_TASK_ID=service-c.1abfc06e-5385-11e8-8bee-0242ef88c8a5 -e PORT=31348 -e PORT0=31348 -e PORT1=31349 -e PORTS=31348,31349 -e PORT_9000=31348 -e PORT_9101=31349 -v /var/lib/mesos/slaves/12e6ff16-ff24-4b98-8507-ee9471eec0a8-S3/frameworks/7c989b95-1e4e-4d8d-80a8-4190c8383b19-0000/executors/service-c.1abfc06e-5385-11e8-8bee-0242ef88c8a5/runs/ef0a2179-6d1d-441c-942c-e80e3ad6a38c:/mnt/mesos/sandbox --net bridge -p 31348:9000/tcp -p 31349:9101/tcp --na |
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
2018/05/04 19:24:37 [debug] 14409#0: *1 http proxy header: | |
"GET /metrics HTTP/1.0 | |
Host: hz2-n04.cluster.jacum.com:31696 | |
Connection: close | |
User-Agent: Prometheus/2.2.1 | |
Accept: text/plain;version=0.0.4;q=1,*/*;q=0.1 | |
Accept-Encoding: gzip | |
X-Prometheus-Scrape-Timeout-Seconds: 10.000000 | |
" |