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

    Posts

    Recent Best Controversial
    • RE: Problem with MMM-ValuesByNotification and MMM-CommandToNotification

      @Jimmy1502
      You will need to comment the try, too. Additionally the indention of the code needs to be changed.
      The file will be look like this then:

      #!/bin/python3
      #Install Dependencies:
      #  pip3 install adafruit-circuitpython-dht
      #  sudo apt-get install libgpiod2
      import time
      import board
      import adafruit_dht
      import json
      import sys
      
      gpio_nr = 4
      if len(sys.argv) > 1:
          gpio_nr = int(sys.argv[1])
      
      
      # Initial the dht device, with data pin connected to:
      dhtDevice = adafruit_dht.DHT22(getattr(board, "D%d"%gpio_nr))
      
      result = {}
      result["temperature_c"] = dhtDevice.temperature
      result["humidity"] = dhtDevice.humidity
      result["temperature_f"] = (result["temperature_c"]*1.8) + 32
      result["error"] = False
      
      print(json.dumps(result))
      
      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: Problem with MMM-ValuesByNotification and MMM-CommandToNotification

      @Jimmy1502 As the reuseCount is set to 100 the wrong value need to be caused by the script sending them.
      It only sends 0.0 if a error occurs.

      You may remove the except block in the script and fire it very quickly on the shell to see what causes the error.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: Problem with MMM-ValuesByNotification and MMM-CommandToNotification

      @Jimmy1502 I think the problem with the temperature is caused by the json path. The script outputs temperature_c and temperature_f but the json path causes the module to search for temperature only.

      The problem with the humidity may be caused by the interval you query the sponsor values. 10 seconds is very short for the dht sensor. Maybe you can try a bigger interval.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: Problem with MMM-ValuesByNotification and MMM-CommandToNotification

      @Jimmy1502
      The script uses GPIO 4 in default but accepts any GPIO number as first argument.
      At least GPIO 25 has no double function on raspberries and should work.

      You can call the script directly in the shell and check the output for debug purposes.
      And make sure to check the comments in the first lines of the script if you need to. install any dependencies.

      Edit: Looks like you use GPIO 12 in your config which should work, too

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: Problem with MMM-ValuesByNotification and MMM-CommandToNotification

      @Jimmy1502 Hi and thanks to @sdetweil for trying to help.

      I will try to update the readme of the module in the next days.

      The timeout is set in milliseconds. Your config looks like it is set to 5ms. The script will not be able to respond in this time.
      Please increase it to a value much higher especially for the dht sensor. Let’s say something like 1000ms.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: Refresh Magic Mirror after custom css changes

      @Hanimani As sdetweil suggested you can access the page of MagicMirror in your browser to do development. The only problem with this approach is that there are multiple instances of the page. This can cause some modules to behave strange (like sending notifications twice, etc.).

      As an alternative you can enable VNC on the MagicMirror machine and connect to it remotely. You than can hit CTRL+R and access the Web development tools.

      posted in Custom CSS
      wishmaster270W
      wishmaster270
    • RE: MQTT payload

      @h_vestbo Hi, my MMM-ValuesByNotification module is able to select single values in Json structures by JsonPath so does my MMM-MQTTbridge module.
      You can receive the MQTT message with my MMM-MQTTbridge module, trigger a notification and display it with the MMM-ValuesByNotification module.

      posted in General Discussion
      wishmaster270W
      wishmaster270
    • RE: how alert trigger

      @fischi87 Sorry, do not know where I read iobroker but Home Assistant has a MQTT integration, too.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: how alert trigger

      @fischi87 Hi and sorry. I use node red instead of iobroker and do not have a glue of it.
      You will need a MQTT integration in iobroker, a MQTT broker and the MQTT module in the mirror.
      If the device changes state iobroker gets notice of it and sends a message to a MQTT topic.
      You can subscribe to this topic with the MQTT module in the mirror and initiate a notification with it.
      The alert module can display the message in the notification in the result.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: how alert trigger

      @fischi87 Hi, you could i.e. connect the mirror to iobroker with my MMM-MQTTbridge module and send a notification to the alert module depending of the state change.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 32
    • 33
    • 4 / 33