Skip to content

Instantly share code, notes, and snippets.

@tkurki
tkurki / gist:d8d45dfb368b3b544542511e8e95a45b
Last active November 11, 2020 11:07
ESP8266 script to read DS18B20 sensors over 1W and broadcast Signal K JSON over udp
#include <OneWire.h>
#include <DallasTemperature.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <SPI.h>
#include <Wire.h>
#include <ESP8266WebServer.h>
#include <DNSServer.h>
#include <WifiServer.h>
@tkurki
tkurki / grid.json
Created August 27, 2017 14:43
Signal K InstrumentPanel example config
{
"pages": [
{
"layout": [
{
"w": 2,
"h": 2,
"x": 2,
"y": 0,
"i": "0",
{
"updates": [{
"source": {
"label": "n2kFromFile",
"type": "NMEA2000",
"pgn": 130306,
"src": "105",
"manufacturerCode": "Raymarine",
"uniqueNumber": "720088"
},
@tkurki
tkurki / certbot-auth.sh
Created March 2, 2017 20:46
Heroku Let's Encrypt certbot automation scripts
#!/bin/bash
APP_NAME=XXXX
echo Set config vars CERTBOT_TOKEN/RESPONSE
curl -s -n -X PATCH https://api.heroku.com/apps/$APP_NAME/config-vars \
-d "{
\"CERTBOT_TOKEN\":\""$CERTBOT_TOKEN"\",
\"CERTBOT_VALIDATION\":\""$CERTBOT_VALIDATION"\"
}" \
@tkurki
tkurki / signalk2indexdb.js
Created July 15, 2016 15:50
Signal K to IndexDB glue code
/*
* Copyright 2016 Teppo Kurki <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@tkurki
tkurki / twonmeasources.json
Created May 19, 2016 19:28
Signal K Node server configuration for two NMEA0183 sources
{
"vessel": {
"name": "Volare",
"brand": "Friendship",
"type": "22",
"uuid": "10101010",
"dimensions": {
"length": 7,
"width": 2.5,
@tkurki
tkurki / keybase.md
Created February 21, 2016 08:45
Keybase proof

Keybase proof

I hereby claim:

  • I am tkurki on github.
  • I am tkurki (https://keybase.io/tkurki) on keybase.
  • I have a public key ASBOl9n96LdEfZ7CTc7Am6jOm8L2AGOjXmTxFohsJhc8TAo

To claim this, I am signing this object:

@tkurki
tkurki / engine_delta.json
Created January 24, 2016 08:31
Sample Engine Signal K delta message
{
"updates": [
{
"values": [
{
"path": "propulsion.engine.oilTemperature",
"value": 300.1
},
{
"path": "propulsion.engine.exhaustTemperature",
@tkurki
tkurki / gist:f7a4b3b316f7f65eae1f
Created January 10, 2016 16:01
Signal K example for multiple sources/values
{
"vessels": {
"urn:mrn:signalk:uuid:c0d79334-4e25-4245-8892-54e8ccc8021d": {
"uuid": "urn:mrn:signalk:uuid:c0d79334-4e25-4245-8892-54e8ccc8021d",
"navigation": {
"speedThroughWater": {
"value": 3.1361111111111106,
"$source": "nmea2.II",
"timestamp": "2016-01-10T15:58:45.224Z",
"values": {
@tkurki
tkurki / gist:84cd71d2329f3ffae9f0
Last active November 23, 2015 11:09
Signal K sample (multiple values)
{
"uuid": "10101011",
"navigation": {
"speedThroughWater": {
"value": 3.2444444444444445,
"sentence": "VHW",
"$source": "nmea2.II",
"timestamp": "2015-11-15T14:37:32.306Z",
"values": {
"nmea1.II": {