SendToHTTP not working

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#51 Post by sentinel » 02 Oct 2018, 18:38

you can try the following:
Add the following Rule on unit#1 (which has the BME280 sensor):

Code: Select all

on sendData do
  SendToHTTP 192.168.0.7,80,/control?cmd=7dt,[bme280#temp]
endon
And add the following Rules on unit#2 (which has the display):

Code: Select all

on WiFi#Connected do
  sendToHTTP 192.168.0.6,80,/control?cmd=event,sendData
  timerSet,1,2
endon

on Rules#Timer=1 do
  sendToHTTP 192.168.0/6,80,/control?cmd=event,sendData
  timerSet,1,2
endon
So my idea is:
Unit#2
- when unit#2 connects to the wifi, it sends a request to unit#1 to execute "sendData". It also starts a timer
- when the timer expires, it sends a request to unit#1 to execute "sendData". It also re-starts the timer
Unit#1
- contains simply sendData, which will call 7dt and send the temperature to unit#1 using sendToHTTP

esp8266
New user
Posts: 3
Joined: 27 Sep 2018, 17:10

Re: SendToHTTP not working

#52 Post by esp8266 » 03 Oct 2018, 21:27

sentinel
it works ! :D
thank you very much for your help

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#53 Post by sentinel » 04 Oct 2018, 18:05

you are welcome :D

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests