Skip to content

Instantly share code, notes, and snippets.

View dechamps's full-sized avatar

Etienne Dechamps dechamps

View GitHub Profile
[ 0.000000] microcode: microcode updated early to revision 0x2d, date = 2018-02-07
[ 0.000000] Linux version 4.17.0-1-amd64 ([email protected]) (gcc version 7.3.0 (Debian 7.3.0-26)) #1 SMP Debian 4.17.8-1 (2018-07-20)
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.17.0-1-amd64 root=ZFS=zyklos/durable/system ro boot=zfs zfs_force=1 panic=3600 consoleblank=0 root=ZFS=zyklos/durable/system
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
@dechamps
dechamps / bfr.xml
Created December 22, 2019 16:18
Example BFR Configuration for routing between BACnet/Ethernet and BACnet/IP
<BFR>
<!-- Example configuration for a BACnet/Ethernet <-> BACnet/IP router -->
<!-- Note: this config has a number of Debug statements to make troubleshooting easier. In production use you'll likely want to remove them. -->
<!-- Replace "eth0" with the name of the network interface that is attached to the BACnet/Ethernet network. -->
<Ethernet server="hvac-eth" device="eth0" />
<Debug server="hvac-eth-debug" client="hvac-eth" prefix="hvac-eth" />
<!-- Replace "192.168.1.2" with the IP address of your machine. -->
<!-- Make sure to use the correct subnet length, otherwise broadcasts won't work. -->
@dechamps
dechamps / bac0-exporter.py
Last active November 1, 2024 15:10
A Prometheus exporter for BACnet device properties using the BAC0 library.
#!/usr/bin/python3 -u
import argparse
argument_parser = argparse.ArgumentParser('Run the HVAC BAC0 server')
argument_parser.add_argument('--local-address', help='local IP address to bind to', required=True)
argument_parser.add_argument('--local-port', help='UDP port to bind to')
argument_parser.add_argument('--bbmd-address', help='IP:port of the BACnet BBMD to register against, if any')
argument_parser.add_argument('--bbmd-ttl', help='TTL of the BACnet foreign device registration, in seconds', type=int)
argument_parser.add_argument('--bacnet-network', help='BACnet network to discover devices on; can be specified multiple times', type=int, action='append', required=True)
argument_parser.add_argument('--prometheus-port', help='Serve Prometheus metrics on this port', type=int)
@dechamps
dechamps / atlas2006.sitemap
Created December 22, 2019 18:10
Example OpenHAB BACnet configuration (Atlas 2006)
// /etc/openhab2/sitemap/atlas2006.sitemap
sitemap atlas2006 label="Atlas 2006" {
Frame {
Switch item=Atlas2006_Presence label="Presence" icon="presence"
}
Frame label="Living Room" {
Text item=Atlas2006_HVAC_RoomTemperature_Living_eTCH label="Temperature [%.1f °C]" icon="feels_like_temperature"
Setpoint item=Atlas2006_HVAC_Setpoint_Living label="Setpoint [%.1f °C]" icon="setpoint" minValue=18 maxValue=26 step=0.5
Switch item=Atlas2006_HVAC_RunStatus_Living label="HVAC" icon="switch"
@dechamps
dechamps / spec.json
Created June 28, 2020 16:34
Vega-Lite spec from Sun Jun 28 2020
{
"config": {
"view": {"continuousWidth": 400, "continuousHeight": 300, "opacity": 0}
},
"vconcat": [
{
"data": {"name": "data-9a3bc27729824677a04f57dcb5a098d3"},
"facet": {"type": "nominal", "field": "speaker", "title": null},
"spec": {
"layer": [