Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@MatsA
MatsA / config.json
Last active February 5, 2017 15:46
Hombridge and config.json. Configuration file for Domoticz and Telldus Live. http://pysselilivet.blogspot.com/2016/11/homekit-for-telldus-live.html
{
"bridge": {
"name": "Homebridge",
"username": "CC:21:3E:E4:DE:33",
"port": 51826,
"pin": "031-45-154"
},
"description": "Configuration file for Domoticz and Telldus Live.",
"platforms": [
{
@MatsA
MatsA / cumulusdata.php
Last active May 26, 2017 15:06
Davis WeatherLink as datasource for the weather template Weather34 https://www.weather34.com/homeweatherstation/ and documentation at http://pysselilivet.blogspot.com/2017/01/install-weather34-with-weatherlink.html
Check the link to the documentation
@MatsA
MatsA / openplotter-settings.json
Created July 21, 2017 18:04
Openplotter default SignalK configuration
{
"vessel": {
"uuid": "urn:mrn:imo:mmsi:98765432"
},
"pipedProviders": [
{
"pipeElements": [
{
"type": "providers/udp",
"options": {
[Unit]
Description=Node.js HomeKit Server
After=syslog.target network-online.target
[Service]
Type=simple
User=pi
# Could be /usr/local/bin/homebridge
ExecStart=/usr/bin/homebridge
Restart=on-failure
@MatsA
MatsA / Signalk_NR_DS18B20_temp
Last active September 15, 2018 18:44
Node Red flow for SignalK. Measuring temperature with DS18B20. Info at https://pysselilivet.blogspot.com/2018/07/signalk-measuring-temperature.html
[{"id":"9ae73cb2.1aa53","type":"tab","label":"Flow 1","disabled":true,"info":""},{"id":"b203a1de.b0e7b","type":"inject","z":"9ae73cb2.1aa53","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"onceDelay":"1","x":130,"y":60,"wires":[["b50bf0c3.5a39"]]},{"id":"b50bf0c3.5a39","type":"rpi-ds18b20","z":"9ae73cb2.1aa53","topic":"","array":true,"name":"","x":290,"y":60,"wires":[["5755463c.bc7758"]]},{"id":"5755463c.bc7758","type":"split","z":"9ae73cb2.1aa53","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":130,"y":140,"wires":[["7338dfbc.b0fb1"]]},{"id":"7338dfbc.b0fb1","type":"function","z":"9ae73cb2.1aa53","name":"Set values","func":"\ntempIn = msg.payload.temp + 273.15;\ntempDsId = msg.payload.file\n\nswitch(tempDsId) {\n \n case \"28-051693ea56ff\" :\n SkPath = \"propulsion.starboard.exhaustTemperature\"; \n break;\n \n case \"28-051693ec41ff\" :\n SkPath = \"propulsion.port.exhaustTempe
@MatsA
MatsA / max-mintemp.php
Created January 18, 2019 22:56
Bug fix for max-mintemp.php
<?php include('livedata.php');include('common.php');header('Content-type: text/html; charset=utf-8');?>
<div class="topmin">
<?php //Temperature min day
if ($weather["temp_units"]=='C' && $weather["temp_today_low"]>30){echo "<topred1>",$weather["temp_today_low"] ;echo "&deg;<smalluvunit>".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["temp_today_low"]>=24){echo "<toporange1>",$weather["temp_today_low"] ;echo "&deg;<smalluvunit>".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["temp_today_low"]>=18){echo "<topyellow1>",$weather["temp_today_low"] ;echo "&deg;<smalluvunit>".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["temp_today_low"]>=6){ echo "<topgreen1>", $weather["temp_today_low"] ;echo "&deg;<smalluvunit>".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["temp_today_low"]>-50){ echo "<topblue1>", $weather["temp_today_low"] ;echo "&deg;<smalluvunit>".$weather["temp_units"] ; }
[{"id":"540d1e27.4b2ae","type":"signalk-subscribe","z":"84ac7b53.3bfa68","name":"port.exhaustTemperature ","flatten":true,"context":"vessels.self","path":"propulsion.port.exhaustTemperature","source":"signalk-node-red","period":1000,"x":170,"y":100,"wires":[["972d13ad.877cf"]]},{"id":"3c1f5d23.4842b2","type":"signalk-subscribe","z":"84ac7b53.3bfa68","name":"starboard.exhaustTemperature","flatten":true,"context":"vessels.self","path":"propulsion.starboard.exhaustTemperature","source":"signalk-node-red","period":1000,"x":190,"y":180,"wires":[["9eecfd70.d936b"]]},{"id":"972d13ad.877cf","type":"switch","z":"84ac7b53.3bfa68","name":"If over 300 Kelvin","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"300","vt":"str"},{"t":"lte","v":"300","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":100,"wires":[["8014c150.fd873"],["53d36d2d.996844"]]},{"id":"8014c150.fd873","type":"signalk-send-notification","z":"84ac7b53.3bfa68","name":"send alarm","path":"ptExhaustTemp","state":"
@MatsA
MatsA / NR_Scan_flow.json
Created January 1, 2021 19:03
GUI for SANE scanner made with NodeRed
[{"id":"974898cd.7d1728","type":"tab","label":"Scan ","disabled":false,"info":""},{"id":"def002f2.e31fc","type":"ui_text","z":"974898cd.7d1728","group":"2cc923ff.1cf05c","order":1,"width":6,"height":3,"name":"Selected options","label":"<h1>Selected Options<h1/>","format":"{{msg.payload}}","layout":"col-center","x":830,"y":120,"wires":[]},{"id":"13bb8db9.aaa432","type":"ui_dropdown","z":"974898cd.7d1728","name":"Resolution","label":"&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp <b> Resolution<b/>","tooltip":"","place":"Select option","group":"2cc923ff.1cf05c","order":4,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Auto","value":"Auto","type":"str"},{"label":"75","value":75,"type":"num"},{"label":"150","value":150,"type":"num"},{"label":"300","value":300,"type":"num"},{"label":"600","value":600,"type":"num"},{"label":"1200","value":1200,"type":"num"}],"payload":"","topic":"resolution","x":290,"y":100,"wires":[["bec26866.40d118"]]},{"id":"bec26866.40d118","type":"function","z
@MatsA
MatsA / SK_NR_switching.json
Created January 3, 2021 12:24
NodeRed flow switching a Shelly 1. Included Wilhelm SK instruktions
[{"id":"3113b544.8ff882","type":"tab","label":"Signalk & Shelly & WSK","disabled":false,"info":""},{"id":"3a0b4910.ac2df6","type":"debug","z":"3113b544.8ff882","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":690,"y":500,"wires":[]},{"id":"68ac6e9e.e86d","type":"signalk-put-handler","z":"3113b544.8ff882","name":"","path":"electrical.switches.anchorLight.state","x":330,"y":500,"wires":[["3a0b4910.ac2df6","98f13e8a.d877d8"]]},{"id":"b501dbf4.3b32f","type":"inject","z":"3113b544.8ff882","name":"ON","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":110,"y":500,"wires":[["98f13e8a.d877d8"]]},{"id":"98f13e8a.d877d8","type":"function","z":"3113b544.8ff882","name":"Turn ON/OFF","func":"// Input from WSK or Inject nodes \n\nswitch(msg.payload) {\n case 1:\n msg.payload = \"turn=on\";\n break;\n case 0:\n msg.payload = \"turn=off\";\n break;\n default:
@MatsA
MatsA / SIGNL4_alert.json
Created October 15, 2021 09:20
NodeRed flow for SIGNL4 alerts
[
{
"id": "2282c8f1.9bde88",
"type": "tab",
"label": "Export",
"disabled": false,
"info": ""
},
{
"id": "cea17d201d504ef4",