Read the statement by Michael Teeuw here.
Now I'm getting somewhere, HA turns screen on and off :-)
-
Ok, finally I found the right module. So the remote module in MagicMirror (MMM-Remote-Control), and then ‘rest_command:’ setup in HA.
That way the motionsensor can turn the screen on and off in the mirror. For now I’ve made it simple with just defining four commands, two for on / off and two for dim / undim. And then just use those services in HA automations.
Works perfectly.
Now I need to turn some modules on and off depending on the time of day.The HA commands:
rest_command: turn_off_mm_screen: url: http://IP:8080/api/monitor/off turn_on_mm_screen: url: http://IP:8080/api/monitor/on dim_mm_screen: url: http://IP:8080/api/brightness/75 undim_mm_screen: url: http://IP:8080/api/brightness/100One of the automations (at night)
- id: '1557033756115' alias: Turn on bathroom light at night trigger: - entity_id: binary_sensor.bathroom_movement from: 'off' platform: state to: 'on' condition: - after: '23:00' before: '7:59' condition: time - condition: state entity_id: light.spejl state: 'off' action: - data: brightness_pct: 10 entity_id: light.spejl service: light.turn_on - data: {} service: rest_command.turn_on_mm_screen - data: {} service: rest_command.undim_mm_screenNext step would be to modify rest_command so that I don’t have one for each action, but send a payload that is modified to the command that I want.
-
Very useful. Thx!
-
@fribse Nice job! I’m strictly using home assistant. Not tied to Magic Mirror at all. Home Assistant is a cool thing and I have it running my entire house :)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login