Skip to content

Instantly share code, notes, and snippets.

View poggenpower's full-sized avatar

Thomas Laubrock poggenpower

View GitHub Profile
@poggenpower
poggenpower / .gitignore
Last active November 3, 2023 14:59
API wrapper for AQUA CSP
.aqua-token
payload*
post*
data*
@poggenpower
poggenpower / README.MD
Last active August 22, 2022 09:37
Viessmann to mqtt forwarder

Viessmann to MQTT forwarding

The files below is part of a larger framework and won't really run indpendent from it, but should be easy to convert into a standalone version.

External modules

Two external modules are requirend

  1. https://github.com/somm15/PyViCare for talking Viessmannn API
  2. https://github.com/poggenpower/mqtt_tree for wrapping MQTT communication (requires paho.mqtt.client) install via pip install git+https://github.com/poggenpower/mqtt_tree
@poggenpower
poggenpower / crawl.py
Created January 9, 2022 16:20
PyViCare crawl all values
import re
from PyViCare.PyViCare import PyViCare
# make sure call back URL in the Oauth client is set to: vicare://oauth-callback/everest
client_id = "42cfdf4e473fd436*************"
email = "vissmann@XXXX.XX"
password = "********************"
vicare = PyViCare()
vicare.initWithCredentials(email, password, client_id, "token.save")
@poggenpower
poggenpower / default-duid.md
Last active August 27, 2022 19:38
Convert default-duid from dhclient6.leases to hex for DHCP Server assigments

DUID reset and conversion

Using DHCPv6 in ipv6 you don't assign setting per MAC but per DUID. On many linux flavours you will find the DUID in the firtst line of /var/lib/dhcp/dhclient6.XXXX.leases as default-duid where XXXX is the name of the interface. e.g. default-duid "\000\001\000\001'\305H\356\016\265<\373[\372"; a string with octal escaped bytes if it is not a printable ACSI charakter.

converting the DUID

Almost all DHCPv6 servers expect the DUID in hex notation. Following python3 script will convert it:

duid = "\000\001\000\001'\305H\356\016\265&lt;\373[\372"