Sensor Data on a website

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
rosi123
New user
Posts: 2
Joined: 17 Dec 2020, 18:13

Sensor Data on a website

#1 Post by rosi123 » 17 Dec 2020, 18:40

Hello,

first - sorry for my bad english.... but, I try to write correct ;)

I have a ESP8266 with ESPEasy and use a DS18B20 - all things are going fine... :)

What I habe to say - I am not a programmer and I have not so many knowedledges in program languagues... ;-)

Now, I want following...

1.
I would like to show the value of the temperatur on a website. It would be perfekt, if I also could show the history in a Diagramm, like temperature from Monday, thuesday,.... and so on....

2.
I would like to transfer these data per (S)FTP to my Website in the internet (perhaps over my raspberry, so the ESP8266 has no contact to the Internet) and show these data on my website over the internet.

Why would I do these things:

I have my little boat in a harbour over the week, and sometimes over month.
In the boat, I have some sensors like temperatur, humidity, etc.... on a ESP8266
And now, I would like to see these data's over my website.

In the boat, I have a little WLAN over a mobile UMTS-Router.

I hope, my english is not to bad and you have perhaps any Idea's to realise this...

Greetings from Germany,

Rosi123

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sensor Data on a website

#2 Post by TD-er » 17 Dec 2020, 20:32

Since you have a node to fetch the data from the ESP and sending it somewhere, you can also consider just fetching the value of a specific sensor in either JSON or CSV format and then forward it to wherever you want to send it.

See: https://espeasy.readthedocs.io/en/lates ... =json#json

We don't have a FTP controller, but we do have several HTTP controllers, so the ESP can also send an URL to a HTTP server to send the values in the GET URL.

Some form like this:
http://hostname/bla?value1=123

See also the documentation on the Wiki about this: https://www.letscontrolit.com/wiki/inde ... neric_HTTP

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: Sensor Data on a website

#3 Post by mrwee » 17 Dec 2020, 21:50

Hi,

You could consider Thingspeak. It's free for few sensors, and you do not have to expose anything to the internet. You just upload the data, and view it on their platform. You can even set alarms for missing data / thresholds.

rosi123
New user
Posts: 2
Joined: 17 Dec 2020, 18:13

Re: Sensor Data on a website

#4 Post by rosi123 » 18 Dec 2020, 17:52

Hello,

thank you for these quickly Informations. Verry verry nice.....

I will read these documents and try to realise this.
My Problem is, that I have first to learn the http protocoll, because the question for me is, how come the value from the thermometer/hygrometer to the Joomla Website at my webhoster (from my LAN over the Internet to my Webhoster).
Normally I have the transmission from files to the webserver over a ftp-User realised. This user has the only right to write in a spezial folder of my webspace.

And at least, I will try the Thingspeak website.

a lot of greetings,
Rosi

User avatar
iron
Normal user
Posts: 221
Joined: 24 Sep 2016, 08:37
Location: Greece
Contact:

Re: Sensor Data on a website

#5 Post by iron » 18 Dec 2020, 20:04

I use Thingspeak for free 4 years now with a DS18B20 to read the temp inside a florist refrigerating chamber

https://thingspeak.com/channels/177708

My remote server fetches the data from there. (No need to, just for the proof of concept)

I also get alarm notifications from the free thingspeak React Action APP when temp is out of range for any reason.

This is my very first project on an old R120 version. Nothing failed in the 4 years so no reason to "fix" anything to a newer version !!!
-D

muerd
New user
Posts: 2
Joined: 19 Dec 2020, 19:37

Re: Sensor Data on a website

#6 Post by muerd » 19 Dec 2020, 19:51

Hello, I just started a project for the first time and I have no knowledge
I am trying to configure Thingspeak but I always get this log:
81424267: WD: Uptime 1357 ConnectFailures 396 FreeMem 17880 WiFiStatus WL_CONNECTED ESP Easy internal wifi status: Conn. IP Init
81429053: MHZ19: PPM value: 728 Temp / S / U values: 24/0 / 33536.00
81429294: HTTP: C004 connection error (397/0)
81429535: HTTP: C004 connection error (398/0)
81429776: HTTP: C004 connection error (399/0)
81430017: HTTP: C004 connection error (400/0)
81430263: HTTP: C004 connection error (401/0)

My device is a CO2 MH-Z19
https://imgur.com/N16pwNT.png
I don't know if I have failed to configure something.
https://imgur.com/cfgMGEd.png
Thanks

User avatar
Ath
Normal user
Posts: 3494
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Sensor Data on a website

#7 Post by Ath » 19 Dec 2020, 20:59

Well, as the log says, your Controller 004 has connection issues, most likely your login credentials don't match, or your ThingSpeak server requires https, and that is not supported by ESPEasy.
/Ton (PayPal.me)

User avatar
iron
Normal user
Posts: 221
Joined: 24 Sep 2016, 08:37
Location: Greece
Contact:

Re: Sensor Data on a website

#8 Post by iron » 19 Dec 2020, 21:00

There is no need to setup a controller (any more)

Here is my take in the rules :

Code: Select all

On Thermometer#Temperature do
SendToHTTP,api.thingspeak.com,80,/update?api_key=your_API_KEY_here&field1=[Thermometer#Temperature]&field2=[Thermometer#Humidity]
endon
-D

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sensor Data on a website

#9 Post by TD-er » 19 Dec 2020, 21:23

Keep in mind Thingspeak only allows to send a message every N seconds for the free accounts.
N is quite large (900 sec?)
So maybe you're hitting this limit?

User avatar
iron
Normal user
Posts: 221
Joined: 24 Sep 2016, 08:37
Location: Greece
Contact:

Re: Sensor Data on a website

#10 Post by iron » 19 Dec 2020, 21:33

TD-er wrote: 19 Dec 2020, 21:23 Keep in mind Thingspeak only allows to send a message every N seconds for the free accounts.
N is quite large (900 sec?)
So maybe you're hitting this limit?
I do not think this is valid.

Look at my Temp graph :

https://thingspeak.com/channels/177708

Some are less than a minute... My rules post every time I have a new Temp value, not time based
-D

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sensor Data on a website

#11 Post by TD-er » 19 Dec 2020, 21:46

I checked and it isn't 15 minutes, but 15 seconds:
9. What are the benefits of purchasing one of the paid license over using a free license?
The paid license options offer the ability to send and process more data on ThingSpeak. The paid license options also offer the ability to have more channels on ThingSpeak, which allows you to connect more devices to ThingSpeak. They offer reduced message update interval limit of one second, allowing you to send data to ThingSpeak more frequently (the free option limit is 15 seconds). The academic and standard paid options also offer technical support, and a longer timeout for MATLAB calculations. In addition, the Standard license option offers the ability build commercial projects with ThingSpeak.
See: https://thingspeak.com/pages/license_faq

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: Sensor Data on a website

#12 Post by hereiam991 » 19 Dec 2020, 22:26

iron wrote: 19 Dec 2020, 21:00 There is no need to setup a controller (any more)

Here is my take in the rules :

Code: Select all

On Thermometer#Temperature do
SendToHTTP,api.thingspeak.com,80,/update?api_key=your_API_KEY_here&field1=[Thermometer#Temperature]&field2=[Thermometer#Humidity]
endon
nice hint!
maybe that info should be pinned somewhere.

muerd
New user
Posts: 2
Joined: 19 Dec 2020, 19:37

Re: Sensor Data on a website

#13 Post by muerd » 20 Dec 2020, 19:30

Ath wrote: 19 Dec 2020, 20:59 Well, as the log says, your Controller 004 has connection issues, most likely your login credentials don't match, or your ThingSpeak server requires https, and that is not supported by ESPEasy.
Thanks I dont know why C004 if I've steup controler 1, btw it's running with:
"On CO2#PPM do
SendToHTTP api.thingspeak.com,80,/update?api_key=your_api_key&field1=[CO2#PPM]
endon"

Thnks

Post Reply

Who is online

Users browsing this forum: No registered users and 58 guests