fixed Tensorflow integration

This commit is contained in:
Mahasri Kalavala 2020-09-13 14:44:14 -04:00
parent 2a21e5760c
commit c252626d3a
7 changed files with 71 additions and 36 deletions

View File

@ -15,7 +15,7 @@ homeassistant:
customize_domain: !include customize_domain.yaml
packages: !include_dir_named packages
whitelist_external_dirs:
allowlist_external_dirs:
- "/home/homeassistant/.homeassistant/www/downloads/camera/patio/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/garage/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/playarea/"
@ -23,6 +23,7 @@ homeassistant:
- "/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/kitchen/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/frontroom/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/3dprinter/"
sun:
alexa:

View File

@ -46,6 +46,15 @@ cards:
tap_action:
action: more-info
- type: picture-entity
id: camera_3dprinter_latest_scan
title: 3D Printer Latest Scan
entity: camera.3dprinter_latest_scan
camera_image: camera.3d_printer_camera
show_info: true
tap_action:
action: more-info
- type: entities
title: Image Processing
show_header_toggle: false
@ -60,3 +69,5 @@ cards:
name: Patio Camera
- entity: image_processing.tensorflow_playarea_camera
name: Playarea Camera
- entity: image_processing.tensorflow_3d_printer_camera
name: 3D Printer Camera

View File

@ -6,12 +6,9 @@ cards:
show_header_toggle: false
entities:
- automation.family_room_cube_event_flip180
- automation.family_room_cube_event_flip180_2
- automation.family_room_cube_event_flip90
- automation.family_room_cube_event_move
- automation.family_room_cube_event_move_2
- automation.family_room_cube_event_shake
- automation.family_room_cube_event_shake_2
- automation.family_room_cube_event_tap_twice
- automation.front_room_cube_event_flip90
- automation.hasika_room_cube_event_flip90
@ -95,13 +92,23 @@ cards:
- automation.upstairs_aroma_timer_start
- automation.wfh_timer_start
- type: entities
title: 3D Printer Automations
show_header_toggle: false
entities:
- automation.3d_print_send_telegram_pictures
- automation.3d_print_job_finished
- automation.3d_print_progress_update
- automation.3d_print_state_changed
- automation.3d_print_notify_printer_state
- automation.3d_print_notify_printer_error
- type: entities
title: Garage Automations
show_header_toggle: false
entities:
- automation.garage_lights_on_when_door_is_opened
- automation.garage_motion_reset
- automation.garage_motion_timer
- automation.garage_timer_elapsed
- automation.garage_timer_start_when_garage_lights_on
- automation.notify_garage_door_status

View File

@ -60,4 +60,16 @@ cards:
title: 3D Printer Control
show_header_toggle: false
entities:
- switch.3d_printer
- entity: switch.3d_printer
name: Ender 3 Pro 3D Printer
- type: entities
title: 3D Printer Automations
show_header_toggle: false
entities:
- automation.3d_print_send_telegram_pictures
- automation.3d_print_job_finished
- automation.3d_print_progress_update
- automation.3d_print_state_changed
- automation.3d_print_notify_printer_state
- automation.3d_print_notify_printer_error

View File

@ -139,7 +139,7 @@ automation:
# Notify when the printer status changed from "Prnting" to anything.
# Use this later to determine if you want to turn off printer or not
#
- alias: "Octoprint 3D Print"
- alias: "3D Print State Changed"
trigger:
platform: state
entity_id: "sensor.octoprint_current_state"
@ -152,7 +152,7 @@ automation:
#
# Updates on the Printer Status
#
- alias: "Octoprint Notify Printer State"
- alias: "3D Print Notify Printer State"
trigger:
platform: state
entity_id: "binary_sensor.octoprint_printing"
@ -164,7 +164,7 @@ automation:
#
# Notifies when the printer errors out
#
- alias: "Octoprint Noify Printer Error"
- alias: "3D Print Notify Printer Error"
trigger:
platform: state
entity_id: binary_sensor.octoprint_printing_error
@ -177,7 +177,7 @@ automation:
#
# Updates appropriate input booleans based on percentage complete
#
- alias: "Update Percentage Booleans"
- alias: "3D Print Update Percentage Booleans"
trigger:
platform: state
entity_id: sensor.octoprint_job_percentage
@ -194,7 +194,7 @@ automation:
#
# Provides update at frequent intervals - 25%, 50%, 75%, and 100%!
#
- alias: "Octoprint 3D Printer Progress Update"
- alias: "3D Print Progress Update"
trigger:
platform: state
entity_id: input_boolean.twenty_five_percent, input_boolean.fifty_percent, input_boolean.seventy_five_percent, input_boolean.hundred_percent
@ -221,7 +221,7 @@ automation:
# Resetting input boleans is not necessary as they get updated automatically when
# octoprint job percentage value chaanges... but why not?
#
- alias: "Job Finished"
- alias: "3d Print Job Finished"
trigger:
platform: state
entity_id: input_boolean.hundred_percent
@ -247,7 +247,7 @@ automation:
#
# If the printer is ON and is "Printing", it will send a snapshot/picture every 30 minutes
#
- alias: "Send 3D Print Pictures"
- alias: "3D Print Send Telegram Pictures"
trigger:
platform: time_pattern
minutes: "/30"
@ -263,10 +263,10 @@ automation:
entity_id: camera.3d_printer_camera
filename: "/home/homeassistant/.homeassistant/www/downloads/camera/3dprinter/print_latest.jpg"
- service: notify.telegram
data:
data_template:
title: "3D Printer"
message: "Print Progress"
data:
photo:
- file: "/home/homeassistant/.homeassistant/www/downloads/camera/3dprinter/print_latest.jpg"
caption: "3D Print Progress"
caption: "3D Print Progress at {{ states('sensor.octoprint_job_percentage') }}%"

View File

@ -72,6 +72,9 @@ camera:
- platform: local_file
name: Garage Latest Scan
file_path: "/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_latest.jpg"
- platform: local_file
name: 3dPrinter Latest Scan
file_path: "/home/homeassistant/.homeassistant/www/downloads/camera/3dprinter/print_latest.jpg"
binary_sensor:
- platform: hikvision
@ -112,11 +115,12 @@ image_processing:
- entity_id: camera.patio_camera
- entity_id: camera.playarea_camera
- entity_id: camera.garage_camera
- entity_id: camera.3d_printer_camera
file_out:
- "/home/homeassistant/.homeassistant/www/downloads/camera/{{- camera_entity.split('.')[1].split('_')[0] -}}/{{ camera_entity.split('.')[1].split('_')[0] }}_latest.jpg"
- "/home/homeassistant/.homeassistant/www/downloads/camera/{{- camera_entity.split('.')[1].split('_')[0] -}}/{{ camera_entity.split('.')[1].split('_')[0] }}_{{ now().strftime('%Y%m%d_%H%M%S') }}.jpg"
model:
graph: /home/homeassistant/.homeassistant/tensorflow/
graph: /home/homeassistant/.homeassistant/tensorflow/models/efficientdet_d0_coco17_tpu-32/
# graph: /home/homeassistant/.homeassistant/tensorflow/frozen_inference_graph.pb
# categories:
# - person

View File

@ -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="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="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="79.8" />
<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="21" />
<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="54" />
<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">
@ -577,9 +577,9 @@
<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.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="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="280" />
<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="119.628" />
<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="118.833" />
<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" />
@ -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="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" />
<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="4" />
<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="27" />
</CommandClass>
<CommandClass id="130" name="COMMAND_CLASS_HAIL" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -779,7 +779,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="16" 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="WakeUp">
<Node id="16" 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">
<Manufacturer id="0" name="">
<Product type="0" id="0" name="" />
</Manufacturer>
@ -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="Complete">
<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">
<Manufacturer id="14a" name="Ecolink">
<Product type="4" id="1" name="Motion Detector" />
</Manufacturer>
@ -1190,7 +1190,7 @@
</Manufacturer>
<CommandClasses />
</Node>
<Node id="28" name="" location="" basic="4" generic="24" specific="1" roletype="6" devicetype="3073" nodetype="0" type="Basic Wall Controller" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="28" name="" location="" basic="4" generic="24" specific="1" roletype="6" devicetype="3073" nodetype="0" type="Basic Wall Controller" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="14a" name="Ecolink">
<Product type="5" id="f" name="FireFighter" />
</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="True" />
<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" />
<SensorMap index="0" type="27" />
<SensorMap index="0" type="31" />
<SensorMap index="0" type="224" />
@ -1423,8 +1423,8 @@
</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="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="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="81.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="8" />
<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>
@ -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="8" />
<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" />
</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="Session">
<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">
<Manufacturer id="0" name="">
<Product type="0" id="0" name="" />
</Manufacturer>