<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — set a time to disconnect connection between smartphone and esp8266]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1184</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1184&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in set a time to disconnect connection between smartphone and esp8266.]]></description>
		<lastBuildDate>Mon, 02 Nov 2020 15:51:13 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: set a time to disconnect connection between smartphone and esp8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3440#p3440</link>
			<description><![CDATA[<p>Dear Guillaume <br />Could you please provide another try to help</p>]]></description>
			<author><![CDATA[null@example.com (yoyoml)]]></author>
			<pubDate>Mon, 02 Nov 2020 15:51:13 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3440#p3440</guid>
		</item>
		<item>
			<title><![CDATA[Re: set a time to disconnect connection between smartphone and esp8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3432#p3432</link>
			<description><![CDATA[<p>i have used your example to make if phone connected wait 5 seconds then stop app for 10 seconds and it doesnt work properly so could you help me to figure out the issue and help me to make this code run as i plan to </p><p>unsigned long ledStarted = 0;<br />const long interval = 5000;</p><p>void loop()<br />{<br /> bool stopRemoteXYFor10Seconds = false; // set this variable to true whenever you need to stop remotexy for 10 seconds.</p><p>&nbsp; uint32_t now = millis();<br />&nbsp; static bool stopRemoteXY = false;<br />&nbsp; static uint32_t stopRemoteXYMillis = now;</p><p>&nbsp; if ( !stopRemoteXY &amp;&amp; stopRemoteXYFor10Seconds )<br />&nbsp; {<br />&nbsp; &nbsp; stopRemoteXY = true;<br />&nbsp; &nbsp; stopRemoteXYMillis = now;<br />&nbsp; }</p><p>&nbsp; if ( stopRemoteXY &amp;&amp; now - stopRemoteXYMillis &gt;= 10000UL )<br />&nbsp; {<br />&nbsp; &nbsp; stopRemoteXY = false;<br />&nbsp; }</p><p>&nbsp; if ( !stopRemoteXY )<br />&nbsp; {<br />&nbsp; &nbsp; &nbsp;remotexy.handler();<br />&nbsp; }<br />&nbsp; &nbsp;unsigned long currentMillis = millis();<br />&nbsp; if (currentMillis - ledStarted &gt;= interval &amp;&amp; remotexyStruct.connect_flag!=0 ) {<br />&nbsp; &nbsp; ledStarted = currentMillis;<br />stopRemoteXYFor10Seconds = true;<br />&nbsp; }<br />}</p>]]></description>
			<author><![CDATA[null@example.com (yoyoml)]]></author>
			<pubDate>Thu, 22 Oct 2020 17:04:38 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3432#p3432</guid>
		</item>
		<item>
			<title><![CDATA[Re: set a time to disconnect connection between smartphone and esp8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3422#p3422</link>
			<description><![CDATA[<p>Something like this<br /></p><div class="codebox"><pre><code>void loop()
{
  bool stopRemoteXYFor10Seconds = false; // set this variable to true whenever you need to stop remotexy for 10 seconds.

  uint32_t now = millis();
  static bool stopRemoteXY = false;
  static uint32_t stopRemoteXYMillis = now;

  if ( !stopRemoteXY &amp;&amp; stopRemoteXYFor10Seconds )
  {
    stopRemoteXY = true;
    stopRemoteXYMillis = now;
  }

  if ( stopRemoteXY &amp;&amp; now - stopRemoteXYMillis &gt;= 10000UL )
  {
    stopRemoteXY = false;
  }

  if ( !stopRemoteXY )
  {
    RemoteXY_Handler ();
  }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Guillaume)]]></author>
			<pubDate>Sun, 18 Oct 2020 23:02:24 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3422#p3422</guid>
		</item>
		<item>
			<title><![CDATA[Re: set a time to disconnect connection between smartphone and esp8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3415#p3415</link>
			<description><![CDATA[<p>Thanks for your continuous help, could you please give an example to stop remotexy handler using millis</p>]]></description>
			<author><![CDATA[null@example.com (yoyoml)]]></author>
			<pubDate>Fri, 16 Oct 2020 12:54:46 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3415#p3415</guid>
		</item>
		<item>
			<title><![CDATA[Re: set a time to disconnect connection between smartphone and esp8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3407#p3407</link>
			<description><![CDATA[<p>As far as I know, it&#039;s not possible to detect when a device try to connect.</p><p>To stop remotexy handler, just stop calling RemoteXY_Handler() from loop(), using delay() (noob&#039;s way), or using millis() like in the Blink Without Delay example from Arduino IDE.</p><p>Note that you can possibly create more than one RemoteXY interface in the same program. So multiple users could connect to these multiples interfaces. You can use the same RemoteXY_CONF array for all interfaces but the RemoteXY struct must be unique to each interface.</p><p><a target="_blank" href="http://forum.remotexy.com/viewtopic.php?id=15">http://forum.remotexy.com/viewtopic.php?id=15</a></p>]]></description>
			<author><![CDATA[null@example.com (Guillaume)]]></author>
			<pubDate>Tue, 13 Oct 2020 16:57:24 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3407#p3407</guid>
		</item>
		<item>
			<title><![CDATA[Re: set a time to disconnect connection between smartphone and esp8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3402#p3402</link>
			<description><![CDATA[<p>First of all thanks for your fast response <br />Actually I&#039;d like to know how can I stop remotexy handler , another thing can I edit remotexy library in order to detect if another device try to connect and there is device already connected , to disconnect the first connection and establish another one</p>]]></description>
			<author><![CDATA[null@example.com (yoyoml)]]></author>
			<pubDate>Fri, 09 Oct 2020 10:12:08 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3402#p3402</guid>
		</item>
		<item>
			<title><![CDATA[Re: set a time to disconnect connection between smartphone and esp8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3399#p3399</link>
			<description><![CDATA[<p>Welcome</p><p>There is no proper way to do that</p><p>When a Control (Buttons, Sliders etc) value has changed, assign millis() to a variable, and periodically check if ( RemoteXY.connect_flag == 1 &amp;&amp; millis() - variable &gt;= e.g. 30 seconds ), if true then stop calling RemoteXY_Handler() for like 10 seconds, this will kick the currently connected client and allow a new connection</p><p>It&#039;s possible to do something more elegant, but requires to write a custom remotexy library</p>]]></description>
			<author><![CDATA[null@example.com (Guillaume)]]></author>
			<pubDate>Wed, 07 Oct 2020 14:28:57 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3399#p3399</guid>
		</item>
		<item>
			<title><![CDATA[set a time to disconnect connection between smartphone and esp8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3398#p3398</link>
			<description><![CDATA[<p>considering that remotexy did not support to connect more than one phone at same time so i&#039;d like to make a timer to disconnect the connection between phone and esp8266 so, if the application has been held in background , it will not effect the efficency of our device and the phone will be disconnected and give a chance to another phone to connect again </p><p>also , if it is possible to make it if device connected and another one try to connect disconnect the first connection and esablish another one </p><p>so please help me to make this idea come into reality</p>]]></description>
			<author><![CDATA[null@example.com (yoyoml)]]></author>
			<pubDate>Wed, 07 Oct 2020 11:29:52 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3398#p3398</guid>
		</item>
	</channel>
</rss>
