<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — read the data from many ESP8266, sending all to cloud via one ESP8266]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=415</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=415&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in read the data from many ESP8266, sending all to cloud via one ESP8266.]]></description>
		<lastBuildDate>Sat, 17 Mar 2018 08:08:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: read the data from many ESP8266, sending all to cloud via one ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1417#p1417</link>
			<description><![CDATA[<p>Than you Guillaume!<br />In next project will use ESP8266.</p>]]></description>
			<author><![CDATA[null@example.com (raitisgr)]]></author>
			<pubDate>Sat, 17 Mar 2018 08:08:40 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1417#p1417</guid>
		</item>
		<item>
			<title><![CDATA[Re: read the data from many ESP8266, sending all to cloud via one ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1416#p1416</link>
			<description><![CDATA[<p>Hello <img src="https://forum.remotexy.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>RemoteXY and WiFiEsp libraries both send their own AT commands to the ESP, trying to start Wifi in different modes. I don&#039;t know if there is an easy way to fix that. See RemoteXY/modules/esp8266_cloud.h, then try write your own module so that it doesn&#039;t mess with AT commands. Sorry I can&#039;t help you with that, I never used this AT mode of the ESP.</p><p>I suggest to use the ESP8266 as the brain of your project, because it&#039;s much more powerful than your arduino mega.</p>]]></description>
			<author><![CDATA[null@example.com (Guillaume)]]></author>
			<pubDate>Fri, 16 Mar 2018 23:38:14 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1416#p1416</guid>
		</item>
		<item>
			<title><![CDATA[read the data from many ESP8266, sending all to cloud via one ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1393#p1393</link>
			<description><![CDATA[<p>Hello,<br /> I want to read the data from many other ESP8266 and send it to RemoteXY from one ESP8266 - <strong>ESP1</strong> which is connected as shield on MEGA.</p><p>So I started from setting the communication between two ESP by using router. This example works:<br /><a target="_blank" href="http://www.instructables.com/id/WiFi-Co">http://www.instructables.com/id/WiFi-Co</a> … sed-MCU-T/</p><p>I create few servers(these are virtual servers, I think) who send the data to 1 client&nbsp; - ESP1. But when I want to set RemoteXY also on ESP1 it don&#039;t work together at all. <br />Here can see my code, it not read data from other servers and do not connect to RemoteXY too.<br />Whit mark <span class="bbu"><em>//R: WiFIEsp</em></span> I show the place were I add commands to set connection to server.</p><p>Maybe it is because, WiFiEsp library do not work together with Remote XY.</p><div class="codebox"><pre><code>/* 
   -- mega esp -- 
   
   DHT:   MEGA:
   dat    52
*/ 

#define REMOTEXY_MODE__ESP8266_HARDSERIAL_CLOUD
#include &lt;RemoteXY.h&gt; 
#include &lt;SimpleDHT.h&gt; //R: DHT:
#include &quot;WiFiEsp.h&quot; //R: WiFiEsp

// настройки соединения 
 
#define REMOTEXY_SERIAL Serial1 // R: tas ir tie 19 un 18 pini

#define REMOTEXY_SERIAL_SPEED 9600 
#define REMOTEXY_WIFI_SSID &quot;XX_3_5&quot; 
#define REMOTEXY_WIFI_PASSWORD &quot;XXXXXX&quot; 
#define REMOTEXY_CLOUD_SERVER &quot;cloud.remotexy.com&quot; 
#define REMOTEXY_CLOUD_PORT XXXX 
#define REMOTEXY_CLOUD_TOKEN &quot;XXXXX&quot; 


// конфигурация интерфейса   
#pragma pack(push, 1) 
uint8_t RemoteXY_CONF[] = 
  { 255,2,0,24,0,177,0,8,186,1,
  2,0,3,52,22,11,2,26,31,31,
  79,78,0,79,70,70,0,129,0,4,
  47,13,3,29,109,101,103,97,32,108,
  101,100,0,67,4,4,12,16,5,2,
  26,6,129,0,4,7,17,3,29,109,
  101,103,97,32,116,101,109,112,46,0,
  67,4,4,25,16,5,2,26,6,129,
  0,4,21,16,3,29,109,101,103,97,
  32,109,105,116,114,46,0,67,4,38,
  12,16,5,2,26,6,67,4,38,25,
  16,5,2,26,6,129,0,38,8,16,
  3,29,101,115,112,50,32,116,101,109,
  112,46,0,129,0,38,21,15,3,29,
  101,115,112,51,32,109,105,116,114,46,
  0,2,0,38,52,22,11,2,26,31,
  31,79,78,0,79,70,70,0,129,0,
  39,47,13,3,29,101,115,112,50,32,
  108,101,100,0 }; 
   
// структура определяет все переменные вашего интерфейса управления  
struct { 

    // input variable
  uint8_t mega_led; // =1 если переключатель включен и =0 если отключен 
  uint8_t esp2_led; // =1 если переключатель включен и =0 если отключен 

    // output variable
  char temp_mega[6];  // =строка UTF8 оканчивающаяся нулем 
  char hum_mega[6];  // =строка UTF8 оканчивающаяся нулем 
  char temp_esp2[6];  // =строка UTF8 оканчивающаяся нулем 
  char hum_esp3[6];  // =строка UTF8 оканчивающаяся нулем 

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0 

} RemoteXY; 
#pragma pack(pop) 

#define PIN_MEGA_LED 13
#define PIN_ESP2_LED 12//R: jalabo
//-----------------------------------------------------
//R: DHT pins:
int pinDHT22 = 52;
SimpleDHT22 dht22;
//-----------------------------------------------------
//R: WiFiEsp
int status = WL_IDLE_STATUS;
IPAddress serverESP2(192, 168, 8, 110);       // the fix IP address of the server

// Initialize the Ethernet client object
WiFiEspClient client;

void setup()  
{ 
  RemoteXY_Init ();     
  pinMode (PIN_MEGA_LED, OUTPUT);
  pinMode (PIN_ESP2_LED, OUTPUT);
 //-----------------------------------------------------
//R: WiFiEsp  

   // initialize serial for debugging
  Serial.begin(9600);
  // initialize serial for ESP module
  Serial1.begin(9600);
  /*
  // initialize ESP module
  WiFi.init(&amp;Serial1);  //R: As soon as I add it the remotexy don&#039;t work
*/ 
} 

void loop()  
{  
  RemoteXY_Handler (); 
   
  digitalWrite(PIN_MEGA_LED, (RemoteXY.mega_led==0)?LOW:HIGH);
  digitalWrite(PIN_ESP2_LED, (RemoteXY.esp2_led==0)?LOW:HIGH);
   
  // TODO you loop code 
  
  //R: DHT:
     float temperature = 0;
     float humidity = 0;
       int err = SimpleDHTErrSuccess;
     if ((err = dht22.read2(pinDHT22, &amp;temperature, &amp;humidity, NULL)) != SimpleDHTErrSuccess) {
     //delay(300);
     return;
      } 
 
/*  R: sending temp. un hum. to app:
    преобразуем значение температуры в строку  
    и помещаем ее сразу в поле temp un hum структуры RemoteXY */ 
   dtostrf((float)temperature, 0, 1, RemoteXY.temp_mega);
   dtostrf((float)humidity, 0, 1, RemoteXY.hum_mega);

//-----------------------------------------------------------------------------------------
//R: WiFIEsp
  client.connect(serverESP2, 80);   // Connection to the server
  Serial.println(&quot;.&quot;);
  client.println(&quot;Hello server! Are you sleeping?\r&quot;);  // sends the message to the server
  String answerESP2 = client.readStringUntil(&#039;\r&#039;);   // receives the answer from the sever
  Serial.println(&quot;from server: &quot; + answerESP2);
  client.flush();

//--------------------------------------------------------------


}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (raitisgr)]]></author>
			<pubDate>Wed, 14 Mar 2018 10:01:55 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1393#p1393</guid>
		</item>
	</channel>
</rss>
