Not sure if this is the right category. Please move if it belongs somewhere else.
I’ve been using Mycroft for over a year now. He’s still booting from microSD but I’m going to do a USB boot this weekend. That said, I’ve been integrating him more and more into my Home Assistant ecosystem. I figured I’d share some automations that utilize Mycroft. Of course, you can always just call scenes by saying turn on this or that, or call automations by saying activate this or that. Then, of course, you can just trigger individual devices and sensors by their own friendly name. These automations make Mycroft feel like he’s actually alive and part of the home. Some are little tongue in cheek, and more for my own personal pleasure. I’m going to post each one as a new comment to this original post. If you have any questions with the integration, feel free to ask. And have fun!
You don’t want to run your 3D printer filament dryer 24/7. This will turn it off after a certain amount of time and Mycroft will let you know it’s finished drying.
Regarding the front motion sensor, you don’t want to let it run out of batteries. This could work on any battery operated device, that issues a state of its own battery level.
alias: FrontMotionBattery
description: ''
trigger:
- type: battery_level
platform: device
device_id: b4c30260f0cea9f3bdfa1953276ba7f7
entity_id: sensor.frontmotion_battery
domain: sensor
below: 16
condition: []
action:
- service: notify.picroft
data:
message: Front Motion battery is getting low.
- service: notify.mobile_app_pixel6
data:
title: BATTERY ALERT!!
message: Time to change the battery in front motion sensor.
mode: single
For my own guilty pleasure, Mycroft gives me positive feedback when I remember to charge my phone…
alias: MycroftThanksYou
description: ''
trigger:
- platform: state
entity_id: sensor.pixel6_battery_state
to: charging
from: discharging
condition:
- condition: zone
entity_id: device_tracker.pixel6
zone: zone.home
action:
- service: notify.picroft
data:
message: You are so responsible, (yournamehere).
mode: single
And of course, you don’t want to leave your phone continually on the charger. My good buddy Mycroft is there to remind me that I can begin discharging the battery again.
alias: PhoneIsCharged
description: ''
trigger:
- type: battery_level
platform: device
device_id: 52ea4cf51e484a766db41226624686c6
entity_id: sensor.pixel6_battery_level
domain: sensor
above: 95
condition:
- condition: zone
entity_id: device_tracker.pixel6
zone: zone.home
- condition: state
entity_id: sensor.pixel6_battery_state
state: charging
- condition: device
type: is_off
device_id: 256b1be04f12d1acdbe125b15e938268
entity_id: switch.bedcharge_socket_1
domain: switch
action:
- service: notify.picroft
data:
message: (yournamehere), your phone is charged.
- delay:
hours: 0
minutes: 3
seconds: 0
milliseconds: 0
- condition: state
entity_id: sensor.pixel6_battery_state
state: charging
- service: notify.picroft
data:
message: Please remove your phone from the charger.
- delay:
hours: 0
minutes: 3
seconds: 0
milliseconds: 0
- condition: state
entity_id: sensor.pixel6_battery_state
state: charging
- service: notify.picroft
data:
message: Are you ignoring me? Your phone is fully charged.
mode: single
And after a hard day at work, at least someone is happy to see me. Usually my dog is, and I’m pretty sure my lovely lady is too… But just in case they’re both mad at me for some reason I can trust that Mycroft won’t be.
alias: WelcomeBackHome
description: ''
trigger:
- platform: event
event_data:
domain: scene
service: turn_on
service_data:
entity_id: scene.back_home
event_type: call_service
condition: []
action:
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: notify.picroft
data:
message: Welcome back. I hope you had a good day.
mode: single
Last, but not least. With work out of my thoughts, while at home, I’m reminded twice a week to charge my tool batteries. I hate being in a repair situation and something doesn’t work because I forgot to charge the dang battery! I’m sure there will be more automations along the way, but this is most of what I have so far.
alias: WorkTruckBatteries
description: ''
trigger:
- platform: time
at: input_datetime.worktruckbatteries
condition:
- condition: time
before: '00:00:00'
after: '17:00:00'
weekday:
- wed
- sun
action:
- service: notify.picroft
data:
message: 'You need to charge your work truck batteries '
- service: notify.mobile_app_pixel6
data:
title: BATTERY REMINDER
message: >-
You need to go back outside to your truck, gather all the batteries, and
charge them.
mode: single
That might be a question for the home assistant people. I’m not sure exactly how the skill integrates with mycroft. I didn’t make the skill but if the camera could somehow be released as an rtsp stream on your network then it could be dumped into home assistant.
Did you build your own Mycroft or are you using a Mark 2? I’m using the Picroft enclosure. I wonder if there’s something different with the Mark 2.
The setup is pretty simple. You just need to point the Mycroft host in your configuration.yaml and then also in the notify section for Mycroft to receive notifications. You also need to make sure and go to the home.mycroft.ai web page and plug in your home assistant url/ or IP. That’s where you customize all your skills.
Sorry if you already know and did this. Also make sure you’re not using some sort of DNS forwarding and forgot about it. I’m using a DuckDNS URL for home assistant and I also have my router resolving that internally on the home network. So nothing at home points to the static IP address of Home assistant but the actual domain name.