Skip to content

Instantly share code, notes, and snippets.

View saschpe's full-sized avatar
Transmogrifying coffee into code

Sascha Peilicke saschpe

Transmogrifying coffee into code
View GitHub Profile
@dnoegel
dnoegel / sungrow_modbus_register.tsv
Last active October 7, 2025 03:08
Modbus Register für Sungrow Wechselrichter zum Import in Iobroker
_address name description unit type len factor offset formula role room cw isScale
4999 Device type code Geräte Typ-Code int8be 1 1 0 value false false
5000 Nominal Output Power Installierte Leistung Kw uint16be 1 0.1 0 value false false
5002 Daily Output Energy Eigene Energienutzung heute (PV & Akku) Kwh uint16be 1 0.1 0 value false false
5003 Total Output Energy Eigene Energienutzung gesamt (PV & Akku) Kwh uint32sw 2 0.1 0 value false false
5007 Inside Temperature Temperatur im Wechselrichter °C int16be 1 0.1 0 value false false
5010 MPPT 1 Voltage MPPT1 Spannung V uint16be 1 0.1 0 value false false
5011 MPPT 1 Current MPPT1 Strom A uint16be 1 0.1 0 value false false
5012 MPPT 2 Voltage MPPT2 Spannung V uint16be 1 0.1 0 value false false
5013 MPPT 2 Current MPPT2 Strom A uint16be 1 0.1 0 value false false
@saschpe
saschpe / otp.py
Last active January 16, 2020 06:33
Implementation of the OTP algorithm described at http://motp.sourceforge.net in Python. Supports reading secret and PIN from the command-line or from a config file. Allows to paste the generated token to the system's clipboard directly.
#!/usr/bin/env python3
#
# Copyright 2019 Sascha Peilicke <[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
#
@coffeemug
coffeemug / gist:6168031
Last active October 15, 2024 01:08
The fun of implementing date support
After spending the better part of the month implementing date support
in RethinkDB, Mike Lucy sent the team the following e-mail. It would
have been funny, if it didn't cause thousands of programmers so much
pain. Read it, laugh, and weep!
-----
So, it turns out that we're only going to support dates between the
year 1400 and the year 10000 (inclusive), because that's what boost
supports.