Permalink
Browse files

mqtt controlled tweeting of live webcam image

  • Loading branch information...
mkfink committed Mar 18, 2018
1 parent 586ed01 commit 5c47494b02aba9887bb2a2174660f61756ca57f9
Showing with 33 additions and 5 deletions.
  1. +1 −0 .gitignore
  2. +11 −1 automations/automations.yaml
  3. +3 −4 configuration.yaml
  4. +7 −0 notify.yaml
  5. +10 −0 scripts.yaml
  6. +1 −0 shell_commands.yaml
@@ -10,3 +10,4 @@ home-assistant_v2.db-wal
compiled/*
apps/__pycache__/*
*.swp
tmp/*
@@ -372,4 +372,14 @@
to: "No"
action:
service: switch.turn_off
entity_id: switch.Recycle_Notification_Light
entity_id: switch.Recycle_Notification_Light
- alias: Tweet photo from camera
trigger:
# this is just a temporary topic sent by the disco button
platform: mqtt
topic: stat/i3/inside/commons/disco/POWER
payload: "ON"
action:
service: script.turn_on
entity_id: script.tweet_image
@@ -1,18 +1,16 @@
homeassistant:
name: i3Detroit
#location info
latitude: 42.453828
longitude: -83.113769
elevation: 197
# metric for Metric, imperial for Imperial
unit_system: metric
time_zone: America/Detroit
# Customization file
customize: !include customize.yaml
whitelist_external_dirs:
- /home/homeassistant/.homeassistant/tmp
# Show links to resources in log and frontend
# introduction:
@@ -113,6 +111,7 @@ binary_sensor: !include binary_sensors.yaml
switch: !include switches.yaml
shell_command: !include shell_commands.yaml
device_tracker: !include device_tracker.yaml
camera: !include camera.yaml
# Extra panel for configurator plugin
panel_iframe:
@@ -17,3 +17,10 @@
platform: slack
api_key: !secret slack_api_key
default_channel: '#shopping-list'
- name: camera_bot
platform: twitter
consumer_key: !secret twitter_consumer_key
consumer_secret: !secret twitter_consumer_secret
access_token: !secret twitter_access_token
access_token_secret: !secret twitter_access_token_secret
@@ -368,3 +368,13 @@ disco_stop:
- service: switch.turn_off
entity_id:
- switch.Disco_Ball
tweet_image:
alias: "Tweet photo"
sequence:
- service: shell_command.take_snapshot
- service: notify.camera_bot
data:
message: Test
data:
media: /home/homeassistant/.homeassistant/tmp/snapshot.jpg
@@ -1 +1,2 @@
refresh_mqtt: './home/homeassistant/.homeassistant/refresh_mqtt.sh'
take_snapshot: !secret camera_wget

0 comments on commit 5c47494

Please sign in to comment.