3d printer related updates.

This commit is contained in:
Mahasri Kalavala 2020-09-13 11:56:40 -04:00
parent 55880380a0
commit 2a21e5760c
4 changed files with 153 additions and 60 deletions

View File

@ -1,7 +1,6 @@
title: Camera Live
icon: mdi:cctv
cards:
- type: horizontal-stack
cards:
- type: "custom:button-card"
@ -13,7 +12,7 @@ cards:
- font-weight: bold
- color: rgb(0, 0, 5)
state:
- value: 'frontyard'
- value: "frontyard"
color: var(--primary-color)
action: service
service:
@ -29,7 +28,7 @@ cards:
- font-weight: bold
- color: rgb(0, 0, 5)
state:
- value: 'driveway'
- value: "driveway"
color: var(--primary-color)
action: service
service:
@ -45,7 +44,7 @@ cards:
- font-weight: bold
- color: rgb(0, 0, 5)
state:
- value: 'patio'
- value: "patio"
color: var(--primary-color)
action: service
service:
@ -61,7 +60,7 @@ cards:
- font-weight: bold
- color: rgb(0, 0, 5)
state:
- value: 'playarea'
- value: "playarea"
color: var(--primary-color)
action: service
service:
@ -75,7 +74,7 @@ cards:
camera_image: camera.frontdoor_camera
camera_view: live
show_info: true
tap_action:
tap_action:
action: more-info
entities:
- switch.frontyard_light
@ -88,7 +87,7 @@ cards:
entity: camera.patio_camera
camera_image: camera.patio_camera
show_info: true
tap_action:
tap_action:
action: more-info
entities:
- switch.wemobackyardlightswitch
@ -101,7 +100,7 @@ cards:
entity: camera.driveway_camera
camera_image: camera.driveway_camera
show_info: true
tap_action:
tap_action:
action: more-info
entities:
- switch.frontyard_light
@ -115,7 +114,7 @@ cards:
entity: camera.playarea_camera
camera_image: camera.playarea_camera
show_info: true
tap_action:
tap_action:
action: more-info
entities:
- switch.wemobackyardlightswitch
@ -128,7 +127,7 @@ cards:
entity: camera.garage_camera
camera_image: camera.garage_camera
show_info: true
tap_action:
tap_action:
action: more-info
entities:
- switch.garage
@ -136,17 +135,29 @@ cards:
- binary_sensor.two_car_garage_door_tilt_sensor_sensor
- type: picture-glance
id: camera_kitchen_camera
title: Kitchen Camera
entity: camera.kitchen_camera
camera_image: camera.kitchen_camera
id: camera_3dprinter_camera
title: 3D Printer Camera
entity: camera.3d_printer_camera
camera_image: camera.3d_printer_camera
show_info: true
tap_action:
tap_action:
action: more-info
entities:
- switch.kitchen
- binary_sensor.kitchen_camera_motion
- binary_sensor.back_door_sensor_sensor
- binary_sensor.motion_sensor_158d00016c2d0e
- binary_sensor.octoprint_printing
# - type: picture-glance
# id: camera_kitchen_camera
# title: Kitchen Camera
# entity: camera.kitchen_camera
# camera_image: camera.kitchen_camera
# show_info: true
# tap_action:
# action: more-info
# entities:
# - switch.kitchen
# - binary_sensor.kitchen_camera_motion
# - binary_sensor.back_door_sensor_sensor
# - type: picture-glance
# id: camera_frontroom_camera
@ -154,7 +165,7 @@ cards:
# entity: camera.frontroom_camera
# camera_image: camera.frontroom_camera
# show_info: true
# tap_action:
# tap_action:
# action: more-info
# entities:
# - binary_sensor.frontdoor_camera_motion

View File

@ -11,6 +11,7 @@ cards:
action: more-info
entities:
- binary_sensor.motion_sensor_158d00016c2d0e
- binary_sensor.octoprint_printing
- type: vertical-stack
cards:
@ -26,24 +27,16 @@ cards:
show_header_toggle: false
entities:
- binary_sensor.octoprint_printing
- binary_sensor.octoprint_printing_error
- sensor.octoprint_actual_bed_temp
- sensor.octoprint_actual_tool0_temp
- sensor.octoprint_current_state
- sensor.octoprint_job_percentage
- sensor.octoprint_target_bed_temp
- sensor.octoprint_target_tool0_temp
- sensor.octoprint_time_elapsed
- sensor.octoprint_time_remaining
- type: entities
title: Percentage Complete
show_header_toggle: false
entities:
- input_boolean.twenty_five_percent
- input_boolean.fifty_percent
- input_boolean.seventy_five_percent
- input_boolean.hundred_percent
- binary_sensor.octoprint_printing_error
- entity: sensor.octoprint_actual_bed_temp_c
name: Print Bed Temperature
- entity: sensor.octoprint_target_bed_temp_c
name: Target Bed Temperature
- entity: sensor.octoprint_actual_tool0_temp_c
name: Extruder Temperature
- entity: sensor.octoprint_target_tool0_temp_c
name: Extruder Target Temperature
- type: entities
title: Print Times
@ -53,10 +46,18 @@ cards:
name: Elapsed
- entity: sensor.time_estimated
name: Estimated
- entity: sensor.print_completion
name: Print Completion
- type: entities
title: 3D Printer
title: 3D Printer Settings
show_header_toggle: false
entities:
- input_boolean.power_off_when_complete
- input_boolean.send_progress_pictures
- type: entities
title: 3D Printer Control
show_header_toggle: false
entities:
- switch.3d_printer
- input_boolean.power_off_when_complete

View File

@ -32,8 +32,12 @@ input_boolean:
power_off_when_complete:
name: Auto Shutoff When Done
initial: "off"
icon: mdi:toggle-switch-off
send_progress_pictures:
name: Send Telegram Pictures
icon: mdi:toggle-switch-off
#
# Octoprint Camera URL in the format
# still_image_url: "http://192.xxx.xxx.xxx/webcam/?action=snapshot"
@ -80,6 +84,56 @@ sensor:
{% endmacro %}
{{ secondsToReadableString(states('sensor.octoprint_time_remaining') |int) }}
- platform: template
sensors:
print_completion:
value_template: >
{{ (now().strftime('%s') |int + states('sensor.octoprint_time_remaining')|int ) | timestamp_custom("%A %D %H:%M %p") }}
- platform: template
sensors:
octoprint_actual_bed_temp_c:
unit_of_measurement: "C"
value_template: >
{%- macro F2C(temperature) -%}
{% set tmp = (((temperature - 32) *5)/9) %}
{{- " %0.2f" % tmp }}
{%- endmacro -%}
{{ F2C(states('sensor.octoprint_actual_bed_temp') |int ) |int }}
- platform: template
sensors:
octoprint_actual_tool0_temp_c:
unit_of_measurement: "C"
value_template: >
{%- macro F2C(temperature) -%}
{% set tmp = (((temperature - 32) *5)/9) %}
{{- " %0.2f" % tmp }}
{%- endmacro -%}
{{ F2C(states('sensor.octoprint_actual_tool0_temp') |int ) |int }}
- platform: template
sensors:
octoprint_target_bed_temp_c:
unit_of_measurement: "C"
value_template: >
{%- macro F2C(temperature) -%}
{% set tmp = (((temperature - 32) *5)/9) %}
{{- " %0.2f" % tmp }}
{%- endmacro -%}
{{ F2C(states('sensor.octoprint_target_bed_temp') |int ) |int }}
- platform: template
sensors:
octoprint_target_tool0_temp_c:
unit_of_measurement: "C"
value_template: >
{%- macro F2C(temperature) -%}
{% set tmp = (((temperature - 32) *5)/9) %}
{{- " %0.2f" % tmp }}
{%- endmacro -%}
{{ F2C(states('sensor.octoprint_target_tool0_temp') |int ) |int }}
automation:
#
# Notify when the printer status changed from "Prnting" to anything.
@ -189,3 +243,30 @@ automation:
entity_id: input_boolean.seventy_five_percent
- service_template: input_boolean.turn_off
entity_id: input_boolean.hundred_percent
#
# If the printer is ON and is "Printing", it will send a snapshot/picture every 30 minutes
#
- alias: "Send 3D Print Pictures"
trigger:
platform: time_pattern
minutes: "/30"
seconds: 00
condition:
- condition: template
value_template: "{{ states('input_boolean.send_progress_pictures') == 'on' }}"
- condition: template
value_template: "{{ states('sensor.octoprint_current_state') | lower == 'printing' }}"
action:
- service: camera.snapshot
data:
entity_id: camera.3d_printer_camera
filename: "/home/homeassistant/.homeassistant/www/downloads/camera/3dprinter/print_latest.jpg"
- service: notify.telegram
data:
title: "3D Printer"
message: "Print Progress"
data:
photo:
- file: "/home/homeassistant/.homeassistant/www/downloads/camera/3dprinter/print_latest.jpg"
caption: "3D Print Progress"

View File

@ -48,7 +48,7 @@
<CommandClasses>
<CommandClass id="32" name="COMMAND_CLASS_BASIC" version="1" request_flags="4" innif="true" setasreport="true">
<Instance index="1" />
<Value type="byte" genre="basic" instance="1" index="0" label="Basic" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="255" />
<Value type="byte" genre="basic" instance="1" index="0" label="Basic" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
</CommandClass>
<CommandClass id="48" name="COMMAND_CLASS_SENSOR_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
@ -289,9 +289,9 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="75.6" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="2" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="45" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="77.4" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="13" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="55" />
<Value type="decimal" genre="user" instance="1" index="27" label="Ultraviolet" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" innif="true">
@ -575,11 +575,11 @@
</CommandClass>
<CommandClass id="50" name="COMMAND_CLASS_METER" version="3" request_flags="2" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="0" label="Energy" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="61.637" />
<Value type="decimal" genre="user" instance="1" index="1" label="Previous Reading" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="61.634" />
<Value type="int" genre="user" instance="1" index="2" label="Interval" units="seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="15741" />
<Value type="decimal" genre="user" instance="1" index="0" label="Energy" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="61.692" />
<Value type="decimal" genre="user" instance="1" index="1" label="Previous Reading" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="61.692" />
<Value type="int" genre="user" instance="1" index="2" label="Interval" units="seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="309" />
<Value type="decimal" genre="user" instance="1" index="8" label="Power" units="W" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0.000" />
<Value type="decimal" genre="user" instance="1" index="16" label="Voltage" units="V" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="120.393" />
<Value type="decimal" genre="user" instance="1" index="16" label="Voltage" units="V" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="119.628" />
<Value type="decimal" genre="user" instance="1" index="20" label="Current" units="A" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0.000" />
<Value type="bool" genre="user" instance="1" index="32" label="Exporting" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<Value type="button" genre="system" instance="1" index="33" label="Reset" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
@ -749,7 +749,7 @@
</CommandClass>
<CommandClass id="129" name="COMMAND_CLASS_CLOCK" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="list" genre="user" instance="1" index="0" label="Day" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="3" size="1">
<Value type="list" genre="user" instance="1" index="0" label="Day" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="2" size="1">
<Item label="Monday" value="1" />
<Item label="Tuesday" value="2" />
<Item label="Wednesday" value="3" />
@ -758,8 +758,8 @@
<Item label="Saturday" value="6" />
<Item label="Sunday" value="7" />
</Value>
<Value type="byte" genre="user" instance="1" index="1" label="Hour" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="11" />
<Value type="byte" genre="user" instance="1" index="2" label="Minute" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="12" />
<Value type="byte" genre="user" instance="1" index="1" label="Hour" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="1" />
<Value type="byte" genre="user" instance="1" index="2" label="Minute" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="31" />
</CommandClass>
<CommandClass id="130" name="COMMAND_CLASS_HAIL" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -794,7 +794,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="17" name="" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Node id="17" name="" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Manufacturer id="14a" name="Ecolink">
<Product type="4" id="1" name="Motion Detector" />
</Manufacturer>
@ -1205,7 +1205,7 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="7" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="78.26" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="76.10" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" innif="true">
<Instance index="1" />
@ -1299,7 +1299,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="29" name="" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="29" name="" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="14a" name="Ecolink">
<Product type="4" id="2" name="Door/Window Sensor" />
</Manufacturer>
@ -1405,7 +1405,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="34" name="" location="" basic="4" generic="33" specific="1" roletype="6" devicetype="3079" nodetype="0" type="Routing Multilevel Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="34" name="" location="" basic="4" generic="33" specific="1" roletype="6" devicetype="3079" nodetype="0" type="Routing Multilevel Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="86" name="AEON Labs">
<Product type="102" id="64" name="ZW100 MultiSensor 6" />
</Manufacturer>
@ -1415,7 +1415,7 @@
</CommandClass>
<CommandClass id="48" name="COMMAND_CLASS_SENSOR_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
<SensorMap index="0" type="27" />
<SensorMap index="0" type="31" />
<SensorMap index="0" type="224" />
@ -1423,9 +1423,9 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="82.0" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="38" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="79.7" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="6" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="49" />
<Value type="decimal" genre="user" instance="1" index="27" label="Ultraviolet" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" innif="true">
@ -1605,7 +1605,7 @@
<Value type="byte" genre="user" instance="1" index="0" label="Alarm Type" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="1" label="Alarm Level" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="2" label="SourceNodeId" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="8" />
</CommandClass>
<CommandClass id="114" name="COMMAND_CLASS_MANUFACTURER_SPECIFIC" version="1" request_flags="4" innif="true">
<Instance index="1" />
@ -1678,7 +1678,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="38" name="" location="" basic="4" generic="7" specific="1" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Node id="38" name="" location="" basic="4" generic="7" specific="1" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Session">
<Manufacturer id="0" name="">
<Product type="0" id="0" name="" />
</Manufacturer>