MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Thingspeak with MMM-REST

    Scheduled Pinned Locked Moved Solved Troubleshooting
    7 Posts 2 Posters 740 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      Roadrunner451
      last edited by sdetweil

      Hi there,

      I have some ESP8266 with DHT11 modules that send Temp/Humidity to Thingspeak.
      I found the MMM-REST module but there’s not too much information about it.
      My problem is that I can’t find a way to get the full data on my mirror, I mean I only get the first 2 digits like 20° instead of 20.5° (excuse my english)
      It’s someting about the format as I can get the full data through a browser.

       {
                          format: '%d<span class="wi wi-celsius"></span>',
                          url: 'https://api.thingspeak.com/channels/1895676/fields/1/last.txt?api_key=XXXXXXXX',
                      },
      

      So perhaps is there another way to get the same result with another module that would work with REST API ?

      Thanks for your attention :)

      S 1 Reply Last reply Reply Quote 1
      • S Offline
        sdetweil @Roadrunner451
        last edited by

        @Roadrunner451 said in Thingspeak with MMM-REST:

        > format: '%d<span class="wi wi-celsius"></span>',
        

        …

         format: '%1f<span class="wi wi-celsius"></span>',
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @Roadrunner451
          last edited by

          @Roadrunner451 i don’t know… but when u put your url in a browser what does it return?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          R 1 Reply Last reply Reply Quote 0
          • R Offline
            Roadrunner451 @sdetweil
            last edited by

            @sdetweil
            It returns exactly what I would like to see on my mirror, like 22.3 at this time.

            S 1 Reply Last reply Reply Quote 1
            • S Offline
              sdetweil @Roadrunner451
              last edited by

              @Roadrunner451 ah… format :"%d

              that means integer number, no decimal places,

              you want float

              %1f (1 decimal place)
              %2f (2 decimal places)

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              R 2 Replies Last reply Reply Quote 0
              • R Offline
                Roadrunner451 @sdetweil
                last edited by

                @sdetweil
                Ok that seems right but where am i supposed to put that ?
                My config looks like :

                format: '%d<span class="wi wi-celsius"></span>',
                
                S 1 Reply Last reply Reply Quote 0
                • R Offline
                  Roadrunner451 @sdetweil
                  last edited by

                  @sdetweil
                  oops sorry, didn’t read completely, great !!!

                  Thanks a lot !
                  Have a nice evening !

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @Roadrunner451
                    last edited by

                    @Roadrunner451 said in Thingspeak with MMM-REST:

                    > format: '%d<span class="wi wi-celsius"></span>',
                    

                    …

                     format: '%1f<span class="wi wi-celsius"></span>',
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    Enjoying MagicMirror? Please consider a donation!
                    MagicMirror created by Michael Teeuw.
                    Forum managed by Sam, technical setup by Karsten.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy