Report temp to temperatur.nu
Moderators: grovkillen, Stuntteam, TD-er
Report temp to temperatur.nu
Hello
I have a working Wemos mini with ESP Easy Mega which works with a temperature but then I try to get my ESPeasy to report a temperature to temperature.nu but I do not know how to do it. Is there anyone here who can help me? I want to report to https://www.temperatur.nu/orter.html using a hach key.
Use a reporting url: http://www.temperatur.nu/rapportera.php ... 4e4&t=12.2. You get the hash code when you register your interest.
Regards Goktytan
I have a working Wemos mini with ESP Easy Mega which works with a temperature but then I try to get my ESPeasy to report a temperature to temperature.nu but I do not know how to do it. Is there anyone here who can help me? I want to report to https://www.temperatur.nu/orter.html using a hach key.
Use a reporting url: http://www.temperatur.nu/rapportera.php ... 4e4&t=12.2. You get the hash code when you register your interest.
Regards Goktytan
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
SendToHTTP,temperatur.nu,80,/rapportera.php?hash=123abc456&t=[temp2#out]
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
Use it within a rule. On temp2#out Do...
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
Ok so Easy I Will try tonight
Re: Report temp to temperatur.nu
Well that did not works. see my pictures.
- Attachments
-
- Skärmavbild 2019-02-01 kl. 15.54.24.png (46.97 KiB) Viewed 11452 times
-
- Skärmavbild 2019-02-01 kl. 15.53.35.png (121.48 KiB) Viewed 11452 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
You need to change the value and task names to comply with your naming convention. So based on your screenshot:
And your syntax is missing a &t for the temperature switchSendToHTTP,temperatur.nu,80,/rapportera.php?hash=123abc456&t=[temp2#Temperatur]
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
Sorry to say it won't work, do I miss something?
- Attachments
-
- Skärmavbild 2019-02-02 kl. 10.15.17.png (43.67 KiB) Viewed 11428 times
-
- Skärmavbild 2019-02-02 kl. 10.14.55.png (99.59 KiB) Viewed 11428 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
First, "1" as a task name is not recommended. Second, what does the log say? Will that URL work if you use it in you browser? (If you use it in the browser you need to change the temperature syntax to a real number.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
Ok change it to ute and the url works if i change adress to:
http://temperatur.nu/rapportera.php?hash=XXXXXXXXX&t=[0,5]
http://temperatur.nu/rapportera.php?hash=XXXXXXXXX&t=[0,5]
Code: Select all
6122717: WD : Uptime 102 ConnectFailures 0 FreeMem 15616
6123607: LoopStats: shortestLoop: 109 longestLoop: 2133048 avgLoopDuration: 130.69 loopCounterMax: 275229 loopCounterLast: 220883 countF
6123608: Scheduler stats: (called/tasks/max_length/idle%) 220883/2011/7/92.40
6136821: DS: SP: 8,0,4b,46,1f,ff,8,10,49,OK
6136829: DS : Temperature: 0.50 (28-f7-d9-34-5-0-0-37)
6136833: EVENT: ute#Temperatur=0.50
6136839: EVENT: ute#Temperatur=0.50 Processing time:6 milliSeconds
6152717: WD : Uptime 103 ConnectFailures 0 FreeMem 15616
6153607: LoopStats: shortestLoop: 109 longestLoop: 2133048 avgLoopDuration: 122.93 loopCounterMax: 275229 loopCounterLast: 234297 countF
6153608: Scheduler stats: (called/tasks/max_length/idle%) 234297/2132/7/92.00
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
So the comma is the issue here. You need to ask temperatur.nu if it's possible to allow dot instead. Or else we need to fix it some other way.
PS. The square brackets around the temperature shouldn't be there, it's only use within the rules to replace it with the numbers.
PS. The square brackets around the temperature shouldn't be there, it's only use within the rules to replace it with the numbers.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
Edit: no i was wrong it won't work.
FYI
It works now with following rule:
SendToHTTP,www.temperatur.nu/rapportera.php?hash=XXXXXXXXXXXXXX&t=[ute#Temp-I]
Tnx for all help @grovkillen
FYI
It works now with following rule:
SendToHTTP,www.temperatur.nu/rapportera.php?hash=XXXXXXXXXXXXXX&t=[ute#Temp-I]
Tnx for all help @grovkillen
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
Ah! Great! Thanks for the update.Goktytan wrote: ↑02 Feb 2019, 17:04 Edit: no i was wrong it won't work.
FYI
It works now with following rule:
SendToHTTP,www.temperatur.nu/rapportera.php?hash=XXXXXXXXXXXXXX&t=[ute#Temp-I]
Tnx for all help @grovkillen
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
I was probably a little too quick when I said it worked.
It doesn't work yet but it feels like I'm on my way. I use the following in Rules:
On System # Boot do // When the ESP boots, do
timerSet, 1,150 // Set Timer 1 for the next event in 150 seconds
endon
On Rules # Timer = 1 do // When Timer1 expires, do
SendToHTTP www.temperatur.nu/rapportera.php?hash=X ... XXXXXXX&t=[DS1#Temp]
timerSet, 1,150 sec
endon
Is there something I miss or do not see?
my log:
It doesn't work yet but it feels like I'm on my way. I use the following in Rules:
On System # Boot do // When the ESP boots, do
timerSet, 1,150 // Set Timer 1 for the next event in 150 seconds
endon
On Rules # Timer = 1 do // When Timer1 expires, do
SendToHTTP www.temperatur.nu/rapportera.php?hash=X ... XXXXXXX&t=[DS1#Temp]
timerSet, 1,150 sec
endon
Is there something I miss or do not see?
my log:
Code: Select all
295187: EVENT: Clock#Time=Mon,18:17
295202: EVENT: Clock#Time=Mon,18:17 Processing time:15 milliSeconds
300607: DS: SP: f8,ff,4b,46,1f,ff,8,10,68,OK
300615: DS : Temperature: -0.50 (28-f7-d9-34-5-0-0-37)
300618: EVENT: DS1#Temp=-0.50
300634: EVENT: DS1#Temp=-0.50 Processing time:15 milliSeconds
302742: WD : Uptime 5 ConnectFailures 0 FreeMem 16720
303187: EVENT: Rules#Timer=1
303204: ACT : SendToHTTP www.temperatur.nu/rapportera.php?hash=xxxxxxxxxxxxxxxxxx&t=-0.50
303213: Command: sendtohttp
303214: SendToHTTP www.temperatur.nu/rapportera.php?hash=xxxxxxxxxxxxxxxxxx&t=-0.50
303215: SendToHTTP: Host: www.temperatur.nu/rapportera.php?hash=xxxxxxxxxxxxxxxxxx&t=-0.50 port:
303219: ACT : timerSet,1,150 sec
303226: Command: timerset
303226: timerSet,1,150 sec
303231: EVENT: Rules#Timer=1 Processing time:43 milliSeconds
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
Is this your rule?
You must change to this
Code: Select all
On System # Boot do // When the ESP boots, do
timerSet, 1,150 // Set Timer 1 for the next event in 150 seconds
endon
On Rules # Timer = 1 do // When Timer1 expires, do
SendToHTTP www.temperatur.nu/rapportera.php?hash=X ... XXXXXXX&t=[DS1#Temp]
timerSet, 1,150 sec
endon
Code: Select all
On System#Boot do // When the ESP boots, do
timerSet,1,150 // Set Timer 1 for the next event in 150 seconds
endon
On Rules#Timer=1 do // When Timer1 expires, do
SendToHTTP,www.temperatur.nu/rapportera.php?hash=XXXXXX&t=[DS1#Temp]
timerSet,1,150
endon
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
Hmm, I have no spaces in my Rule but on the other hand no come characters after Sendtohttp so it must have been so when I paste into the forum.
Anyway, I run with your example and with the right "key" and it doesn't work anyway.
when I paste http://www.temperatur.nu/rapportera.php ... xxx&t=0.50 into the browser it seems to work. I think I need to contact admin at temperatur.nu and ask what might be wrong.
This is my log:
Anyway, I run with your example and with the right "key" and it doesn't work anyway.
when I paste http://www.temperatur.nu/rapportera.php ... xxx&t=0.50 into the browser it seems to work. I think I need to contact admin at temperatur.nu and ask what might be wrong.
This is my log:
Code: Select all
92741: WD : Uptime 2 ConnectFailures 0 FreeMem 16824
93630: LoopStats: shortestLoop: 108 longestLoop: 885489 avgLoopDuration: 126.58 loopCounterMax: 277777 loopCounterLast: 227181 countFi
93631: Scheduler stats: (called/tasks/max_length/idle%) 680014/6338/7/92.20
100186: EVENT: Clock#Time=Mon,20:54
100201: EVENT: Clock#Time=Mon,20:54 Processing time:14 milliSeconds
103186: EVENT: Rules#Timer=1
103207: ACT : SendToHTTP,www.temperatur.nu/rapportera.php?hash=582e26146e2e1d2c479d37d460a48bcb&t=0.50
103216: Command: sendtohttp
103216: SendToHTTP,www.temperatur.nu/rapportera.php?hash=xxxxxxxxxxxxxxxxxxx&t=0.50
103217: SendToHTTP: Host: www.temperatur.nu/rapportera.php?hash=xxxxxxxxxxxxxxxxxxx&t=0.50 port:
103221: ACT : timerSet,1,50 sec
103227: Command: timerset
103227: timerSet,1,50 sec
103231: EVENT: Rules#Timer=1 Processing time:45 milliSeconds
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
Looks like you need to have that port number (80).
Code: Select all
SendToHTTP,http://www.temperatur.nu,80,/rapportera.php?hash=123abc456&t=[temp#out]
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
Now but it looks like it is a space at port: 80 but it may not have any significance.
Still nothing that works unfortunately.
My Rule
Still nothing that works unfortunately.
Code: Select all
748: WD : Uptime 11 ConnectFailures 0 FreeMem 15904
658193: EVENT: Clock#Time=Mon,21:56
658208: EVENT: Clock#Time=Mon,21:56 Processing time:15 milliSeconds
718192: EVENT: Clock#Time=Mon,21:57
718208: EVENT: Clock#Time=Mon,21:57 Processing time:16 milliSeconds
722748: WD : Uptime 12 ConnectFailures 0 FreeMem 15904
723635: LoopStats: shortestLoop: 108 longestLoop: 1611745 avgLoopDuration: 123.64 loopCounterMax: 277777 loopCounterLast: 232564 countF
723636: Scheduler stats: (called/tasks/max_length/idle%) 232564/2132/7/91.70
752748: WD : Uptime 13 ConnectFailures 0 FreeMem 15904
756192: EVENT: Rules#Timer=1
756211: ACT : SendToHTTP,www.temperatur.nu,80/rapportera.php?hash=xxxxxxxxxxx&t=1.00
756220: Command: sendtohttp
756220: SendToHTTP,www.temperatur.nu,80/rapportera.php?hash=xxxxxxxxxxx&t=1.00
756221: SendToHTTP: Host: www.temperatur.nu port: 80/rapportera.php?hash=xxxxxxxxxxx&t=1.00
756224: ACT : timerSet,1,150
756234: Command: timerset
756234: timerSet,1,150
756240: EVENT: Rules#Timer=1 Processing time:48 milliSeconds
Code: Select all
On System#Boot do // When the ESP boots, do
timerSet,1,150 // Set Timer 1 for the next event in 150 seconds
endon
On Rules#Timer=1 do // When Timer1 expires, do
SendToHTTP,www.temperatur.nu,80/rapportera.php?hash=xxxxxxxxxxxxxxxxxxx&t=[DS1#Temp]
timerSet,1,150
endon
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
Code: Select all
On System#Boot do // When the ESP boots, do
timerSet,1,150 // Set Timer 1 for the next event in 150 seconds
endon
On Rules#Timer=1 do // When Timer1 expires, do
SendToHTTP,www.temperatur.nu,80,/rapportera.php?hash=xxxxxxxxxxxxxxxxxxx&t=[DS1#Temp]
timerSet,1,150
endon
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
Oh, I have missed I will update during the day and we will see if there will be any difference.grovkillen wrote: ↑05 Feb 2019, 06:52A comma is missing after the port number, see my example above.Code: Select all
On System#Boot do // When the ESP boots, do timerSet,1,150 // Set Timer 1 for the next event in 150 seconds endon On Rules#Timer=1 do // When Timer1 expires, do SendToHTTP,www.temperatur.nu,80,/rapportera.php?hash=xxxxxxxxxxxxxxxxxxx&t=[DS1#Temp] timerSet,1,150 endon
Re: Report temp to temperatur.nu
Eureka, it works now !!
Code: Select all
On System#Boot do // When the ESP boots, do
timerSet,1,150 // Set Timer 1 for the next event in 150 seconds
endon
On Rules#Timer=1 do // When Timer1 expires, do
SendToHTTP,www.temperatur.nu,80,/rapportera.php?hash=XXXXXXXXXXXXXXXXXX&t=[DS1#Temp]
timerSet,1,150
endon
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
Great!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
Is there anything to add that checks if it is connected to the network, otherwise it should restart.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
By network do you mean lan or wan?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Report temp to temperatur.nu
Lan is most important but it is perhaps easiest to wan, I do not know but I have noticed on a couple of occasions that it does not have contact with lan because I have, for example, updated my network, then it will suffice with a restart to get it started again .
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Report temp to temperatur.nu
Then use the wifi disconnected event, you will find more info on the rules section on "readthedocs". https://espeasy.readthedocs.io/en/latest/
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Who is online
Users browsing this forum: No registered users and 74 guests