Author Topic: temp sensors display to webpage  (Read 6754 times)

temp sensors display to webpage
on: July 03, 2022, 13:51:30 PM
I want to be able to monitor freezer temperatures at work and check them remotely

there's a million options when I google it... but no real plug n play options....

I'm working crazy hours and haven't done any programing etc. in donkeys years, I'll be going through idiots guides etc. to set stuff up

I've got a server running already for cctv and gps tracking, so can run something on there

would rather avoid the cloud and subscription services etc.

anyone have any ideas?


I honestly thought I'd be able to buy a bunch of POE temp sensors download a bit of software and but up and running straight away :-o


my little brother does PLC stuff.... had him price up a basic PLC system to do it.... £1400 :-o
Last Edit: July 03, 2022, 14:09:11 PM by knighty #187;

    • Tekforums.net - It's new and improved!
  • Offline Clock'd 0Ne

  • Clockedtastic
  • Posts: 10,937
  • Administrator
  • Hero Member
Re: temp sensors display to webpage
Reply #1 on: July 04, 2022, 09:18:03 AM
I would imagine the simplest setup for this would be something like a Raspberry Pi or Arduino with some thermometers working off the headers. A quick Google turned up this guide:

https://medium.com/initial-state/how-to-build-a-raspberry-pi-temperature-monitor-8c2f70acaea9

Which is using something called Initial State (though its not free) as the web dashboard where the data is streamed to, but it wouldn't be too difficult to modify this to work with something home baked that runs off your own server. Might be a good starting point!
Last Edit: July 04, 2022, 09:21:02 AM by Clock'd 0Ne #187;

Re: temp sensors display to webpage
Reply #2 on: July 05, 2022, 12:10:51 PM
I've ordered an Arduino and a bunch of temp sensors, saw another guide I'll try to follow

I think half the problem is there's loads of different guides all doing it different ways

I'll report back when it all arrives :-o

  • Offline neXus

  • Posts: 8,746
  • Hero Member
Re: temp sensors display to webpage
Reply #3 on: July 06, 2022, 02:19:46 AM
You do not really need to do all the work and have arduino.
If there are any wifi assisted devices using a number of the specs you just need to have https://www.home-assistant.io/ Home assistant setup on a machine, docker, VM etc. Runs in a lot of environments.
You have your devices, detected and then they will most likely do stuff and have options out the box and feed into a heap of extensions/plugins available etc for that.
If you need to do more home assistant has full API so you can feed it to a web page.
BUT home assistant interface is web based and you can set it to access your home assistant across the internet so it can be very likely on the dashboard you setup etc you wont need to do anything more. You can do sending emails or text messages etc all through it if needed, send to devices so google can announce something is overheating and so on.

Re: temp sensors display to webpage
Reply #4 on: July 11, 2022, 01:08:04 AM
I'm following this guide
https://randomnerdtutorials.com/esp8266-ds18b20-temperature-sensor-web-server-with-arduino-ide/

had it working with 1 temp sensor + code

had it working with 2 temp sensor + code

trying for the web page and I'm getting this error...

Code: [Select]
Arduino: 1.8.19 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

sketch_jul11a:15:12: fatal error: C:\Users\USER\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/sdk/include/ESPAsyncWebServer.h>: Invalid argument

Multiple libraries were found for "ESPAsyncTCP.h"

   15 |   #include <ESPAsyncWebServer.h>S

 Used: C:\Program Files (x86)\Arduino\libraries\ESPAsyncTCP

      |            ^~~~~~~~~~~~~~~~~~~~~~

 Not used: C:\Users\USER\Documents\Arduino\libraries\ESPAsyncTCP-master

compilation terminated.

exit status 1

C:\Users\USER\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/sdk/include/ESPAsyncWebServer.h>: Invalid argument



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


any ideas anyone?

google isn't helping me, adding removing libraries isn't helping me, fresh download isn't helping me

I'm stuck

it's 1am and I've been at work since 8am, guess it might be more clear in the morning, I'm going home
Last Edit: August 05, 2022, 23:54:21 PM by knighty #187;

    • Tekforums.net - It's new and improved!
  • Offline Clock'd 0Ne

  • Clockedtastic
  • Posts: 10,937
  • Administrator
  • Hero Member
Re: temp sensors display to webpage
Reply #5 on: July 11, 2022, 06:56:26 AM
https://forum.arduino.cc/t/error-with-esp8266-libray/578978

Looks like you might not need to install that library separately?  :dunno:

This guy has your error and fixed it installing some missing dependencies:
https://github.com/Aircoookie/WLED/issues/584
Last Edit: July 11, 2022, 06:58:18 AM by Clock'd 0Ne #187;

  • Offline neXus

  • Posts: 8,746
  • Hero Member
Re: temp sensors display to webpage
Reply #6 on: July 11, 2022, 07:12:39 AM
Not across their coding setup but when you get those sorts of library issues/errors it means multiple versions of the same library being called.


If there is a build/library/package manager just go in and remove the ESPAsyncTCP-master one.
Often if you switch your build or branch for a package etc the old legacy is there so if you run a code Build it runs both. There would be a clean/clear function to clear out?
That or just go to that folder and delete the master one or other depending on which one your actually including in your project.

Re: temp sensors display to webpage
Reply #7 on: July 11, 2022, 08:41:33 AM
Not across their coding setup but when you get those sorts of library issues/errors it means multiple versions of the same library being called.


If there is a build/library/package manager just go in and remove the ESPAsyncTCP-master one.
Often if you switch your build or branch for a package etc the old legacy is there so if you run a code Build it runs both. There would be a clean/clear function to clear out?
That or just go to that folder and delete the master one or other depending on which one your actually including in your project.

Looks like it's the other one causing the issue, so just copy this folder out of this location (in case you need to put it back): C:\Program Files (x86)\Arduino\libraries\ESPAsyncTCP

Re: temp sensors display to webpage
Reply #8 on: July 11, 2022, 14:18:55 PM
ok... now I get....

Code: [Select]
Arduino: 1.8.19 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"





















sketch_jul11a:15:12: fatal error: C:\Users\USER\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/sdk/include/ESPAsyncWebServer.h>: Invalid argument

   15 |   #include <ESPAsyncWebServer.h>S

      |            ^~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

C:\Users\USER\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/sdk/include/ESPAsyncWebServer.h>: Invalid argument



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

  • Offline neXus

  • Posts: 8,746
  • Hero Member
Re: temp sensors display to webpage
Reply #9 on: July 12, 2022, 08:03:28 AM
That means the library the code needs is not there so it does not understand what that does.
So Either...
You removed the wrong one
Part of your code is using one and another part is using the other and there are conflicts.


Re: temp sensors display to webpage
Reply #10 on: July 12, 2022, 23:17:21 PM
That means the library the code needs is not there so it does not understand what that does.
So Either...
You removed the wrong one
Part of your code is using one and another part is using the other and there are conflicts.

I put them all back as per he guides, uninstalled Arduino ide deleted the folder and reinstalled it too


I'm lost... I thought it would practically be plug in and play

I'll try on another computer incase somehting weird is going on

Re: temp sensors display to webpage
Reply #11 on: July 13, 2022, 08:21:20 AM
Which board are you using, you said you ordered an arduino but the guide is for an ESP?

I assume you’re using a Node MCU if you can tell me which one and pastebin your code I’ll have a go this evening and if I can get it working I’ll send you the ide

Re: temp sensors display to webpage
Reply #12 on: July 13, 2022, 23:52:16 PM
thanks!

this board

https://www.amazon.co.uk/gp/product/B074Q2WM1Y/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1

and I'm copying/pasting the code from here

https://randomnerdtutorials.com/esp8266-ds18b20-temperature-sensor-web-server-with-arduino-ide/?unapproved=768152&moderation-hash=f34f44158302a7ead027b912f984c53a#comment-768152


had it working find outputting temp readings via serial, can;t get it to compile other stuff

made all sorts of arduino led cubes etc. with my nephew when he was little... programing was no problem... feel like I'm banghing my head on a wall now

Re: temp sensors display to webpage
Reply #13 on: July 14, 2022, 09:28:32 AM
You have two issues:

The code you copied is wrong, this line shouldn't have an S on the end:
 #include <ESPAsyncWebServer.h>S

In your logs it was showing the location with -master on the end you should have removed this from the folder title.

If you still can't get it to work let me know :)


Re: temp sensors display to webpage
Reply #14 on: July 14, 2022, 22:59:59 PM
ok... code compiles now but I've done something wrong somewhere

there' no serial output, and it's not connecting to wifi (not getting any ip address anyway)

ran the other temp sensor code that worked before (output temp to serial) and there's not output from it

uploaded the blink tutorial - onboard led blinks as it should

tried a different board (with no temp sensors attached) and it's the same

no idea what I've done wrong, still at work and still have more graft to do, I'll leave it till tomorrow now :-(

0 Members and 1 Guest are viewing this topic.