Skip to content

Instantly share code, notes, and snippets.

@MatsA
MatsA / Modbus_RTU_server_client.json
Last active November 15, 2024 15:26
Modbus RTU gateway
[
{
"id": "7ee227b81ec212ad",
"type": "tab",
"label": "Swegon RTU Server & Client",
"disabled": false,
"info": "",
"env": [],
"_mcu": {
"mcu": false
@MatsA
MatsA / Bosch_IVT_flow.json
Created April 1, 2024 17:43
NodeRed flow for the Bosch XMPP application
[
{
"id": "18b8180a1f03c5f4",
"type": "tab",
"label": "IVT data",
"disabled": false,
"info": "",
"env": []
},
{
@MatsA
MatsA / NodeRed_nergy_prices_consumption.json
Created August 12, 2023 15:28
NodeRed node getting hourly Nordpool prices and calculate energy consumption at home
[
{
"id": "cf84e2f1f062c5fd",
"type": "tab",
"label": "Energy price/consumption",
"disabled": false,
"info": "",
"env": []
},
{
@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",
@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 / 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 / README.md
Last active November 11, 2024 09:46
Retrieve measurements from a RuuviTag
@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":"
[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