Skip to content

Instantly share code, notes, and snippets.

@d03n3rfr1tz3
Created December 6, 2021 21:35
Show Gist options
  • Save d03n3rfr1tz3/af9b39b3f62a7c0ad1e5a7372a3ba7fe to your computer and use it in GitHub Desktop.
Save d03n3rfr1tz3/af9b39b3f62a7c0ad1e5a7372a3ba7fe to your computer and use it in GitHub Desktop.
HomeAssistant: Bresser REX 3D-Drucker
switch:
- platform: command_line
switches:
keller_druckerlicht:
friendly_name: "3D-Drucker: LED"
command_on: >-
printf "~M146 r255 g255 b255 F0" | nc 192.168.0.123 8899
command_off: >-
printf "~M146 r0 g0 b0 F0" | nc 192.168.0.123 8899
sensor:
- platform: tcp
name: "3D-Drucker: Temperatur des Extruder"
host: 192.168.0.123
port: 8899
payload: "~M105"
value_template: "{{ value.split(':')[1].split('/')[0] | trim | float | round(0) }}"
unit_of_measurement: '°C'
scan_interval: 60
- platform: tcp
name: "3D-Drucker: Temperatur der Druckplatte"
host: 192.168.0.123
port: 8899
payload: "~M105"
value_template: "{{ value.split(':')[2].split('/')[0] | trim | float | round(0) }}"
unit_of_measurement: '°C'
scan_interval: 60
- platform: tcp
name: "3D-Drucker: Fortschritt des Drucks"
host: 192.168.0.123
port: 8899
payload: "~M27"
value_template: "{{ value.split('byte')[1].split('/')[0] | trim | float }}"
unit_of_measurement: '%'
scan_interval: 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment