<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — How to set custom Access Password? ESP8266]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1773</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1773&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to set custom Access Password? ESP8266.]]></description>
		<lastBuildDate>Wed, 13 Mar 2024 19:19:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to set custom Access Password? ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5430#p5430</link>
			<description><![CDATA[<div class="quotebox"><cite>reaz87 wrote:</cite><blockquote><p>@ remotexy, <br />I can connect Wifi Access point using examples-&gt; Setup Connection-&gt; ESP_WiFiSetupUsingAP. But I am unable to find WiFi Access Point using above code. Please help me. Thank you.</p></blockquote></div><p>The example code I posted allows you to change only the RemoteXY access password. It does not contain Wi-Fi connection settings.</p>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Wed, 13 Mar 2024 19:19:28 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5430#p5430</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to set custom Access Password? ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5429#p5429</link>
			<description><![CDATA[<div class="quotebox"><cite>reaz87 wrote:</cite><blockquote><p>&quot;#define PIN_BUTTON_RESET_SWTTINGS 3&quot;</p><p>Is it GPIO3&nbsp; pin? means RX pin?</p></blockquote></div><p>You can replace it with any pin to which you connect the password reset button. You can also not use it at all.</p>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Wed, 13 Mar 2024 19:15:39 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5429#p5429</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to set custom Access Password? ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5428#p5428</link>
			<description><![CDATA[<div class="quotebox"><cite>remotexy wrote:</cite><blockquote><p>Example of changing the RemoteXY access password.<br />Use EEPROM to store the password when the power is turned off.<br />Use the physical button to reset your password. You can forget it.</p><div class="codebox"><pre><code>//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// you can enable debug logging to Serial at 115200
//#define REMOTEXY__DEBUGLOG    

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP8266WIFI_LIB_CLOUD
#include &lt;ESP8266WiFi.h&gt;
#include &lt;EEPROM.h&gt;


// RemoteXY connection settings 
#define REMOTEXY_WIFI_SSID &quot;myHomeWiFiPoint&quot;
#define REMOTEXY_WIFI_PASSWORD &quot;12345678&quot;
#define REMOTEXY_CLOUD_SERVER &quot;cloud.remotexy.com&quot;
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN &quot;xxxxxxxxxxxxxxxxxxxxxxxxxx&quot;

// redirect to global variable accessPassword
#define REMOTEXY_ACCESS_PASSWORD accessPassword

#include &lt;RemoteXY.h&gt;


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 79 bytes
  { 255,27,0,0,0,64,0,17,0,0,0,31,1,106,200,1,1,3,0,1,
  16,99,73,13,2,28,31,83,101,116,32,110,101,119,32,112,97,115,115,0,
  7,17,80,72,12,4,30,26,26,129,17,71,46,6,27,65,99,99,101,115,
  115,32,112,97,115,119,111,114,100,58,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t changePasswordButton; // =1 if button pressed, else =0
  char accessPassword[26]; // string UTF8 end zero

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

} RemoteXY;
#pragma pack(pop)
 
/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

// change access password settings
char accessPassword[26];  // this variable stores the access password
#define PIN_BUTTON_RESET_SWTTINGS 3   // pin of button to reset the password
// EEPROM addresses
#define addrEPPROM_Check 0x0000  
#define addrEPPROM_AccessPassword 0x0001
#define checkValueForEPPROM 0x55  // sign of data validity in EEPROM 
uint8_t prevChangePasswordButton = 0; // to catch a button click in the GUI


void setup() 
{
  EEPROM.begin(sizeof(accessPassword)+1);
  pinMode (PIN_BUTTON_RESET_SWTTINGS, INPUT);

  boolean EEPROMisValid = readAccessPasswordFromEEPROM ();
  if (!EEPROMisValid) {
    setAccessPassword (&quot;&quot;); // set defoult access password - NO PASSWORD
  }
  
  RemoteXY_Init (); 
  
  strcpy  (RemoteXY.accessPassword, accessPassword); // copy password to GUI

  // TODO you setup code
  
}

boolean readAccessPasswordFromEEPROM () {
  if (EEPROM.read(addrEPPROM_Check) == checkValueForEPPROM) {
    for (uint8_t i = 0; i&lt;sizeof(accessPassword); i++) accessPassword[i] = EEPROM.read(addrEPPROM_AccessPassword+i); 
    return true;
  }
  return false;  
}

void writeAccessPasswordToEEPROM () {
  for (uint8_t i = 0; i&lt;sizeof(accessPassword); i++) EEPROM.write (addrEPPROM_AccessPassword+i, accessPassword[i]);  
  EEPROM.write (addrEPPROM_Check, checkValueForEPPROM);    
  EEPROM.commit ();  
}

void setAccessPassword (char * newpAccessPssword) {
  strcpy  (accessPassword, newpAccessPssword);
  remotexy-&gt;setPassword (accessPassword);
  writeAccessPasswordToEEPROM ();     
}


void loop() 
{ 
  RemoteXY_Handler ();

  if ((prevChangePasswordButton == 0) &amp;&amp; (RemoteXY.changePasswordButton !=0)) {
    setAccessPassword (RemoteXY.accessPassword);
  }
  prevChangePasswordButton = RemoteXY.changePasswordButton;

  // if need reset password then uncomment this code
  // This is an example code, it&#039;s not very good. 
  // Because the EEPROM will be recorded in every loop cycle while the button is pressed, which is not very good for the EEPROM 
  // You need to catch the moment the button is pressed.
  // You can also wait that the button has been pressed for 3-5 seconds
  /*
  if (digitalRead(PIN_BUTTON_RESET_SWTTINGS)) {
    setAccessPassword (&quot;&quot;); // reset access password - NO PASSWORD
  }
  */

}</code></pre></div></blockquote></div><br /><br /><p>@ remotexy, <br />I can connect Wifi Access point using examples-&gt; Setup Connection-&gt; ESP_WiFiSetupUsingAP. But I am unable to find WiFi Access Point using above code. Please help me. Thank you.</p>]]></description>
			<author><![CDATA[null@example.com (reaz87)]]></author>
			<pubDate>Wed, 13 Mar 2024 17:12:14 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5428#p5428</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to set custom Access Password? ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5425#p5425</link>
			<description><![CDATA[<p>&quot;#define PIN_BUTTON_RESET_SWTTINGS 3&quot;</p><p>Is it GPIO3&nbsp; pin? means RX pin?</p>]]></description>
			<author><![CDATA[null@example.com (reaz87)]]></author>
			<pubDate>Tue, 12 Mar 2024 19:20:09 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5425#p5425</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to set custom Access Password? ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5424#p5424</link>
			<description><![CDATA[<p>Thank you very much to Administrator of RemoteXY.</p>]]></description>
			<author><![CDATA[null@example.com (reaz87)]]></author>
			<pubDate>Tue, 12 Mar 2024 18:24:51 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5424#p5424</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to set custom Access Password? ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5417#p5417</link>
			<description><![CDATA[<p>Example of changing the RemoteXY access password.<br />Use EEPROM to store the password when the power is turned off.<br />Use the physical button to reset your password. You can forget it.</p><div class="codebox"><pre><code>//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// you can enable debug logging to Serial at 115200
//#define REMOTEXY__DEBUGLOG    

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP8266WIFI_LIB_CLOUD
#include &lt;ESP8266WiFi.h&gt;
#include &lt;EEPROM.h&gt;


// RemoteXY connection settings 
#define REMOTEXY_WIFI_SSID &quot;myHomeWiFiPoint&quot;
#define REMOTEXY_WIFI_PASSWORD &quot;12345678&quot;
#define REMOTEXY_CLOUD_SERVER &quot;cloud.remotexy.com&quot;
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN &quot;xxxxxxxxxxxxxxxxxxxxxxxxxx&quot;

// redirect to global variable accessPassword
#define REMOTEXY_ACCESS_PASSWORD accessPassword

#include &lt;RemoteXY.h&gt;


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 79 bytes
  { 255,27,0,0,0,64,0,17,0,0,0,31,1,106,200,1,1,3,0,1,
  16,99,73,13,2,28,31,83,101,116,32,110,101,119,32,112,97,115,115,0,
  7,17,80,72,12,4,30,26,26,129,17,71,46,6,27,65,99,99,101,115,
  115,32,112,97,115,119,111,114,100,58,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t changePasswordButton; // =1 if button pressed, else =0
  char accessPassword[26]; // string UTF8 end zero

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

} RemoteXY;
#pragma pack(pop)
 
/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

// change access password settings
char accessPassword[26];  // this variable stores the access password
#define PIN_BUTTON_RESET_SWTTINGS 3   // pin of button to reset the password
// EEPROM addresses
#define addrEPPROM_Check 0x0000  
#define addrEPPROM_AccessPassword 0x0001
#define checkValueForEPPROM 0x55  // sign of data validity in EEPROM 
uint8_t prevChangePasswordButton = 0; // to catch a button click in the GUI


void setup() 
{
  EEPROM.begin(sizeof(accessPassword)+1);
  pinMode (PIN_BUTTON_RESET_SWTTINGS, INPUT);

  boolean EEPROMisValid = readAccessPasswordFromEEPROM ();
  if (!EEPROMisValid) {
    setAccessPassword (&quot;&quot;); // set defoult access password - NO PASSWORD
  }
  
  RemoteXY_Init (); 
  
  strcpy  (RemoteXY.accessPassword, accessPassword); // copy password to GUI

  // TODO you setup code
  
}

boolean readAccessPasswordFromEEPROM () {
  if (EEPROM.read(addrEPPROM_Check) == checkValueForEPPROM) {
    for (uint8_t i = 0; i&lt;sizeof(accessPassword); i++) accessPassword[i] = EEPROM.read(addrEPPROM_AccessPassword+i); 
    return true;
  }
  return false;  
}

void writeAccessPasswordToEEPROM () {
  for (uint8_t i = 0; i&lt;sizeof(accessPassword); i++) EEPROM.write (addrEPPROM_AccessPassword+i, accessPassword[i]);  
  EEPROM.write (addrEPPROM_Check, checkValueForEPPROM);    
  EEPROM.commit ();  
}

void setAccessPassword (char * newpAccessPssword) {
  strcpy  (accessPassword, newpAccessPssword);
  remotexy-&gt;setPassword (accessPassword);
  writeAccessPasswordToEEPROM ();     
}


void loop() 
{ 
  RemoteXY_Handler ();

  if ((prevChangePasswordButton == 0) &amp;&amp; (RemoteXY.changePasswordButton !=0)) {
    setAccessPassword (RemoteXY.accessPassword);
  }
  prevChangePasswordButton = RemoteXY.changePasswordButton;

  // if need reset password then uncomment this code
  // This is an example code, it&#039;s not very good. 
  // Because the EEPROM will be recorded in every loop cycle while the button is pressed, which is not very good for the EEPROM 
  // You need to catch the moment the button is pressed.
  // You can also wait that the button has been pressed for 3-5 seconds
  /*
  if (digitalRead(PIN_BUTTON_RESET_SWTTINGS)) {
    setAccessPassword (&quot;&quot;); // reset access password - NO PASSWORD
  }
  */

}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Sun, 10 Mar 2024 17:53:32 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5417#p5417</guid>
		</item>
		<item>
			<title><![CDATA[How to set custom Access Password? ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5415#p5415</link>
			<description><![CDATA[<p>I developed a project. Client want to change GUI access password time to time. How it is possible. Please help.<br />My code is</p><br /><br /><div class="codebox"><pre><code>/*
      
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 3.1.10 or later version 
   download by link [url]http://remotexy.com/en/library/[/url]
   To connect using RemoteXY mobile app by link [url]http://remotexy.com/en/download/[/url]                   
     - for ANDROID 4.13.1 or later version;
     - for iOS 1.10.1 or later version;
    
   This source code is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.    
*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// you can enable debug logging to Serial at 115200
//#define REMOTEXY__DEBUGLOG    

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP8266WIFI_LIB_CLOUD
#include &lt;ESP8266WiFi.h&gt;

#include &lt;RemoteXY.h&gt;

// RemoteXY connection settings 
#define REMOTEXY_WIFI_SSID &quot;Ibnat&quot;
#define REMOTEXY_WIFI_PASSWORD &quot;0171724xxxxx&quot;
#define REMOTEXY_CLOUD_SERVER &quot;cloud.remotexy.com&quot;
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN &quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;
#define REMOTEXY_ACCESS_PASSWORD &quot;123&quot;



// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 325 bytes
  { 255,26,0,25,0,62,1,17,0,0,0,24,1,126,200,1,1,29,0,130,
  254,28,136,169,0,181,1,92,133,27,24,1,2,31,68,73,83,80,76,65,
  89,0,1,8,130,32,32,0,1,31,67,76,79,83,69,0,1,50,130,32,
  32,0,12,31,79,80,69,78,0,70,21,119,6,6,16,26,37,0,70,63,
  119,6,6,16,26,135,0,69,50,163,8,8,1,69,4,160,8,8,1,69,
  89,162,8,8,1,130,254,242,140,20,0,205,130,246,198,140,22,0,205,129,
  82,198,36,4,31,68,101,118,101,108,111,112,101,100,32,66,121,32,82,101,
  97,122,0,129,40,252,52,8,31,49,49,75,86,32,65,67,82,45,48,49,
  0,130,2,75,62,12,0,41,130,66,75,58,12,0,139,70,46,78,6,6,
  16,26,37,0,70,114,78,6,6,16,26,136,0,129,4,77,37,8,8,80,
  111,119,101,114,32,79,78,0,129,70,77,40,8,8,80,111,119,101,114,32,
  79,70,70,0,130,254,8,130,18,0,209,3,72,10,25,14,130,2,26,129,
  2,12,59,10,24,83,69,76,69,67,84,32,65,67,82,0,67,94,117,24,
  10,5,2,26,4,129,3,43,3,4,147,0,130,2,50,122,16,0,19,67,
  5,52,117,13,5,37,19,11,7,61,33,61,11,1,8,181,11,129,6,35,
  55,8,8,70,101,101,100,101,114,32,78,97,109,101,58,0,7,0,28,59,
  4,0,12,26,11 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t display_button; // =1 if button pressed, else =0
  uint8_t close_button; // =1 if button pressed, else =0
  uint8_t button_2; // =1 if button pressed, else =0
  uint8_t select_1; // =0 if select position A, =1 if position B, =2 if position C, ...
  char edit_01[11]; // string UTF8 end zero
  char edit_02[11]; // string UTF8 end zero

    // output variables
  uint8_t incm_2_close_led; // led state
  uint8_t incm_2_open_led; // led state
  int16_t incm_2_open_sound; // =0 no sound, else ID of sound, =1001 for example, look sound list in app
  int16_t incm_2_close_sound; // =0 no sound, else ID of sound, =1001 for example, look sound list in app
  int16_t incm_2_display_sound; // =0 no sound, else ID of sound, =1001 for example, look sound list in app
  uint8_t elec_close_led; // led state
  uint8_t elecIncm_2_open_led; // led state
  char text_display[4]; // string UTF8 end zero
  char status_text[11]; // string UTF8 end zero

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

} RemoteXY;
#pragma pack(pop)
 
/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_DISPLAY_BUTTON D7
#define PIN_CLOSE_BUTTON D5
#define PIN_BUTTON_2 D6


void setup() 
{
  RemoteXY_Init (); 
  
  pinMode (PIN_DISPLAY_BUTTON, OUTPUT);
  pinMode (PIN_CLOSE_BUTTON, OUTPUT);
  pinMode (PIN_BUTTON_2, OUTPUT);
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(PIN_DISPLAY_BUTTON, (RemoteXY.display_button==0)?LOW:HIGH);
  digitalWrite(PIN_CLOSE_BUTTON, (RemoteXY.close_button==0)?LOW:HIGH);
  digitalWrite(PIN_BUTTON_2, (RemoteXY.button_2==0)?LOW:HIGH);
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay(), use instead RemoteXY_delay() 


}</code></pre></div><p>Advance thanks to all.</p>]]></description>
			<author><![CDATA[null@example.com (reaz87)]]></author>
			<pubDate>Fri, 08 Mar 2024 20:46:29 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5415#p5415</guid>
		</item>
	</channel>
</rss>
