Skip to content

Instantly share code, notes, and snippets.

View pyrou's full-sized avatar

⭐️ Michael pyrou

View GitHub Profile
@pyrou
pyrou / docker-compose.yml
Last active May 2, 2024 11:09
Use https://traefik.me SSL certificates for local HTTPS without having to touch your /etc/hosts or your certificate CA.
version: '3'
services:
traefik:
restart: unless-stopped
image: traefik:v2.0.2
ports:
- "80:80"
- "443:443"
labels:
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
@pyrou
pyrou / rfxcom2mqtt.js
Created January 26, 2024 21:31
Super simple rfxcom mqtt bridge that support Somfy RTS (RFY) and lighting2
const mqtt = require("mqtt");
const rfxcom = require('rfxcom')
const rfxtrx = new rfxcom.RfxCom("/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1YVC00T-if00-port0", {debug: true});
const lighting2 = new rfxcom.Lighting2(rfxtrx, rfxcom.lighting2.HOMEEASY_EU);
const rfy = new rfxcom.Rfy(rfxtrx, rfxcom.rfy.RFY, {venetianBlindsMode: "EU"});
const onJsonMessage = (topic, payload) => {
const path = topic.split('/')