MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. DaVinki
    3. Topics
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    D
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 19
    • Groups 0

    Topics

    • D

      Send display status to MQTT

      Watching Ignoring Scheduled Pinned Locked Moved Troubleshooting
      1
      0 Votes
      1 Posts
      277 Views
      D
      Hi all, Not sure if this is the right category to post this, so forgive me if I’m wrong. Basically, what I am trying to do is create a Python script to regularly check the outcome of “vcgencmd display_power” and send this status via MQTT. This might allow me to sync the switch status on Home Assistent and Node Red. Using copy-paste, I have a start of a script, but it keeps giving error on the stdout variable. Could one of you please check? #!/bin/bash #!/usr/bin/env python3 import paho.mqtt.client as mqtt import subprocess # This is the Subscriber def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) client.subscribe("thuis/woonkamer/scherm") output = subprocess.check_output(['vcgencmd display_power'], stdout=subprocess.PIPE) if stdout() == 'display_power 0': client.publish(topic, msg) client = mqtt.Client() client.connect("192.168.2.150",1883,60) #client.on_connect = on_connect #client.on_message = on_message client.loop_forever()
    • D

      Another PIR sensor

      Watching Ignoring Scheduled Pinned Locked Moved Requests
      19
      0 Votes
      19 Posts
      3k Views
      D
      @wishmaster270 No, it didn’t look like you took it personal, I just didn’t want you to on forehand. I Have indeed a second browser open on my laptop. Never thought of that being the issue… :-D Let’s close that one, and fiddle around with the timers a bit. My laptop shut down during lunchtime, and then I indeed saw the second screen show up.
    • D

      config.js help

      Watching Ignoring Scheduled Pinned Locked Moved Solved Troubleshooting
      18
      0 Votes
      18 Posts
      5k Views
      D
      you forgot the comma after (position: “top_left”)
    • 1 / 1