Tech Note 148 - ESP Smart Thermostat/Timer (ESP32 or ESP8266)

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024

Комментарии • 205

  • @bazathome2002
    @bazathome2002 2 года назад +2

    Just posting to say a big thanks - you saved me a LOT of work and have done a fantastic job. I've taken your project as starting point and added a remote temperature sensor plus some other bits and bobs to suit my needs.

  • @kickbaktube
    @kickbaktube 2 года назад

    I was about to embark on a project needing an on/off timer for a relay and here I find everything in a single video. Thank you so much Sir ;)

  • @Lovely-bx8se
    @Lovely-bx8se 10 месяцев назад

    Bonjour, Je viens de réaliser votre projet sur un esp32 et tous fonctionnement parfaitement bien. Merci beaucoup pour la qualité de la présentation.

  • @RTROME
    @RTROME 3 года назад +2

    Look forward to making this, ! Merry Christmas, wishing you well in the new Year !

  • @georgeboydratcliff1036
    @georgeboydratcliff1036 3 года назад +1

    Wow thanks David! What a great example of how to setup a web server with configurations, history, etc! Love it!

  • @Amit24981
    @Amit24981 3 года назад

    Your projects on ESP8266 are just amazing...thanks for sharing such wonderful knowledge..👍..Best wishes from India.

  • @santorcuato
    @santorcuato 3 года назад +1

    Merry Christmas Dave & all the nice people in this channel! (oh! Sorry: nice video as well ;-)

  • @tobo5757
    @tobo5757 3 года назад

    Thanks Dave ,merry Christmas and happy holidays to you all . Up to a new year. Be careful and hopefully continue your health.

    • @G6EJD
      @G6EJD  3 года назад

      Thank you and happy new year

  • @asiw
    @asiw 3 года назад +3

    Excellent Christmas present. Can't wait to try this out. I learn so much from looking at you code.
    Hope you have a good Christmas
    Best wishes
    Arthur

    • @G6EJD
      @G6EJD  3 года назад

      Thank you Arthur, you may find the asynchronous webserver features interesting, plus it’s fast and no need to keep polling to check for a connection request hence the name asynchronous.

    • @asiw
      @asiw 3 года назад

      @@G6EJD Thanks. I'd like to buy you a coffee. Do you have a mechanism for that?

    • @G6EJD
      @G6EJD  3 года назад

      Thank you Arthur via PayPal and here: g6ejd.dynu.com at the bottom of the page

  • @edwardhammock24
    @edwardhammock24 2 года назад

    A really good demonstration. I am looking to something similar for a garden watering system. Great. Thanks.

    • @G6EJD
      @G6EJD  2 года назад

      Ideal for that.

  • @s.husain6125
    @s.husain6125 3 года назад

    Great david sir....waiting for stm32 tutorials with deep sleep ...

  • @garrypkeogh
    @garrypkeogh 3 года назад

    An other great project, thanks again Dave. I hope you're in good shape these days. Seasons greetings and best wishes for he new year! Garry

    • @G6EJD
      @G6EJD  3 года назад +1

      Thank you Garry, yes I’m in good shape, increasingly doctors want to see me less and less, I’m down to 3-month appointments now, I was every 2-days, I still owe my life to the German donor and I got lucky with a 10/10 match, nowadays it’s the laboratory that saves life. Best wishes and have a happy and safe new year 2021

  • @JosefZvolanek
    @JosefZvolanek 3 года назад

    David, wonderful work! It must have put a lot of work and testing ...

    • @G6EJD
      @G6EJD  3 года назад +1

      Yes Josef, lots of testing especially the html

  • @renzocat66
    @renzocat66 10 месяцев назад

    A huge thanks from far far away .... Italy ! U R #1 David !

  • @ioancretu7816
    @ioancretu7816 Год назад +1

    Very good project i apreciate your work .
    Please let me know how i can send LED or RELAY status to another ESP like slave ?
    Thank you.

    • @G6EJD
      @G6EJD  Год назад

      I have produced some code to do what you want, see the video with UDP in the title.

  • @iot_enthusiast
    @iot_enthusiast 3 года назад

    Wonderfully done! Merry Christmas and Happy Holidays!

  • @istvanj.2538
    @istvanj.2538 3 года назад +2

    This project is so well done, clean and simplified code. Congrats man!
    Would it be possible to have two separate esp8266 controllers, one with only the temperature sensor and the other with the relay, so that the relay and the sensor can be installed apart in different rooms?

    • @G6EJD
      @G6EJD  3 года назад +1

      Yes that would work, next week I shall try to publish a 4-relay timer version no thermostat.

  • @douglarue8485
    @douglarue8485 Год назад

    Thanks again David, this is another great project! I forked it and have been working through getting it operating with my esp32 and sht21 sensor. Ended up merging bme280/sht21 sensor code since their are so similar. I've noticed a few NaN on the display so I started looking at the ReadSensor rates and noticed there is a timed call to ReadSensors() in loop() but also on the HomePage() method which was also getting refreshed at 5sec intervals. I've also added a Makefile to my fork since Arduino IDE v2 doesn't do SPIFFS building and uploading. Fun stuff and thanks again David.

    • @jonathonhaberkorn233
      @jonathonhaberkorn233 Год назад

      Are you having any trouble with the unit actually switching the state of the thermostat. i have everything up and running but the only way i can get the thermostat to switch is the manual overide. It doesnt matter what i set the tempature to, it does not switch.

    • @G6EJD
      @G6EJD  Год назад +1

      If you touch your sensor what happens and check the serial port monitor too.

    • @douglarue8485
      @douglarue8485 Год назад

      @@jonathonhaberkorn233 it was turning on/off on the bench this morning. I have it on the esp-wrover-kit board and the status LED output is set to pin 5 which is the LCD backlight enable so I saw the backlight going on/off matching what the web interface was showing.

    • @jonathonhaberkorn233
      @jonathonhaberkorn233 Год назад +1

      @@G6EJD the temperature fluctuates if I interact with it. I even put an ice pac on it and got it down to 11c and still nothing. I decided to “re- upload the code and now it seems to work as it should. I don’t know what I did, but I think I managed to get up and running. Thank you for sharing your knowledge as well as talking the time to respond to questions on a video 2 years old.

    • @douglarue8485
      @douglarue8485 Год назад

      @@jonathonhaberkorn233 can you test something? I just tried the Manual Over-ride and noticed if I turn it on, go to status page and see it on, then go back to setup I will see the Manual Override drop-down menu saying it is Off but it is still on. Do you see that too?

  • @Rekless70
    @Rekless70 Год назад

    This code is great. Hope your having a good day!

  • @markusliebold5132
    @markusliebold5132 10 месяцев назад

    Hallo, Klasse Projekt. Wie kann ich noch ein OLED einbinden, um die aktuelle und die Zieltemperatur an zu zeigen?

    • @G6EJD
      @G6EJD  10 месяцев назад

      Sie können einfach ein I2C-OLED verwenden und die Bibliothek hinzufügen, z. B. ssd1109 und drucken Sie es dann auf dem Display im Loop-Bereich aus. Es werden nur ein paar Codezeilen benötigt.

  • @elbwerk3095
    @elbwerk3095 8 месяцев назад

    Unfortunately I can't find all the parts. The sensors are not a problem. But what kind of relay is that?

    • @G6EJD
      @G6EJD  8 месяцев назад

      Amazon has loads of what they call Arduino Relay boards, you can get 1, 2 or 4 or 8 and more relays, none are more than a few £/$

  • @georgef7754
    @georgef7754 3 года назад

    Thank you for sharing. Merry Christmas 🎅

    • @G6EJD
      @G6EJD  3 года назад

      Merry Christmas

  • @MrBobWareham
    @MrBobWareham Год назад

    Hi David thank you for sharing your software it looks like a lot of hard work, but when I compile the sketch I get an error, This chip is ESP32 not ESP32-S3. Wrong --chip argument?
    I am using an ESP32 VEROOM32 so do I need to purchase another type, I see you are using Lolin D32, thanks for any help Bob IN THE UK.

    • @G6EJD
      @G6EJD  Год назад

      What is the error, make sure you select the Wemos D32 board type

    • @MrBobWareham
      @MrBobWareham Год назад

      Thank you for your prompt reply, I changed to the Wemos Lolin D32 and the sketch compiled Many thanks, Bob @@G6EJD

  • @ChrisS-oo6fl
    @ChrisS-oo6fl 3 года назад +1

    Great video. How easy could this be integrated into Home Assistant?

  • @andrzejdamianpierzasty8916
    @andrzejdamianpierzasty8916 11 месяцев назад

    Wspaniała prezentacja.

  • @barriethesen7930
    @barriethesen7930 3 года назад

    Excellent work!! Two additional features that I have been thinking about include being able to fall back to the existing system in case something goes wrong and being able to change the temperature controlled to say 2 or 3 different locations in my house. I'd be interested in your comments?

    • @G6EJD
      @G6EJD  3 года назад

      Best to wire it in parallel with the existing system and then switch off the existing system using that as a backup. You could use remote sensors to send over temperature readings of other zones and then expend the test for temperature to three values. The structure is such that should be easy, needs sone good logical names for values to help with the logic.

  • @LarryKapp1
    @LarryKapp1 3 года назад

    Very nice ! Thanks for sharing another great project .

  • @Siliverst
    @Siliverst 3 года назад

    Thank you so much! You saved me a lot of time, I just wanted to write something like that. I will fork it soon to add a simple NTC temperature sensor.

    • @G6EJD
      @G6EJD  3 года назад

      Good to hear, you don’t really need humidity I included because the sensor provided the reading. To remove the humidity graph you will need to carefully remove the google charts data.

  • @oumuamua6512
    @oumuamua6512 3 года назад

    Nice video!!! What is the difference between the two versions of the BME280 sensor (4 pins and 6 pins)? They both work in 3.3V?

    • @G6EJD
      @G6EJD  3 года назад +1

      The 4-pin boards are connected 3.3-5v on one pin, ground on another then I2C-SDA and SCL, others have separate pins for CS - Chip Select and SDO so they can use a 4-wire SPI bus (SDO, SDA, CS and SCL), some do have an on-regulator.

    • @oumuamua6512
      @oumuamua6512 3 года назад

      @@G6EJD Thank you

  • @2012SUSE
    @2012SUSE 3 года назад

    Great project David ! Many thanks from me !

  • @AndyShrimpton-GaaTech
    @AndyShrimpton-GaaTech 3 года назад

    Very cool and we'll explained as always. Could it be made to work on humidity and not temperature. As I would like to control a fan on humidity levels. Live the UI and history

    • @G6EJD
      @G6EJD  3 года назад

      Yes just replace the lines for temperature testing with humidity so everywhere that it tests for temperature just change those for humidity, if you have any problems let me know it should only be a few lines that need changing

  • @science4allworld587
    @science4allworld587 3 года назад

    I hope your health is going well. Great project as usual. I have tried almost all of your projects and this should be next one :).
    Thanks a lot.

  • @tinoadriaensen5265
    @tinoadriaensen5265 8 месяцев назад

    Hi David , first of all many thanks for the very nice code , great job.
    i have only one small issue for the moment , when i change the number of day events from 4 to 5 i have troubles with the timer screen (blanc).

    • @G6EJD
      @G6EJD  8 месяцев назад

      That's because the ESP will be out of memory, I have a comment in the code to that effect, 4 is as good as it gets.

    • @tinoadriaensen5265
      @tinoadriaensen5265 8 месяцев назад

      @@G6EJDthanks ! I'm now trying a esp32-wroom , first impressions ....much better then esp8266.....

  • @ithork
    @ithork Год назад

    Hi David, I'm looking for something like this but to control both my air conditioner and heater. It looks like this only works for a heater, is that correct?

    • @G6EJD
      @G6EJD  Год назад

      It’s a single channel system, but if you reverse the relay connections then it can control air conditioning.

    • @ithork
      @ithork Год назад

      @@G6EJD ok thanks much

  • @albertalbert4747
    @albertalbert4747 Год назад

    How to add libraries to the project? I am programming the module from the Esp8266AP examples. The module is being programmed. I open your .ino batch, I get an error with the Wifi.h library Could you share the firmware with the libraries?

    • @G6EJD
      @G6EJD  Год назад

      That’s because you have to include the ESP8266 variants, eg ESP8266WiFi.h

    • @G6EJD
      @G6EJD  Год назад

      Are you using the ESP8266 version on the GitHub?

    • @albertalbert4747
      @albertalbert4747 Год назад

      @@G6EJD I have uploaded esp8266 library. The problem is that when compiling, the arduino downloads from the Wifi library and folder, despite the fact that I have esp8266wifi installed. If I had a batch with libraries, I would upload it without a problem.

  • @myname4102
    @myname4102 10 месяцев назад

    Great project ! Any idea why schedule produces a blank screen once in a while? Sometimes refreshing the page will bring it up and although it happens a lot, I am unable to reporduce the issue with any consistency. I can get the schedule to come up after an update and restart and the schedule always comes up when simulating is ON. It seems like it happens more often when I add more items to the schedule, I also see it happening more often after a day or so running. Also, after entering 3 different events for every day of the week AND getting a blank schedule screen after saving and returning to the schedule - The schedule DOES work, just can't see it. I did add ElegantOTA to the script. Ideas ?

    • @G6EJD
      @G6EJD  10 месяцев назад

      Most likely your browser. Also check your memory usage as it’s taking a lot to create all the interfaces via html. Also try removing the OTA add-on and see if the problem persists.

    • @myname4102
      @myname4102 10 месяцев назад

      So I did remove ElegantOTA and the problem happens less often but still occurs. I also just entered One On/Off time and temp for each day instead of 3 and that makes it happen less often also. I have checked the memory available and memory used with no issue. Most likely your browser - Well it happens with any browser I use and Mobile or Desktop.

    • @G6EJD
      @G6EJD  10 месяцев назад

      @@myname4102 and an ESP32?

    • @myname4102
      @myname4102 10 месяцев назад

      Just on a ESP8266 and ESP01 - same results - Have not worked with the ESP32 yet

    • @G6EJD
      @G6EJD  10 месяцев назад

      Whilst the code will run on an ESP8266 there is insufficient memory to operate it, the clue is as soon as you add entries it starts to malfunction, you would find the dynamic use of RAM is much more then you might think it measure unless your measurements are done correctly, by contrast the ESP32 has more than sufficient memory.

  • @ludvikg
    @ludvikg 2 года назад

    hello i have a question, manual Override Temperatureis not superior to Scheldule? When setting manual heating,the thermostat switches off, if schedule is empty Manula working, thx

    • @G6EJD
      @G6EJD  2 года назад +1

      Hello, thank you spotting this problem, I have corrected all three versions to ensure the Manual mode is not overridden by the Schedule. Now when Manual is set ON, the schedule has no effect.

    • @ludvikg
      @ludvikg 2 года назад

      @@G6EJDthank you very much, it works 🙂 I would like to ask if it is possible to set the sending of data to the thingspeak, I can't do it, but I managed to translate the program into Czech

    • @G6EJD
      @G6EJD  2 года назад

      @@ludvikg yes there is a Thingspeak example in the IDE examples, there is a supporting library, it requires one line of code to send the variable to TS

    • @ludvikg
      @ludvikg 2 года назад

      @@G6EJD thanks for the reply, i tried it but i am making a mistake somewhere and i can't compile the project well...I will try it again :)

    • @G6EJD
      @G6EJD  2 года назад +1

      Install the Thingspeak library from sketch, library, manage, search for Thingspeak, then take a look at the Thingspeak examples from the examples menu, you may have to wrap your variable in a string() function to convert a numeric to string for the library eg String(variable)

  • @stp715a
    @stp715a 3 года назад

    Super! Thank you. Does the settings provide for Fahrenheit or does it require a code mod? If code mod appreciate any suggestions.

    • @G6EJD
      @G6EJD  3 года назад

      Change this line :
      Temperature = sensor.readTemperature(); // Read the current temperature
      if (Temperature >= 50 || Temperature < -30) Temperature = LastTemperature; // Check and correct any errorneous readings
      To Temperature = sensor.readTemperature*9/5.0+32;
      Then change 50 to °F and -30 to °F there are 4 other default temperatures in the early part of the code convert them to °F so 21° becomes 72° etc, that’s it.

  • @cam_DA_Hawkdriver
    @cam_DA_Hawkdriver 2 года назад

    Could you have the ESP32 set to run as the AP? I want to run a warming lamp at my boat and automatically turn on when temps get close to freezing.

    • @G6EJD
      @G6EJD  2 года назад +2

      Yes just change the WiFi mode to AP and if necessary set an ssid and password, then use say a phone to connect to it and provide status and control

    • @cam_DA_Hawkdriver
      @cam_DA_Hawkdriver 2 года назад

      @@G6EJD Thank you kindly sir!

  • @martyngriffin5943
    @martyngriffin5943 2 года назад

    Just getting started with this, and it looks promising. Have two questions.
    1) Going to attach this to the wall were old thermostat was after using 3d printer to build a case to hold it all, but how do i best power it withould running a lengthy usb cable across the wall. would it be possible to use a dc-dc converter attached to the furnace Common lead?
    2) Would it be possible to change the ide app to drive an attached touch screen (3.5" ili9488 spi) instead of using my phones web browser?
    OOPS: thought I read that commom had 24 v dc, but I find that it is AVCfrom 24 to 28 volts. between red and common, I have 27.8 V ac
    So for 1) would it be possible to feed a rectified ac-dc convertor from the thermostat C and R leads to provide 5V into the usb port?

    • @G6EJD
      @G6EJD  2 года назад

      I don’t know or recognise the term furnace: not in the uk anyway, but I think it may be a 12v source, if so, there are many dc-dc converters that would work, they’d need to supply at least 400mA, connected to usually the Vin pin and Gnd. Adding a touch screen would be relatively simple. It would be best to develop the touch elements first by defining screen position say in box areas, and proving the concept, then making sure it was a modular design in functions then using the touch example adding it to the main loop then linking the buttons to a function in the code. It could be a lot of work, but all the building blocks are available.

    • @martyngriffin5943
      @martyngriffin5943 2 года назад

      @@G6EJD Sorry for any confusion. For furnace we have a natural gas powered hot air house heater and is also connected to our air conditioner. As I mentioned, the leads are using 27V AC, with Red carrying power to drive any smart thermostat.

    • @G6EJD
      @G6EJD  2 года назад

      @@martyngriffin5943 ok, but converting (easily) 27AC to 5v DC is not easy unless there are ready made units around.

    • @martyngriffin5943
      @martyngriffin5943 2 года назад

      @@G6EJD I ordered a 12-28V ac to 12V dc unit from amazon. Then I just need to drop it to 5V. Working on that.

  • @albertalbert4747
    @albertalbert4747 Год назад

    How did you upload the firmware? The extension is on .ino but I have a problem with arduino. You don't have the firmware in .bin?

    • @G6EJD
      @G6EJD  Год назад +1

      You have to load the source code into the Arduino IDE, then choose the correct board, then compile the code, then upload to the board.

    • @albertalbert4747
      @albertalbert4747 Год назад

      @@G6EJD I have a problem with downloading the software. I uploaded the libraries and the error is still there.
      "Compilation error:ESPmDNS.h.No such file or directory."

    • @albertalbert4747
      @albertalbert4747 Год назад

      @@G6EJD I have arduino 2.0.3

    • @G6EJD
      @G6EJD  Год назад

      @@albertalbert4747 it’s the same process, load the source code, connect your board, select the usb port the board is using, then click on the compile and upload icon on the top left

    • @albertalbert4747
      @albertalbert4747 Год назад

      @@G6EJD And so I do after typing ssidi password at comilation stops me on ESPmDNS. Wrong tile? I'm uploading to ESP8266 Lolin. After setting the plate on Lolin wemos D1 mini clon I just started and cleaned the eprom. But I can't upload the software anymore, the lack of libraries pops up and there's no way around it.

  • @ivanivanov-ml8jn
    @ivanivanov-ml8jn 2 года назад

    Would you add a window to enter the SSID and Password on initial startup? Thanks.

    • @G6EJD
      @G6EJD  2 года назад

      You could do but the ESP saves the WiFi credentials in flash so never needs to be entered again or use the ESP WiFi manager (just one line of code and library inclusion) which will do it for you.

  • @science4allworld587
    @science4allworld587 3 года назад

    I am wondering if we can make it run without connecting to internet using local APN? I see google.charts are being used so seems difficult. But if we plot graphs using html or micropython?

    • @G6EJD
      @G6EJD  3 года назад

      I have tried using html5 and svg but found it too complex to draw even simple graphs. Java is possible but even that is complex to code, google charts are hard enough! I have been searching for a solution but can’t find one. Micro python would be quite slow too.

  • @christopherstaples4222
    @christopherstaples4222 3 года назад

    thanks this might help me get started, I am looking for something that can help control my aquaponic system 10x fish tanks containing 2x 60VDC 1kw heaters 10x grow beds containing 1x 240VAC 500w heater , needing to monitor outside temp / weather so heaters run a higher temp just incase of a long rainy week the temps do not drop too low while running of solar power without any sun around and have heaters off while prioritizing running air pumps

    • @G6EJD
      @G6EJD  3 года назад

      Well if you needed more relays you could fix the IP address, then add another setup and run two independent systems, extending the code for more than 4-relays would be a challenge and push the resource availability of the ESP32.

  • @bobbunni8722
    @bobbunni8722 2 года назад

    Is there a minimum runtime and minimum idle time for safety?

    • @G6EJD
      @G6EJD  2 года назад

      No, but you could add that, I provided the code as a foundation to build on.

  • @LastChanceNow
    @LastChanceNow 2 года назад

    Thank you very much for your work!
    Tech Note 080 - ESP32/ESP8266 Data Logging Webserver - works great
    Tech Note 148 - ESP Smart Thermostat/Timer (ESP32 or ESP8266) - does not connect to the web server with any esp 8266 core. ping is good
    how to switch to AP mode?

    • @G6EJD
      @G6EJD  2 года назад +1

      It’s a compiler issue, go back to an earlier version and it will work, maybe 10 or more versions.

    • @LastChanceNow
      @LastChanceNow 2 года назад

      @@G6EJD Yes, I will try, AP mode (without Internet) graphics and gauge are available?

  • @RTROME
    @RTROME 3 года назад

    Dave, I seem to just get "Error compiling for board" , no matter what board I select , with either ESP8266, Or ESP32 boards, I have all libraries Updated and Boards updated, running Arduino Ver 1.8.13.... I am sure I'm doing something wrong..... Let me know if you have an Idea... Cheers...

    • @G6EJD
      @G6EJD  3 года назад

      Hi Ross, Check out the readme, adding espasychwebserver outside of the manage sketch route does not add in the extra library required, let me know the error message you get.

    • @RTROME
      @RTROME 3 года назад

      Working Now Dave !, it was a simple matter, of reading the VERBOSE error Logs, and showed ESPAsyncWebServer.h, was calling ESPAsyncTCP.h, After checking I saw I did not have that Library, once downloaded and added, all compiled Fine...... Thanks again, now time to play with it !... Cheers

    • @G6EJD
      @G6EJD  3 года назад +1

      Good to hear, have fun.

  • @tzenkotzenkov1489
    @tzenkotzenkov1489 3 года назад +1

    @David - Thanks for all youre hard work! I have trouble runing this code on 8266 - Nodemcu. Have all the libs, no error, upoadet fine but webserver not working. Can't visit the page. Connecting fine to the WiFi, ping is fine, DHCP Server see it fine. On serial monitor and debug -code is showing fine up to wifi is connected but no log after that. Look like not running the code after that.
    Thanks in advance!
    p.s. Sorry for my bad English!

    • @G6EJD
      @G6EJD  3 года назад +2

      You need to downgrade the ESP8266 compiler to 2.7.4 (Tools, Board Manager, search for ESP8266 then choose 2.7.4) then all will work again, the 3 series compiler broke a lot of libraries.

    • @tzenkotzenkov1489
      @tzenkotzenkov1489 3 года назад +1

      @@G6EJD God bless you ! 7 days trying to fix it ! You are the MAN !

  • @AnibalMASSARIOL-il1rm
    @AnibalMASSARIOL-il1rm 3 года назад

    Really good project and comes with well done presentation. Thanks.
    Is available the Shield board for a ESP32 PCB here? can you share it ?
    Merry Christmas and Happy Holidays!

    • @G6EJD
      @G6EJD  3 года назад +1

      I will post the link to the carrier board on jlcpcb they would cost about $2 each plus delivery.

    • @G6EJD
      @G6EJD  3 года назад

      oshwlab.com/g6ejd/carrier-v2

    • @AnibalMASSARIOL-il1rm
      @AnibalMASSARIOL-il1rm 3 года назад

      Thanks to care about. Regards, Anibal

    • @G6EJD
      @G6EJD  3 года назад

      If you order with jlcpcb 5 will cost $2 plus postage

  • @filippogermi1618
    @filippogermi1618 3 года назад

    really interesting, well done, one question is it possible to realise similar project by esp8266-01? thes simplest model ?

    • @G6EJD
      @G6EJD  3 года назад

      Yes the code will run on an esp8266

    • @filippogermi1618
      @filippogermi1618 3 года назад

      @@G6EJD also if i have just a GPIO 0 and GPIO 2?

    • @G6EJD
      @G6EJD  3 года назад

      Well it’s a thermostat so generally you only need one GPIO pin to switch in/off a relay, so I’d say that’s more than adequate. You don’t have to use a bme280 you could use a simple one line thermometer like the dht12

    • @filippogermi1618
      @filippogermi1618 3 года назад

      @@G6EJD clear, what about BME280? they look like need I2C connection type, and having just GPIO 2 maybe is a trouble? or just use another temperature sensor

    • @filippogermi1618
      @filippogermi1618 3 года назад

      ooops you already answered to me apologies. thanks a lot and again compliments

  •  3 года назад

    Thank you for sharing.

  • @solomareds
    @solomareds 3 года назад

    Grazie, grazie, grazie!

    • @solomareds
      @solomareds 3 года назад

      I've seen you use the "unsigned long mills()" function to generate events. I'm afraid this function will return to zero after about 50 days. The variables you compare with are int. It's right? Thanks again.

    • @G6EJD
      @G6EJD  3 года назад +1

      Unsigned long is a 64-bit variable that enables a count of 584542046.090626 years! Before it overflows (2^64), this is a 32-bit cpu. There is also provision for LL when required.

  • @bonnome2
    @bonnome2 3 года назад

    I don't see it in the documentation, but is it opentherm compatible?

    • @G6EJD
      @G6EJD  3 года назад

      No, but adding that support would be really easy, it’s offered as a foundation for such add-on’s. Most boilers need an add-on to enable communications though.

  • @Dasol0246
    @Dasol0246 3 года назад

    Cool project, How do you power this and how long does it last

    • @G6EJD
      @G6EJD  3 года назад

      It’s usb powered, the esp32 and relays use too much power to provide a web server interface and to operate relays. The relays could be changed for zero power bi-stable or latching types and the esp32 set to sleep with frequent wake up events but I’d expect battery life to be limited. Most smart thermostats are powered with e.g. 5v the Evohome is an example of such, as is Nest.

    • @Dasol0246
      @Dasol0246 3 года назад

      @@G6EJD By the way you make the best/coolest projects. I’m noticing that it is hard to power the ESP32 full time with battery. Do yo know of a device where I could have a ESP32 normally powered by a 12v battery which is charged by solar and when battery hits low voltage protection it switches to a wall wort usb supply. I would like to build a weather station from a pi zero w have it powered via battery(solar) and when the battery reaches low voltage have a relay switch it to a wall wort Thanks

    • @G6EJD
      @G6EJD  3 года назад

      @@Dasol0246 Thank you. I don’t know of any devices that can meet your battery requirements, but the ESP32 could monitor the 12v battery and you could buy a solid state relay to switch on/off the wall wart again controlled by the ESP32. The lolin d32 has an on-board battery charger and you can buy a HAT for the dpi that provides battery power with a solar input provision. Adafruit sell some variants for the RPi and AliExpress sell them too.

  • @broccoliman2293
    @broccoliman2293 2 года назад

    could you please help me. i've got a bmp280 connected and all i get is nan. ive tried 0x76 and it doesnt work. either display nan or 0.0 celsius.

    • @G6EJD
      @G6EJD  2 года назад

      You probably have the incorrect pins for the I2C bus, what board type are you using?

    • @broccoliman2293
      @broccoliman2293 2 года назад

      @@G6EJD on the gitgub its the middle sensor in the picture

    • @broccoliman2293
      @broccoliman2293 2 года назад

      It's the Bosch BMP280

    • @G6EJD
      @G6EJD  2 года назад

      @@broccoliman2293 I meant the ESP board as there are quite a few variations on the pins used for SDA and SCL

    • @broccoliman2293
      @broccoliman2293 2 года назад

      @@G6EJD for some reason my comments keep disappearing but my board is the esp32-devkitc-v4

  • @dynamitron
    @dynamitron Год назад

    what is the final version on github ?

    • @G6EJD
      @G6EJD  Год назад

      They are all version-1 the only difference is the sensor type.

  • @fredrahmani6670
    @fredrahmani6670 3 года назад

    It is very useful and interesting project. it would be great to have the code for DHT22 sensor as well. Thank you

    • @G6EJD
      @G6EJD  3 года назад

      Indeed, but the DHT22 is highly inaccurate.

    • @fredrahmani6670
      @fredrahmani6670 3 года назад

      ​@@G6EJDStill it works for me! Thanks for your quick response.

  • @mladencukon9a3xz79
    @mladencukon9a3xz79 3 года назад

    Very nice.

  • @tundeadewuyi8103
    @tundeadewuyi8103 3 года назад

    Merry Christmas. I tried this with esp8266 and am geting this :Error compiling for board NodeMCU 1.0 (ESP-12E Module). am using arduino 1.8.13

    • @G6EJD
      @G6EJD  3 года назад

      Sorry you need to include the library espasynwrbserver sketch manage add enter espasync should find it

    • @tundeadewuyi8103
      @tundeadewuyi8103 3 года назад

      @@G6EJD thank for your quick response I do install the library from github except I installed the wrong one

    • @tundeadewuyi8103
      @tundeadewuyi8103 3 года назад

      ​@@G6EJD thanks for your quick response. I do install the library from GitHub, except the I installed was wrong.

    • @G6EJD
      @G6EJD  3 года назад

      Check the readme if still not working

  • @MPElectronique
    @MPElectronique 3 года назад

    Wow wow and wow!!!!

    • @G6EJD
      @G6EJD  3 года назад +1

      Thank you Marc

  • @riyagupta-ob3gh
    @riyagupta-ob3gh 11 месяцев назад

    Plz add RTC ..for working without wifi

    • @tinoadriaensen5265
      @tinoadriaensen5265 8 месяцев назад

      Hi Sir , you can add a wifi connect timeout in the code , then the thermostats keeps working when there is no wifi for a while.

  • @powil4ss
    @powil4ss 3 года назад

    round PCB corners!

    • @G6EJD
      @G6EJD  3 года назад

      For?

  • @VasilKurdov
    @VasilKurdov 2 года назад

    What is a great job! Really appretiate it!
    I am trying to make it work with DS18B20 in order to be able to use it for water heater control, however, it seems my level of knowlage is not high enough to succeed, it there anyone who can help?

    • @G6EJD
      @G6EJD  2 года назад

      Which country do you live in?

    • @G6EJD
      @G6EJD  2 года назад

      You need to study the example code for the DS18B20, then add the library inclusion in this code, remove the references to the SHT30 sensor, then add any needed for the DS18B20 and then modify the setup section to enable the DS18B20 like in the example then remove any references to the old sensor in the read sensor function in this code then add in the ds18b20 temperature read line from the example. You need to assign a 0 value to the variable of humidity then it will all work, let me know if you have problems.

    • @VasilKurdov
      @VasilKurdov 2 года назад

      ​ @G6EJD - David I am living in Bulgaria. That is exactly what I am trying to do. I have added needed libraries, changed the "ReadSensor" section and include everything in the code to make DS18B20 work. It is all working fine in the serial monitor, up untill I try to load the web page - then it crashes with folowing (shortened message):
      "User exception (panic/abort/assert)
      Panic core_esp8266_main.cpp:120 __yield
      >>>stack>>>

    • @G6EJD
      @G6EJD  2 года назад

      @@VasilKurdov ok, thanks. That’s strange to get a runtime error, it sounds like you may have an undefined variable, what does your sensor function look like and have you started the sensor in the setup section?

    • @VasilKurdov
      @VasilKurdov 2 года назад

      @@G6EJD Thanks for your help! Yes I have started the sensor, otherwise I wouldnfd be getting readings in the Serial monitor...
      This id the ReadSensor section:
      void ReadSensor() {
      if (simulating) {
      Temperature = 20.2 + random(-15, 15) / 10.0; // Generate a random temperature value between 18.7° and 21.7°
      Humidity = random(45, 55); // Generate a random humidity value between 45% and 55%
      }
      else
      {
      sensors.requestTemperatures();
      Temperature = sensors.getTempCByIndex(0); // Read the current temperature
      if (Temperature >= 95 || Temperature < -30) Temperature = LastTemperature; // Check and correct any errorneous readings
      LastTemperature = Temperature;
      Humidity = 0;
      Serial.println("Temperature = " + String(Temperature, 1) + ", Humidity = " + String(Humidity, 0));
      }
      }

  • @familiem.2102
    @familiem.2102 2 года назад

    I am trying to get your sketch working on a Nodemcu ESP8266. All compiling is ok but when i try te get at the IP with a Browser i get an ERR_CONNECTION_REFUSED

    • @G6EJD
      @G6EJD  2 года назад

      Make sure you have the correct IP address as reported on the serial port and ensure your browser is not refusing the connection because it’s not secure..

    • @familiem.2102
      @familiem.2102 2 года назад

      @@G6EJD Hey and thank you for your answer. Yes, the IP is correct and this IP is refusing connection. "*.*.*.102 refused to connect." Browser is OK,i often connect to unsecure websites :) Tried different ports also.

    • @G6EJD
      @G6EJD  2 года назад

      @@familiem.2102 are you using the logical address name set in the code eg localhostname.local/ or example 192.168.0.33/

    • @familiem.2102
      @familiem.2102 2 года назад

      @@G6EJD i tried both at different ports (192.168.*.102 and thermostat.local)

    • @G6EJD
      @G6EJD  2 года назад

      If you can access the windows command prompt try ping 192.168.0.102 to see if it responds

  • @werkstattthomsen-detlefs994
    @werkstattthomsen-detlefs994 2 года назад

    Hello there.
    Could someone tell me what to change for using a BME680 ? Trying for 3 hours now, sensor is working with the test sketch but not with the Thermostat Sketch. I am using this : ae01.alicdn.com/kf/H29aa50470a044f2995630b4ea82b474eK/BME680-Umwelt-Sensor-VOC-Temperatur-Feuchtigkeit-Luftdruck-Modul.jpg_Q90.jpg_.webp

    • @G6EJD
      @G6EJD  2 года назад

      You only need to change the device driver to bme680 then copying in the device definition remove the 280 variant then that’s it. It should be very simple.