Monitor Equipment Temps with the Dallas Temp Sensors, ESPHome, Home Assistant and Grafana

Sdílet
Vložit
  • čas přidán 30. 07. 2024
  • I use TWO Dallas (DS18B20) Temp sensors on ONE ESP8266 to monitor power supply and radio heat sink temperatures. I graph them in Home Assistant using Grafana and flash the 8266 using ESPHome.
    ESP8266: amzn.to/3w0V7eS
    Heat Shrink Tubing: amzn.to/3boMUYk
    Resistors: amzn.to/3pN9gev
    DS18B20 Temp Sensor: amzn.to/3CskKHD
    Note: As an Amazon Associate I earn from qualifying purchases. The price for the items above doesn't change for you, but does help support the channel indirectly.
    Links
    ESPHome Dallas Temp Sensor: esphome.io/components/sensor/...
    ESP8266 Reference: randomnerdtutorials.com/esp82...
    Join this channel to get access to perks:
    / @mostlychris
    Discord: / discord
    If you would like to support me:
    Buy me a beverage: ko-fi.com/mostlychris
    Become a patron: / mostlychris
    Products I reference in my videos (Contains affiliate links)
    www.mostlychris.com/my-smart-...
    www.xsplit.com?ref=chriswest&discount=mostlychri&pp=stripe_affiliate
    00:00 Intro
    00:30 Why?
    02:42 Solder all the things!
    13:38 Initial flashing of board
    15:27 Add Dallas sensor config
    20:22 Add integration in Home Assistant
    22:25 Add sensors to Grafana
    24:31 Wrap and final thoughts
    DISCLAIMER: Some of the links above take you to affiliate sites that may or may not pay a small commission to me. It doesn't increase the cost to you, but it does help support me in making these videos.
    Want to send me something? Send it here!
    Mostlychris
    24165 IH-10 West
    STE 217 #164
    San Antonio, TX 78257
  • Jak na to + styl

Komentáře • 116

  • @TerraMagnus
    @TerraMagnus Před 2 lety +7

    This is going to be one of my first electronics projects to help expand my Home Assistant footprint into my aquarium rack & indoor ponds. Thanks for a great tutorial!

    • @mostlychris
      @mostlychris  Před 2 lety

      You're welcome! Good luck on the project.

  • @MascotNR
    @MascotNR Před 2 lety +1

    Just had some sensors and resistors arrive this morning, seeing this gave me the confidence (as a new HA user) to try it out. Think this will be perfect for monitoring my fridge and freezer temperatures. Thanks so much.

    • @mostlychris
      @mostlychris  Před 2 lety

      Excellent. It's a lot of fun and useful for many things.

  • @PhG1961
    @PhG1961 Před 2 lety

    The DS18B20 has always been one of my favourites ! Great video !

    • @mostlychris
      @mostlychris  Před 2 lety

      Thanks! I'm really liking them and looking for additional applications.

  • @rccrashed
    @rccrashed Před 2 lety +2

    You are the best ever! Super clear directions are very easy to follow. They gave me the confidence to attempt this exact project to monitor a couple of freezers. Being new to the home assistant world your videos are fantastic. Some of your little thrown in hints put the rest of the big picture together for us beginners. I made some mistakes and easily backtracked to get it working. I had everything set up properly, but my router/switch wouldn't always allow it to work on its wifi . After several days of fighting with it, I moved my Home Assistant on the Raspberry PI to the network cable feeding my Google wifi and just like that everything now works flawlessly! Just sent you a couple of cups of coffee! Thanks Ed Mc

    • @mostlychris
      @mostlychris  Před 2 lety

      Thanks Ed!! I saw those coffees but haven't responded over there yet. I appreciate the kind words and am glad that you were able to use the video(s) to get things going. Your hint about the wifi might help others as well, so kudos for that.

  • @xtremeideaz
    @xtremeideaz Před 2 lety

    Thanks. Built this based on your recommendation on one of your live stream. working flawlessly inside my freezer

    • @mostlychris
      @mostlychris  Před 2 lety

      Great to hear!

    • @JohnVanderbeck
      @JohnVanderbeck Před 2 lety

      Silly question but are you putting the whole assembly (board and everything) in the freezer or just somehow feeding the temp sensor in? I would imagine the microcontroller can't handle the freezer temps.

  • @rccrashed
    @rccrashed Před 2 lety +2

    Chris you created a monster! I added another board with 3 temperature sensors on it. It works flawlessly, now I can see my Attic temp, Garage temp, and outside temps. I extended one of the sensor cables about 25 feet using thermostat wire and there is no real difference in temps when probes are right next to each other before I put them in place. Thanks again for doing these videos!

    • @mostlychris
      @mostlychris  Před 2 lety

      Sweeeet!! Good job. These are handy little boards and sensor. They are even waterproof.

  • @davebareham1075
    @davebareham1075 Před 2 lety

    Great video Chris - this is the first electronics project I have built in many years and in the process have remembered how much hot soldering irons and fingers don't get on :)
    Liked and subscribed!

    • @mostlychris
      @mostlychris  Před 2 lety +1

      Thanks! I do more on PC work than electronics work and doing projects like this remind me how fun they are... and how valuable a silicon pad is for protecting my tables/desks when I drop the soldering iron.

    • @davebareham1075
      @davebareham1075 Před 2 lety

      @@mostlychris I completely understand all of this :) it felt so good to actually build something "real" ...thank goodness for a decent pair of wires trippers!

  • @richardwild
    @richardwild Před 8 měsíci

    This was a great video. I now have three Dallas sensors on a NodeMCU board monitoring three freezers in my basement. These already "saved the day". One of our kids didn’t close the door fully on one of the freezers. I was alerted fast. I also put one in my garage to warn if the temperature gets too warm in the winter since my wife stores excess vegetables in there during the winter.
    Since my router is located where the temperature can’t be controlled, I placed the router inside an old Styrofoam cooler with a Dallas Sensor probe. If I get an alert the temperature is above a certain level I remove the lid. If it drops below a certain level I put the lid back on. The heat generated by the router itself keeps it above the min operating temperature with the lid on. Temperatures here can drop below 0 degrees Fahrenheit.

  • @gordon861
    @gordon861 Před rokem

    Thanks for this video finally got a pair of sensors working on an ESP32, just need to rig them to the fridge and freezer now without the door seals getting in the way.
    Took a lot of messing to get the timing interval sorted out but working now.

  • @rogeriocamargo1984
    @rogeriocamargo1984 Před 2 lety

    Thank you man! Cool! I was looking exactly it because I did with one analogic NTC sensor and I needed of two sensors for measuring swimming pool and heat temperatures

  • @PersonXes
    @PersonXes Před 2 lety +2

    Good idea to make a video about this. I did the same thing 6 months ago to measure the temperature of my pond and the outdoor temperature. These Dallas sensors are waterproof so I could just put it in the pond without problem. They work over very long distances. I have about 30 meters of Ethernet cable between my Dallas sensor and my Esp8266

    • @mostlychris
      @mostlychris  Před 2 lety +2

      Interesting use. I don't think I mentioned that these were waterproof. These are very versatile and can be used for a lot of things, not just what I showed in the video. So far they have been doing their thing, sending me 30 second temp updates.

  • @bgable7707
    @bgable7707 Před 2 lety +1

    Chris, good video. ah, ah, ah ... and I appreciate your demonstration showing how to get each of the dallas address' and adding them to the YAML file. More clear explanation on how they act as a bus device could help others understand this. It would be great to see more examples configuring HA through the YAML. I think there are plenty of soldering video's out there already.

    • @mostlychris
      @mostlychris  Před 2 lety +2

      Thanks for the video suggestions. Interesting as HA is working hard to make their stuff more "consumer friendly" by making things rely less on yaml and more on UI. I like that there is still the ability to customize using yaml and config files.

  • @Minglarr
    @Minglarr Před 2 lety

    So nicely detailed video. 👌 Really appreciate this video. 🙏 big thanks. Now it's time to order these Dallas sensors.

  • @j9999i
    @j9999i Před rokem +1

    Thank you, thank you, thank you!!! Really appreciate all your work... this is actually what I was looking for to monitor my hot water heater temp. One thing you might want to mention, if you are having problems connecting to your esp device to upload your code, check your cable. It may be a charging cable and not support transmitting data. Quick question if I may, how many temp probes can you connect to one data line? If you connect more that two, do you need to change the resistor? Thank you again for doing this!!

  • @BeardedTinker
    @BeardedTinker Před 2 lety

    Nice detailed video. Thanks for it!

  • @MattKlimmer
    @MattKlimmer Před rokem

    Perfect exactly what I was looking for

  • @brunokc100
    @brunokc100 Před 2 lety

    Thx for this brillant video.

  • @arnoldbencz6886
    @arnoldbencz6886 Před 2 lety

    Super video! 👍

  • @IpFix-
    @IpFix- Před 10 měsíci

    Good video :) Thanks

  • @antoniodecrisci2369
    @antoniodecrisci2369 Před 2 lety

    Awesome thanks!

  • @peteradshead2383
    @peteradshead2383 Před 2 lety

    I found they wasn't very stale so I used a filter and over sample it , before I could monitor the temperature reliably.

    • @mostlychris
      @mostlychris  Před 2 lety

      Oh yeah? I haven't had an issue so far. What problem did you see?

  • @MAMDAVEM
    @MAMDAVEM Před 2 lety

    Great Video Chris. Have you considered using the Shelly UNI, it can support 3xDS18B20 temperature sensors and costs about $15.

    • @mostlychris
      @mostlychris  Před 2 lety +1

      Thanks! I haven't looked at the Shelly UNI (yet). I'll put it on my list of things to dig into.

  • @MichaelStickley
    @MichaelStickley Před 2 lety +2

    Very useful video thank you! One thing you didn't mention (or maybe I missed or you've covered it elsewhere) is how you are powering the ESP8266 board? - via battery or mains adaptor? I've currently got a few of the dsb1820 sensors hardwired into a couple of pi's but am now looking to run a home assistant server and extend the number of temp sensors etc into places where mains power is not feasible and I don't want to run long cables...

    • @mostlychris
      @mostlychris  Před 2 lety +3

      I am powering these off USB 5v adapters plugged into mains. I was just thinking about how to power them with battery and how long they would last. That might be the subject of another video.

  • @macthaidhg
    @macthaidhg Před 2 lety

    Thanks Chris! It has inspired me to start my first ESPHome project. Thinking of trying it on an ESP32 as I'd like to make use of bluetooth for some Xiaomi BLE sensors.... will config be more or less the same?

    • @mostlychris
      @mostlychris  Před 2 lety +1

      It'll be close. Just make sure you use the correct pins. There might be some changes to the resistors as well.

  • @huntervargo4237
    @huntervargo4237 Před rokem

    can you please explain to me how you can have data wires tied together and in the same data pin and get 2 different temps on the browser display? thanks great video

  • @ericjohnston3167
    @ericjohnston3167 Před rokem

    Chris, great video. What are you using the Truck BLE Transmitter in your esp home to do?

    • @mostlychris
      @mostlychris  Před rokem

      I was using it for vehicle presence detection. I've got a blue charm BLE transmitter in the truck and when it goes out of range, I get alerted.

  • @anthonysalisbury6945
    @anthonysalisbury6945 Před rokem

    Brilliant video this is going to be my first use of an esp board or anything like this, just a question how do you know that the temp sensors are compatible, what do you look for and you use D2 which is GIOP4......how do you determine which output pin you use? Thanks

    • @mostlychris
      @mostlychris  Před rokem

      It's in the documentation that I used. The ESPHome site is a good start.

  • @patrickwilliamson5737
    @patrickwilliamson5737 Před 2 lety

    Chris, thanks for the great videos! I'm new to home assistant and liked this video about adding the Dallas Temp Sensors to my HA setup. I've followed your setup instructions, but when I go to configure the new device in HA, I'm prompted with the message: "Please enter the encryption key you set in your configuration...". I don't recall any encryption configuration during the setup. I've even uninstalled and re-installed ESPHome and re-ran the installation process but the same "Encryption key" prompt is displayed every time. Can you tell me how to get passed this message? Thanks for another awesome video tutorial! Keep up the great work.

    • @mostlychris
      @mostlychris  Před 2 lety

      Thanks for watching. I've never seen this. If you haven't already, can you post a screenshot in my Discord server so I can see what you are talking about.

  • @stephengansky2694
    @stephengansky2694 Před rokem

    Never realized you were a ham. Looks like an Allstar Node.

    • @mostlychris
      @mostlychris  Před rokem

      Yup. I've got one simplex node at home and one mobile.

  • @easthulk99
    @easthulk99 Před 2 lety

    Nice..

  • @ranord50
    @ranord50 Před rokem +1

    I find this really intriguing and looks like something I'd like to get into. But I have a really basic question. How do you power all of these little devices scattered all around your house and yard. It would make sense if they were battery powered. Do these all plug into your homes electrical system?

    • @mostlychris
      @mostlychris  Před rokem +1

      The ESP devices are usually powered via a USB power supply or equivalent.

  • @DonParlor
    @DonParlor Před rokem +1

    Hello Chris! If I will use multiple Dallas Temp Sensor with different cable length, should I use different IO pins and different resistor values? I will have cables ranging from 1 meter to 5 meters...

    • @mostlychris
      @mostlychris  Před rokem +2

      I don't think that is necessary. If you are talking miles of cable, maybe, but otherwise I don't think so.

  • @bryanst.martin7134
    @bryanst.martin7134 Před 2 lety

    I build "Toys" for grown ups (sort of ;-) ), what would you recommend as an OS to monitor numerous sensors yet not require the web, since they will be "roughing it", off grid and offline for a week or so? I like the ESP devices, and STMicro's products too. Being able to mesh with their phones, tablets, etc. is the goal. 3 different power systems and battery banks come together to mesh into 1200 amp hrs of 12.8 volts of LiFePo4 power with a 270 amp aux. alternator that has LiFePo4 capable regulator and temp sensor on the alternator. While complicated is my middle name, most people are Mickey D's rated and a simple menu driven HMI makes them happy. So there are 5 Dallas sensors, two with the water tanks and the other 3 monitoring the batteries to protect from low temp charging. 5 current sensors, 3 200 amp, and 2 500 amp shunts. One 500 amp shunt monitors the charge current and the other the Inverter drain current. There are 5 heating pads to help, but managing power in tough weather takes a watchful eye.
    A new subscriber, maybe I will find my answer scouring your home page. Thanks for the post.

    • @mostlychris
      @mostlychris  Před 2 lety

      Thanks for the sub! All of what you are talking about can be done with a Raspberry Pi and Home Assistant. It doesn't require an internet connection. It does require some sort of a wifi network though. I assume when you say "off grid" there is still power and a local wifi network. Without the wifi network, you'll be hard pressed to bring all the sensors together in a single pane of glass.

  • @user-wx5ke6vo7g
    @user-wx5ke6vo7g Před měsícem

    Chris. I saw you use Grafana for graphing data and it looked like is was installed in home assistant. Can you recommend a good video that will teach me how to install it in my home assistant. Thank you for all your work and help. Ray Knapp

    • @user-wx5ke6vo7g
      @user-wx5ke6vo7g Před měsícem

      I am slowly getting ready to install the database software and Grafana on my system. I wanting to make sure that I am correct on an assumption. I have a home assistant yellow, and it is running with an SSD drive in it. I am assuming that that should have enough power to do all of the processing I need. I am looking forward to getting the data base installed and then the Grafana. I did figure out that since your videos are so old that the way to get to the store is different now, but I have that out now. When I have some free time, I will start the process. I am looking forward to pulling sensors together over time to monitor things. Ray

  • @nebulousJames12345
    @nebulousJames12345 Před 2 lety +1

    Hey. Do you have any more detail on that "drop resister"? Do we need that for other sensors like DHT 22 that only have 1 data wire? What exactly is it for? Thanks

    • @mostlychris
      @mostlychris  Před 2 lety +1

      The resistor is necessary to prevent erroneous readings of the sensor. Without it, youj might get some weird values. According to what I've read, the DHT22 also needs a "pull up" resistor to prevent these type of incorrect readings.

  • @davebareham1075
    @davebareham1075 Před 2 lety +1

    Out of idle curiosity (I really should be working) what is the maximum number of dallas sensors you can wire like this? Is it two? If not what dictates the limit?

    • @mostlychris
      @mostlychris  Před 2 lety +2

      I have seen people run 8 or 9 of these sensors. I suppose there will be a voltage limit more than anything else. Once you hit that, things might start to get wonky.

  • @sampetrosyan5334
    @sampetrosyan5334 Před rokem

    thanks for the tutorial. what software you are using? windows ubuntu debian - is it matter if i use windows 10?

    • @mostlychris
      @mostlychris  Před rokem +1

      Software for what? If you mean programming, it is browser based now. Your USB port needs to be available to the browser as a virtual com port.

    • @sampetrosyan5334
      @sampetrosyan5334 Před rokem +1

      @@mostlychris A friend of mine is helping me with a home assistant as I'm new to this, he asked me to use the debian11 software which was my question, not windows10. it's related to (beca thermostat-wifi device) now we are midway working on (wemos) and it's for a school where I work for, thanks for the reply.

  • @jifchosehismother
    @jifchosehismother Před rokem

    what distance will the esp8266 drive to the dallas sensor using 16AWG? 20AWG? 24AWG? 10 ft? 100 ft? 1000 ft?

    • @mostlychris
      @mostlychris  Před rokem

      The longer the cable, the more loss but I have not experimented to see. Resistor values might need to change if you use a super long cable.

  • @richardwild
    @richardwild Před 2 lety

    Does anyone know how many of these sensors the 8266 can handle? I have three freezers in one location I'd like to monitor.

    • @mostlychris
      @mostlychris  Před 2 lety

      I think it maxes at 3. The docs mention that iirc. Might even do more.

  • @karimmena4418
    @karimmena4418 Před rokem +1

    Is it bad if I don’t use the resistor? What could happen?

    • @mostlychris
      @mostlychris  Před rokem

      Improper readings most likely. Worst case, burn up the ESP.

  • @scotthill071098
    @scotthill071098 Před 2 lety

    i keep erroring out before it finishes installing any thoughts, i can show the error message

    • @mostlychris
      @mostlychris  Před 2 lety

      Error message would be helpful. Might also be helpful to have that conversation in Discord so the message can be formatted for easy reading.

  • @ragdepc
    @ragdepc Před 2 lety

    I tough you will include in the video after install them in the attic what are the readings, but now I remember is not hot enough for test it, could you make another video afterwards?? Thanks

    • @mostlychris
      @mostlychris  Před 2 lety +1

      I have historic data that I graph in Grafana based on the values. What were you looking for?

    • @ragdepc
      @ragdepc Před 2 lety

      @@mostlychris I am looking for how hot the attic can be, because a year ago I had in line fuse for my ws2812b 5v holidays lights and during the summer the plastic melted and connectors separated from the fuse. So I’m wondering if goes higher than the 150C the sensor can read!! Thanks

    • @mostlychris
      @mostlychris  Před 2 lety +1

      150C is melty hot! That's 300+F. I doubt it gets that hot. The ESP might die before the sensor. I have computers, network switches, and a number of raspberry Pis running in my attic and have for a number of years. Frankly, I'm completely surprised they are still running. It gets about 120-140F (49C-60C) up there in the heart of summer.

    • @ragdepc
      @ragdepc Před 2 lety

      @@mostlychris Okidoki, thanks!! ☺️

  • @MattKlimmer
    @MattKlimmer Před rokem

    Do you have a 3d printable enclosure for the D1 board?

  • @Hasan...
    @Hasan... Před 2 lety +1

    How exact does the resistance 4.7k needs to be? I have a 5.1k ohms, would it affect the Temperature reading?
    Thanks for the video! I'm doing something similar myself so this was very insightful!

    • @jensschroder8214
      @jensschroder8214 Před 2 lety

      Something between 1k and 5.1k.
      The outputs are all open collector connected to GND in parallel and the resistance make logical 1.
      I like to use 3k3 for 3.3 volts, 4k7 for 5 volts.
      For long lines rather 1k.
      It is even possible if one sensor, the red line and black line together.
      Then the power supply is only through the data line and the resistor.
      Then you only need a two-pin cable. This is then parasite mode.
      At 5 meters I have no problems with it.
      The resistance of the line does not affect the measured value, but you must bring enough energy to the sensor so that it can measure and the result can be "morse code" to the receiver.
      The sensor has a built-in capacitor for power supply.

    • @mostlychris
      @mostlychris  Před 2 lety

      Thanks Jens for the detailed explanation!

  • @firepilot17
    @firepilot17 Před 2 lety

    Chris, do you know of a temperature sensor with home assistant integration that will measure the surface temperature of my wood stove? I was thinking of sitting it on the top of the stove. I want to be notified if it’s gets too hot. Thanks!

    • @mostlychris
      @mostlychris  Před 2 lety

      What's the max temp that stove gets to?

    • @firepilot17
      @firepilot17 Před 2 lety

      @@mostlychris I would like the temperature sensor to have a maximum operating temperature of 800 to 1000°F. Mostly the wood stove will be between 350 and 450.

    • @mostlychris
      @mostlychris  Před 2 lety

      That's a pretty high temp. Maybe something like this would work: esphome.io/components/sensor/max6675.html.

    • @firepilot17
      @firepilot17 Před 2 lety

      @@mostlychris So after buying an IR type temperature gun, and monitoring my wood stove temperatures, how about a temperature sensor that will go up to 600 degrees?

    • @mostlychris
      @mostlychris  Před 2 lety

      @@firepilot17 Going to be the same answer. You need something that will go higher than the Dallas sensors and that link above might be it.

  • @BrummBilt
    @BrummBilt Před 2 lety +1

    Do you only need the resistor if you have multiple data lines?

  • @TsiRoadkill
    @TsiRoadkill Před 5 měsíci

    Is there a limit on how many sensors you can have on one board? I need like 4 ideally.

    • @errcl65
      @errcl65 Před 5 měsíci

      No problem with 4. One wire can do a lot of devices.

  • @Michele-Sciortino
    @Michele-Sciortino Před 5 měsíci

    Since the address is unique, if a Dallas sensor fails, do I have to reconfigure everything?

    • @mostlychris
      @mostlychris  Před 5 měsíci

      Everything? No. Just specify the replacement sensor's address.

  • @danielmorales1639
    @danielmorales1639 Před 2 lety

    Why do I get this message?: Please enter the encryption key you set in your configuration for fridge-monitor..... I didn't do that!

    • @mostlychris
      @mostlychris  Před 2 lety

      I have no idea. Never encountered that. Is that coming from the ESP device?

  • @rcmc88
    @rcmc88 Před rokem

    FYI it is sold - er - ing NOT SODERING the L is not silent

    • @iainhay2823
      @iainhay2823 Před rokem

      It is in American, sounds very wrong but not for those guys.

  • @yongli33
    @yongli33 Před 7 měsíci

    73

  • @dogcatmause
    @dogcatmause Před rokem

    Actually it doesn't work like described here. Now it demands in settings encryption key. This is generally a major issue for me with HA. You have little or no experience and eventually find some tutorial about whatever you want to do. By my experience there is about 80% chance that those tutorials are wrong bcs HA has already something depreciated or added. Actually I have so far had NEVER found any HA tutorial that was 100% correct.

    • @mostlychris
      @mostlychris  Před rokem

      Encryption key? What for?

    • @dogcatmause
      @dogcatmause Před rokem

      @@mostlychris I think encryption key is set inside esphome so every time you add a new integration u have to enter that key

  • @RonnyRusten
    @RonnyRusten Před 2 lety

    Frozenest.... LOL...

    • @mostlychris
      @mostlychris  Před 2 lety

      I had to point that out with big words! Sometimes I leave the bloopers in the videos.

  • @mrkraymnd
    @mrkraymnd Před 2 lety +1

    Frozenist 🤣

    • @mostlychris
      @mostlychris  Před 2 lety +1

      Gotta leave the bloops. Self deprecating humor is the best.