SendToHTTP usgae ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
cdx
New user
Posts: 1
Joined: 31 Jul 2017, 13:44

SendToHTTP usgae ?

#1 Post by cdx » 31 Jul 2017, 13:55

hello all,

I'm new with espeasy and whould like to send a http message (DHT11 temperature) to my jeedom server.

The classic message in jeedom is something like this :

http://192.168.1.15/core/api/jeeApi.php ... emperature%

may i use the SendToHTTP function ?
like this ?

SendToHTTP 192.168.1.15,80,/json.htm?/core/api/jeeApi.php?apikey=y7pcfIMvcGffk0hNff1dLtvFJNjpSOff&type=virtual&id=48&value=%Temperature%

What is the correct syntax ?

In reality i just want to send this http message from the ESP !
I also tried a
on TEMP1 (using rules)

http://.... or SendToHTTP ?

EndOn


Thanks for your help

rudloffl
Normal user
Posts: 43
Joined: 04 Jul 2019, 07:17

Re: SendToHTTP usgae ?

#2 Post by rudloffl » 05 Aug 2019, 01:22

Did you find a solution @cdx ?

I have the same problem, I was hoping that a publish would do the job.

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

Re: SendToHTTP usgae ?

#3 Post by iron » 05 Aug 2019, 15:21

This is my exact (api key changed) working syntax for posting temp and humidity values to thingspeak

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

https://thingspeak.com/channels/33034

-D
-D

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

Re: SendToHTTP usgae ?

#4 Post by TD-er » 05 Aug 2019, 20:45

You can include the [name#value] syntax in the URL also.
For example:
SendToHTTP example.com,80,api/add/single?id=%mac_int%&long=[gps#long]&lat=[gps#lat]&co2=[S8#co2]

So hostname,port,rest_of_url

See also the documentation: https://espeasy.readthedocs.io/en/lates ... sendtohttp

Please note that we currently do not support https url's

rudloffl
Normal user
Posts: 43
Joined: 04 Jul 2019, 07:17

Re: SendToHTTP usgae ?

#5 Post by rudloffl » 06 Aug 2019, 05:55

I'm not a big fan to hard code a API key in an espeasy (no offense to the team !).
I'm using Lunorak's plugin for espeasy (using http general). I prefer to avoid the usage of a different plugin on the jeedom side.
TD-er provided a solution with taskrun

Thanks again for the feed back

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests