B4R Question can me connect this Board without App eWeLink ?

naifnas

Active Member
Licensed User
hello all
can me connect this Board without App eWeLink by B4R ?
thanks
correct
how I connect this board by app by B4A?
I means I want make app same ewelink
 

Attachments

  • S-100018945-671b89494f31bf906f1a77cd8d1b755a.jpg
    S-100018945-671b89494f31bf906f1a77cd8d1b755a.jpg
    95.1 KB · Views: 237
Last edited:

thetahsk

Active Member
Licensed User
Longtime User
hello all
can me connect this Board without App eWeLink by B4R ?
thanks
A little bit tricky, but should work because it's an ESP8266 based Board by itead.cc , you need for example an FDTI programmer. You can try the tasmota firmware or use your own one written in Arduino/B4R.

Look here for some hints
 
Upvote 0

naifnas

Active Member
Licensed User
A little bit tricky, but should work because it's an ESP8266 based Board by itead.cc , you need for example an FDTI programmer. You can try the tasmota firmware or use your own one written in Arduino/B4R.

Look here for some hints
thanks
 
Upvote 0

naifnas

Active Member
Licensed User
sorry I wrong question
my question
how I connect this board by app by B4A?
I means I want make app same ewelink
 
Upvote 0

tigrot

Well-Known Member
Licensed User
Longtime User
First you must know how to comunicate with the device, then you must code the program. Believe me, it's not simple, you must have a wide experience . If you want start with a small program then add functions to get the solution. It's impossible to condense in a few words! Follow the examples in the package I pointed on my previous post.
 
Upvote 0

naifnas

Active Member
Licensed User
First you must know how to comunicate with the device, then you must code the program. Believe me, it's not simple, you must have a wide experience . If you want start with a small program then add functions to get the solution. It's impossible to condense in a few words! Follow the examples in the package I pointed on my previous post.

thanks
To connect to the device I do not think it needs complication
If I am not mistaken
He needs to connect the Ip and the port number and give the command
I got code from a site

C++:
// Control ESP8266 anywhere

// Import required libraries
#include
#include
#include

// Clients
WiFiClient espClient;
PubSubClient client(espClient);

// Create aREST instance
aREST rest = aREST(client);

// Unique ID to identify the device for cloud.arest.io
char* device_id = "e49n2di";

// WiFi parameters
const char* ssid = "yourWiFiNetwork";
const char* password = "yourWiFipassword";

// Functions
void callback(char* topic, byte* payload, unsigned int length);

void setup(void)
{
  // Start Serial
  Serial.begin(115200);

  // Set callback
  client.setCallback(callback);
 
  // Give name and ID to device
     rest.set_id(device_id);
  rest.set_name("relay_anywhere");

  // Connect to WiFi
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");

  // Set output topic
  char* out_topic = rest.get_topic();

}

void loop() {

  // Connect to the cloud
      rest.loop(client);

}

// Handles message arrived on subscribed topic(s)
void callback(char* topic, byte* payload, unsigned int length) {

  rest.handle_callback(client, topic, payload, length);

}
 
Upvote 0
Top