• Stars
    star
    261
  • Rank 156,630 (Top 4 %)
  • Language
    Python
  • Created almost 3 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python tool to talk to Home Connect appliances over the local network (no cloud required)

dishwasher installed in a kitchen

Interface with Home Connect appliances in Python

This is a very, very beta interface for Bosch-Siemens Home Connect devices through their local network connection. Unlike most IoT devices that have a reputation for very bad security, BSG seem to have done a decent job of designing their system, especially since they allow a no-cloud local control configuration. The protocols seem sound, use well tested cryptographic libraries (TLS PSK with modern ciphres) or well understood primitives (AES-CBC with HMAC), and should prevent most any random attacker on your network from being able to take over your appliances to mine cryptocurrency.

WARNING: This tool not ready for prime time and is still beta!

Setup

pip3 -r requirements.txt

Install the Python dependencies; the sslpsk one is a little weird and we might need to revisit it later.

Authenticate to the cloud servers

laptop in a clothes washer with a display DoorState:Closed

hc-login $USERNAME $PASSWORD > config.json

The hc-login script perfoms the OAuth process to login to your Home Connect account with your usename and password. It receives a bearer token that can then be used to retrieves a list of all the connected devices, their authentication and encryption keys, and XML files that describe all of the features and options.

This only needs to be done once or when you add new devices; the resulting configuration JSON file should be sufficient to connect to the devices on your local network, assuming that your mDNS or DNS server resolves the names correctly.

Home Connect to MQTT

hc2mqtt config.json

This tool will establish websockets to the local devices and transform their messages into MQTT JSON messages. The exact format is likely to change; it is currently a thin translation layer over the XML retrieved from cloud servers during the initial configuration.

Dishwasher

laptop in a dishwasher

The dishwasher has a local HTTPS port open, although attempting to connect to the HTTPS port with curl results in a cryptic protocol error due to the non-standard cipher selection, ECDHE-PSK-CHACHA20-POLY1305. PSK also requires that both sides agree on a symetric key, so a special hacked version of sslpsk is used to establish the connection and then hand control to the Python websock-client library.

Example message published to homeconnect/dishwasher:

{
	"state":	"Run",
	"door":		"Closed",
	"remaining":	"2:49",
	"power":	true,
	"lowwaterpressure": false,
	"aquastop":	false,
	"error":	false,
	"remainingseconds": 10140
}
Full state information
{
	'AllowBackendConnection': False,
	'BackendConnected': False,
	'RemoteControlLevel': 'ManualRemoteStart',
	'SoftwareUpdateAvailable': 'Off',
	'ConfirmPermanentRemoteStart': 'Off',
	'ActiveProgram': 0,
	'SelectedProgram': 8192,
	'RemoteControlStartAllowed': False,
	'520': '2022-02-21T16:48:54',
	'RemoteControlActive': True,
	'AquaStopOccured': 'Off',
	'DoorState': 'Open',
	'PowerState': 'Off',
	'ProgramFinished': 'Off',
	'ProgramProgress': 100,
	'LowWaterPressure': 'Off',
	'RemainingProgramTime': 0,
	'ProgramAborted': 'Off',
	'547': False,
	'RemainingProgramTimeIsEstimated': True,
	'OperationState': 'Inactive',
	'StartInRelative': 0,
	'EnergyForecast': 82,
	'WaterForecast': 70,
	'ConnectLocalWiFi': 'Off',
	'SoftwareUpdateTransactionID': 0,
	'SoftwareDownloadAvailable': 'Off',
	'SoftwareUpdateSuccessful': 'Off',
	'ProgramPhase': 'Drying',
	'SilenceOnDemandRemainingTime': 0,
	'EcoDryActive': False,
	'RinseAid': 'R04',
	'SensitivityTurbidity': 'Standard',
	'ExtraDry': False,
	'HotWater': 'ColdWater',
	'TimeLight': 'On',
	'EcoAsDefault': 'LastProgram',
	'SoundLevelSignal': 'Off',
	'SoundLevelKey': 'Medium',
	'WaterHardness': 'H04',
	'DryingAssistantAllPrograms': 'AllPrograms',
	'SilenceOnDemandDefaultTime': 1800,
	'SpeedOnDemand': False,
	'InternalError': 'Off',
	'CheckFilterSystem': 'Off',
	'DrainingNotPossible': 'Off',
	'DrainPumpBlocked': 'Off',
	'WaterheaterCalcified': 'Off',
	'LowVoltage': 'Off',
	'SaltLack': 'Off',
	'RinseAidLack': 'Off',
	'SaltNearlyEmpty': 'Off',
	'RinseAidNearlyEmpty': 'Off',
	'MachineCareReminder': 'Off',
	'5121': False,
	'HalfLoad': False,
	'IntensivZone': False,
	'VarioSpeedPlus': False,
	'5131': False,
	'5134': True,
	'SilenceOnDemand': False
}

Clothes washer

laptop in a clothes washer

The clothes washer has a local HTTP port that also responds to websocket traffic, although the contents of the frames are AES-CBC encrypted with a key derived from HMAC(PSK,"ENC") and authenticated with SHA256-HMAC using another key derived from HMAC(PSK,"MAC"). The encrypted messages are send as binary data over the websocket (type 0x82).

Example message published to homeconnect/washer:

{
	"state": "Ready",
	"door": "Closed",
	"remaining": "3:48",
	"power": true,
	"lowwaterpressure": false,
	"aquastop": false,
	"error": false,
	"remainingseconds": 13680
}
Full state information
{
	'BackendConnected': False,
	'CustomerEnergyManagerPaired': False,
	'CustomerServiceConnectionAllowed': False,
	'DoorState': 'Open',
	'FlexStart': 'Disabled',
	'LocalControlActive': False,
	'OperationState': 'Ready',
	'RemoteControlActive': True,
	'RemoteControlStartAllowed': False,
	'WiFiSignalStrength': -50,
	'LoadInformation': 0,
	'AquaStopOccured': 'Off',
	'CustomerServiceRequest': 'Off',
	'LowWaterPressure': 'Off',
	'ProgramFinished': 'Off',
	'SoftwareUpdateAvailable': 'Off',
	'WaterLevelTooHigh': 'Off',
	'DoorNotLockable': 'Off',
	'DoorNotUnlockable': 'Off',
	'DoorOpen': 'Off',
	'FatalErrorOccured': 'Off',
	'FoamDetection': 'Off',
	'DrumCleanReminder': 'Off',
	'PumpError': 'Off',
	'ReleaseRinseHoldPending': 'Off',
	'EnergyForecast': 20,
	'EstimatedTotalProgramTime': 13680,
	'FinishInRelative': 13680,
	'FlexFinishInRelative': 0,
	'ProgramProgress': 0,
	'RemainingProgramTime': 13680,
	'RemainingProgramTimeIsEstimated': True,
	'WaterForecast': 40,
	'LoadRecommendation': 10000,
	'ProcessPhase': 4,
	'ReferToProgram': 0,
	'LessIroning': False,
	'Prewash': False,
	'RinseHold': False,
	'RinsePlus': 0,
	'SilentWash': False,
	'Soak': False,
	'SpeedPerfect': False,
	'SpinSpeed': 160,
	'Stains': 0,
	'Temperature': 254,
	'WaterPlus': False,
	'AllowBackendConnection': False,
	'AllowEnergyManagement': False,
	'AllowFlexStart': False,
	'ChildLock': False,
	'Language': 'En',
	'PowerState': 'On',
	'EndSignalVolume': 'Medium',
	'KeySignalVolume': 'Loud',
	'EnableDrumCleanReminder': True,
	'ActiveProgram': 0,
	'SelectedProgram': 28718
}

Coffee Machine

Image of the coffee machine from the Siemens website

The coffee machine needs a better mapping to MQTT messages.

Full state information
{
	'LastSelectedBeverage': 8217,
	'LocalControlActive': False,
	'PowerSupplyError': 'Off',
	'DripTrayNotInserted': 'Off',
	'DripTrayFull': 'Off',
	'WaterFilterShouldBeChanged': 'Off',
	'WaterTankEmpty': 'Off',
	'WaterTankNearlyEmpty': 'Off',
	'BrewingUnitIsMissing': 'Off',
	'SelectedProgram': 0,
	'MacchiatoPause': '5Sec',
	'ActiveProgram': 0,
	'BeverageCountdownWaterfilter': 48,
	'BeverageCountdownCalcNClean': 153,
	'RemoteControlStartAllowed': True,
	'EmptyDripTray': 'Off',
	'BeverageCountdownDescaling': 153,
	'EmptyDripTrayRemoveContainer': 'Off',
	'BeverageCounterRistrettoEspresso': 177,
	'AllowBackendConnection': True,
	'BeverageCounterHotWater': 37351,
	'RemindForMilkAfter': 'Off',
	'BeverageCounterFrothyMilk': 22,
	'BeverageCounterCoffeeAndMilk': 1077,
	'CustomerServiceRequest': 'Off',
	'4645': 0,
	'CoffeeMilkOrder': 'FirstCoffee',
	'BackendConnected': True,
	'BeverageCounterCoffee': 21,
	'Enjoy': 'Off',
	'UserMode': 'Barista',
	'PlaceEmptyGlassUnderOutlet': 'Off',
	'WaterTankNotInserted': 'Off',
	'PlaylistRunning': False,
	'BeverageCounterPowderCoffee': 9,
	'DemoModeActive': False,
	'CleanBrewingUnit': 'Off',
	'WaterHardness': 'Medium',
	'CloseDoor': 'Off',
	'EmptyMilkTank': 'Off',
	'SpecialRinsing': 'Off',
	'AllowConsumerInsights': False,
	'SwitchOffAfter': '01Hours15Minutes',
	'4681': 0,
	'LastSelectedCoffeeWorldBeverage': 20514,
	'BrightnessDisplay': 7,
	'CleanMilkTank': 'Off',
	'NotEnoughWaterForThisKindOfBeverage': 'Off',
	'ChildLock': False,
	'4666': 0,
	'Language': 'De',
	'MilkContainerConnected': 'Off',
	'SoftwareUpdateAvailable': 'Off',
	'LeaveProfilesAutomatically': True,
	'RemoveWaterFilter': 'Off',
	'OperationState': 'Inactive',
	'BeverageCounterHotMilk': 9,
	'4362': 0,
	'MilkTubeRemoved': 'Off',
	'DeviceIsToCold4C': 'Off',
	'SystemHasRunDry': 'Off',
	'DeviceShouldBeDescaled': 'Off',
	'PowerState': 'Standby',
	'DeviceShouldBeCleaned': 'Off',
	'DeviceShouldBeCalcNCleaned': 'Off',
	'BeanContainerEmpty': 'Off',
	'MilkStillOK': 'Off',
	'CoffeeOutletMissing': 'Off',
	'MilkReminder': 'Off',
	'RefillEmptyWaterTank': 'Off',
	'RefillEmptyBeanContainer': 'Off',
	'UnderOverVoltage': 'Off',
	'NotEnoughPomaceCapacityForThisKindOfBeverage': 'Off',
	'AdjustGrindSetting': 'Off',
	'InsertWaterFilter': 'Off',
	'FillDescaler': 'Off',
	'CleanFillWaterTank': 'Off',
	'PlaceContainerUnderOutlet': 'Off',
	'SwitchOffPower30sekBackOn': 'Off',
	'ThrowCleaningDiscInTheDrawer': 'Off',
	'RemoveMilkContainer': 'Off',
	'RemoveContainerUnderOutlet': 'Off',
	'MilkContainerRemoved': 'Off',
	'ServiceProgramFinished': 'Off',
	'DeviceDescalingOverdue': 'Off',
	'DeviceDescalingBlockage': 'Off',
	'CustomerServiceConnectionAllowed': False,
	'BeverageCountdownCleaning': 38,
	'ProcessPhase': 'None'
}

FRIDA tools

Moved to README-frida.md

More Repositories

1

spispy

An open source SPI flash emulator and monitor
Verilog
339
star
2

LEDscape

Beagle Bone Black cape and firmware for driving a large number of WS281x LED strips.
C
280
star
3

safeboot

Scripts to slightly improve the security of the Linux boot process with UEFI Secure Boot and TPM support
Shell
270
star
4

papercraft

Unfolding STL models to make laser cut patterns
C
260
star
5

airbreak

CPAP jailbreak to allow it to be used as a temporary ventilator
Assembly
258
star
6

esp32-ttgo

Code for the TT GO ESP32 module
156
star
7

rwmem

Read and write physical memory on OS X
C
136
star
8

pixel-wrangler

HDMI to whatever adapter
Verilog
104
star
9

plotter-vision

Hidden Wireframe removal demo in p5.js
JavaScript
87
star
10

eink-pricetags

Reverse engineering cheap e-ink price tags
C
87
star
11

up5k

Upduino v2 with the ice40 up5k FPGA demos
Verilog
78
star
12

charliewatch

An "analog" version of Travis Goodspeed's Goodwatch
C
77
star
13

vst

Software for the v.st vector boards
Processing
76
star
14

safeboot-loader

Linux kernel module to use UEFI Block IO Protocol devices. Probably not a good idea.
C
72
star
15

lighthouse

Arduino and Processng library to interface with the HTC Vive Lighthouse beacons
Eagle
69
star
16

disassembly

Reverse engineering and disassembly examples
C
51
star
17

ZbPy

MicroPython IEEE802.15.4 / Zigbee parser
Python
44
star
18

mdt9100

Motorolla Mobile Data Terminal MDT9100 interface for the BeagleBone Black
C++
41
star
19

classicmac

Mac 128/Plus/SE hardware interface using the BeagleBone Black PRU.
C
33
star
20

risc8

Mostly AVR compatible FPGA soft-core
Verilog
25
star
21

cosign

Cooperative RSA signing
Python
25
star
22

jumphost

ssh jump host appliance
Makefile
25
star
23

DynamicTemplates

Import of the DIY Dynamic Template v2, retrieved from the Internet Archive
C++
22
star
24

linux-builder

Scripts to build the Linux kernel from a config file and initrd from a list of programs
Python
19
star
25

flashtools

Simplified version of flashrom for installing new system firmware
C
18
star
26

soft-ssb

PSK31 over SSB for the teensy 3.1 implemented entirely in software
Arduino
17
star
27

psionpi

Raspberry Pi board to fit in a Psion PDA
Verilog
14
star
28

unicodedots

Draws pictures with Unicode Braille characters
Perl
13
star
29

bioswrite

Command line tool to write to x86 boot flash chips via the PCH
C
12
star
30

p5.projection

p5js library for projection mapping
JavaScript
12
star
31

polargraph

A hackish polargraph plotting tool
C
11
star
32

advent

The original Colossal Cave adventure in FORTRAN IV
Fortran
11
star
33

modelf

USB interface for the IBM Model F AT keyboard
Arduino
11
star
34

servostep

Closed loop servo control for stepper motors
Arduino
10
star
35

sneekbot

Snake robot built with the LX16A servos
C++
10
star
36

uxen

Clone of Bromium's public release of uxen-4.0 and uxen-4.1
C
10
star
37

rotary

Rotary phone interface for the Adafruit FONA boards
Eagle
9
star
38

rgblaser

RGB laser projector controller built on a teensy 3
Eagle
8
star
39

gamebadge

Gameboy emulator for the SHA2017 e-ink badge
C
8
star
40

sbsigntools

Clone of https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git/ with patches for yubikey support
C
8
star
41

neyes

ASCII art version of xeyes, implemented with ncurses and xterm mouse mode
C
8
star
42

prom

PROM reader
C
7
star
43

overtime

When is the next GVB ferry, bus or tram arriving
C
7
star
44

safeboot-attest

Remote attestation for the safeboot system
Python
7
star
45

enigma

3D Printable Pocket Enigma machine
OpenSCAD
7
star
46

moon-watch

Moon phase and solar time watch face for the Skagen Hybrid
JavaScript
7
star
47

flora

FLORA and Pixel class examples
Arduino
7
star
48

teensyv

Vector display for the Teensy 3
C
7
star
49

hackerspace-zone

Self-hosted, single-sign-on community server
Shell
7
star
50

slackwrap

Wrap the slack API around stdin/stdout
Perl
6
star
51

barcode

Generating barcodes with Unicode characters
Perl
6
star
52

xkeyscore

Twitter notification filter
JavaScript
6
star
53

spiflash

Teensy based SPI flash programmer
C++
6
star
54

ArduinoVoice

Port of the SAM c64 software to the Arduino
C
6
star
55

iomonitor

Trace IO calls in a process
Perl
5
star
56

fpga-class

Intro to FPGA class projects
Verilog
5
star
57

ssss

Shamir's Secret Sharing Scheme
C
5
star
58

ft817

Yaesu FT-817nd serial port interface
C
5
star
59

voyager

Signal processing of the images on the Voyager Golden Record
Perl
5
star
60

model100

TRS-80 Model 100 FPGA board
C
5
star
61

ncube

nCube supercomputer documentation
5
star
62

gcc-0.9

gcc-0.9 from 1987
C
5
star
63

train-display

NS train display LED matrix
Verilog
4
star
64

bx3-sdk

Import of BX3 SDK for RF03 BlueX SoC
C
4
star
65

litefestival

Guerilla projection art for the Amsterdam "Lite" Festival
JavaScript
4
star
66

soldertime

Firmware for the Spikenzie Labs Solder:Time DeskClock
Arduino
4
star
67

sparktime

Spark Core demo
C
4
star
68

orrery

3D printable orrery with six planets and one moon. VERY DRAFT!
OpenSCAD
4
star
69

safeboot-hcp

Host Certificate tools
Shell
3
star
70

symbolics

Symbolics keyboard interface
Arduino
3
star
71

pdfcal

Page-per-day calendar generator for Remarkable tablet
Python
3
star
72

openscad

OpenSCAD tutorial
3
star
73

secret-cards

JavaScript
3
star
74

kexec-load

Wrapper around the kexec_load system call
C
2
star
75

mondriaan

Mondriaan Art project
JavaScript
2
star
76

fft-doodle

Doodle some lines and see the FFT of them
JavaScript
2
star
77

orion

Constellation PCB art
2
star
78

hushcon

Hushcon 2016 pagers
C++
2
star
79

curves

Fractal curves
Perl
2
star
80

gnomon

3D printed or laser cut digital sundial
OpenSCAD
2
star
81

october-first

The October First committee notes
2
star
82

SketchSaver

Saves your Arduino sketches into the flash so that you can recover them later
C++
2
star
83

avr-video

AVR NTSC video generator and character overlay using two resistors and a LM1881 video sync separator.
C
2
star
84

vectorscope

Import of bitbucket.com/hudson/vectorscope
C
2
star
85

cyclops

Attempt to build a cyclops camera with RAM chips
C++
2
star
86

laserchess

Port of the 1987 Compute! magazine LaserChess game (Amiga BASIC version)
JavaScript
2
star
87

epilog

Command line laser cutting tool for Epilog cutters
C
2
star
88

gcc-1.21

Ancient version of gcc
C
1
star
89

markovtrek

Markov generated Startrek episodes
Perl
1
star
90

spacerocks2000

Spacerocks 2000, an updated version of the Arduino spacerocks game
JavaScript
1
star
91

gemma-bootloader

An Adafruit GEMMA/Trinket compatible bootloader
C
1
star
92

augustine

Augustine's 16th Law
R
1
star
93

pario

Parallel IO using the BeagleBone Black PRU
C
1
star
94

nbody

A p5js n-body simulation
JavaScript
1
star
95

rowblue

ESP32 BLE interface for generic rowing machines to Zwift and other services
C
1
star
96

pendant

Holly's Burning Man pendant
Arduino
1
star
97

ikwilcoronabooster

Static site for finding the current year of Netherlands corona boosters
HTML
1
star
98

diceroll-games

Multiparty cryptographic dice
JavaScript
1
star
99

intercom-kiosk

Intercom front end for the house using mqtt and reolink
JavaScript
1
star
100

truchet

Truchet Tile svg generator for plotting
HTML
1
star