Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    AmbientWeather call to get swimming pool temp displayed on Mirror

    General Discussion
    2
    3
    33
    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.
    • J
      joshuaandrews last edited by

      I just built a mirror with a portrait 1920x1080 monitor and a Pi 3b. Fun toy, but I had some space left and my kids suggested showing the temperature of our pool.

      So I bought a “WS-50-F007PF” from ambientweather.com, which has a floating thermometer, paired with an indoor display that has WiFi and will update ambientweather.net with your systems info.

      (note that you can also set up a full weather station, I just want the pool temp)

      After getting the unit on the WiFi (it needs a uniquely named 2.4Ghz network - no 5Ghz “smart sharing”) I set up a login at ambientweather.net, added the device and poof, pool data online.

      Using my account at ambientweather.net I created a free API key and a app/developer key. Using postman I verified https://api.ambientweather.net/v1/devices?applicationKey=&apiKey= returned json including my pool temp.

      [
      {
      “macAddress”: “DE:AD:E3:12:34:56”,
      “lastData”: {
      “dateutc”: 1588720380000,
      “tempinf”: 74.5,
      “humidityin”: 46,
      “tempf”: 81.3,
      “baromabsin”: 29.97,
      “baromrelin”: 29.86,
      “battout”: 1,
      “feelsLikein”: 73.8,
      “dewPointin”: 52.3,
      “tz”: “America/New_York”,
      “date”: “2020-05-05T23:13:00.000Z”
      },
      “info”: {
      “name”: “Pool”
      }
      }
      ]

      where tempf is the field I need.

      I took a look at the available JSON modules and found the unsupported “MMM-json-feed”

      using a config of:

                  {
                          module: "MMM-json-feed",
                          position: "bottom_right",
                          config: {
                                  urls: [
                                          "https://api.ambientweather.net/v1/devices?applicationKey=<key>&apiKey=<key2>
                                  ],
                                  arrayName: "0",
                                  title: "Pool Temp",
                                  values: ["lastData.tempf"],
                                  replaceName: [["tempf",""]],
                          }
                  },
      

      It looks great and updates every 5 minutes.

      I also set
      wrapper.className = “bright large”;
      in MMM-json-feed.js to make the temp easy to read.

      just FYI for anyone searching ambientweather in the future.

      Mykle1 1 Reply Last reply Reply Quote 2
      • Mykle1
        Mykle1 Project Sponsor Module Developer @joshuaandrews last edited by

        @joshuaandrews

        Cool! 🙂

        1 Reply Last reply Reply Quote 0
        • J
          joshuaandrews last edited by

          I guess I should add an image. I have “MMM-json-feed”, “currentweather” and “weatherforecast” all “bottom_right” and they stack nicely.

          IMG_5875 (2).png

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy