MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

MMM-Temperature


  • Module Developer

    Description:

    This is a simple module which uses external scripts as data source to display the temperature and humidity of different sensors.
    As i use an HTU21 sensor a script to read the values is included already.

    Download:

    MMM-Temperature


    Version 0.0.1

    The initial release provides the following features

    • read temperature of sensors by calling scripts with arguments
    • multiple sensors with different data scripts can be added
    • sensors can be displayed with or without name
    • an example script to read the data of an HTU21 sensor attached to the I2C bus of the raspberry is included and will be used as default data source
    • an example of how to connect an HTU21 sensor to an ESP32 micro controller with build-in wifi is included also

    Screenshots


  • Project Sponsor Module Developer

    @wishmaster270

    Nice! I don’t have/use sensors but cool just the same!


  • Project Sponsor

    Hello !

    Nice script but can you tell us what information you need to execute scripts ? Maybe I should open a troubleshooting thread but I tried with the examples with AdafruitDHT.py script and have this config :

    {
        module: 'MMM-Temperature',
        position: 'top_right',
        config: {
    sensors: [				
    name: "Test",
    script: "/home/pi/Adafruit_Python_DHT/examples/AdafruitDHT.py",
    args: "11 2"
    	] 
        }
    },
    

    And get an error (but if I use the script alone, i get the temperature and humidity)

    Thanks !


  • Module Developer

    @Hadr1en Hi, the module expects an json string as output of the script it executes. There is a section in the readme which shows an example:

    {
       "humidity": 32.61236572265625,
       "temperature_c": 25.50150878906249, //Temperature in °C
       "temperature_f": 77.9027158203125, //Temperature in °F
       "error": false
    }
    

    What kind of error do you get?


Log in to reply