ESP8266 & Arduino & GUI-O automatic pairing
-
@Bernard please uncomment
#define _GUIO_DEBUG
in config.h to output more information on uart. Recompile and reupload the code to Esp8266. This will give us more information to work with.
It is definitely some problem on Esp8266 side (not on the GUI-O app side).
Regards,
kl3m3n -
@kl3m3n
Here is what I see on the IDE terminal:
Pairing request: {
"mqttHostName": "mqtt.gui-o.com",
"mqttUserName": "gui-o-mqtt-generic",
"mqttUserPassword": "lqXeZpv5VJyv0XBT",
"networkPassword": "---------",
"networkSsid": "-----",
"publishTopic": "95fb4171-2024-42de-978e-fcbb6c6caf10",
"subscribeTopic": "b1126463-4511-45b0-84fa-350ad2a41751"
}
Pairing response: {
"pairingResponse": 0,
"pairingDeviceName": "guio_ea9f6d93b119",
"networkSsid": "------",
"networkPassword": "---------",
"mqttHostName": "mqtt.gui-o.com",
"mqttUserName": "gui-o-mqtt-generic",
"mqttUserPassword": "lqXeZpv5VJyv0XBT",
"subscribeTopic": "b1126463-4511-45b0-84fa-350ad2a41751",
"publishTopic": "95fb4171-2024-42de-978e-fcbb6c6caf10"
}
Pairing succeeded! Copying parameters and scheduling restart...
b
gC))k%
H
I a 0gf) X ʎ t N
y )1% 9o)C C9
E )/
**** ESP8266 GUI-O ****GUI-O parameters not found... initializing...
AP Mode
ssid: guio_ea9f6d93b119
password: 12345678
AP status: 1
I deliberately erased password and ssid but they are correct.
Bernard -
@Bernard It seems that the pairing parameters are not saved into Esp8266 EEPROM successfully... This triggers booting into AP (pairing) mode...
I am wondering if your board selection is ok?
@Bernard said in ESP8266 & Arduino & GUI-O automatic pairing:
This could be a bad configuration of the wifi module?!
it's a wemos D1 mini ESP8266, in the arduino IDE I used the Lolin(Wemos) D1 mini pro.Best regards,
kl3m3n -
@kl3m3n
Good morning,
actually i think the wifi modul is faulty. I tried to flash it with 5 different combinations but it's always the same result. I will therefore recommend one and I will keep you informed of the evolution of things. In any case, thank you very much for your patience and valuable advice! maybe these exchanges will be useful to others, but I think it's bad luck.
Kind regards Bernard -
@Bernard Hi.
I suggest you try a simple EEPROM write / read example for ESP8266.
Does this work?Best regards,
kl3m3n -
@kl3m3n
Hello kl3m3n
As explained at the beginning of our discussions, I do not know the C language at all. I will therefore be unable to write this procedure!
But on my last pairing attempt, I got to "IoT connection successful" but the blue bar advances for 2 minutes then prompts me to start the process again and what I read on the serial interface of L' IDE and always the same thing as quoted on 09.02.at.9:23 p.m. There is indeed a read-write problem in the ESP! have a good week-end. Bernard -
@kl3m3n
What I have trouble understanding is that the "Pairing request: { process seems to work since there is a "Pairing response: { , then Pairing succeeded! Copying parameters and scheduling restart . so why " GUI-O parameters not found... initializing... -
@Bernard Hi!
There are numerous examples for EEPROM usage online, e.g.:
https://www.aranacorp.com/en/using-the-eeprom-with-the-esp8266/@Bernard said in ESP8266 & Arduino & GUI-O automatic pairing:
What I have trouble understanding is that the "Pairing request: { process seems to work since there is a "Pairing response: { , then Pairing succeeded! Copying parameters and scheduling restart . so why " GUI-O parameters not found... initializing...
The pairing parameters are exchanged successfully, but this does not mean that the actual EEPROM write was done successfully... Yes, I agree that this part of the code is a bit awkwardly written. I will see if I can fix this in a timely manner...
Best regards,
kl3m3n -
@kl3m3n
I used the example and I get the same answer:
Read ID = 18
Read param = 26.50
it seems to work...
in the pairing procedure with GUI-O I don't know how many parameters are exchanged with the ESP but if the LED flashes ~300msec, at 9600 baud they have time to exchange around 950 characters, should that be enough?
Bernard -
@kl3m3n
No, its ~250 characteres ...... -
@kl3m3n
Good morning
I uninstalled the Arduino IDE is installed again! and noted in passing that he installed libraries that he had not done during the 1st installation. So everything is back to normal and the wifi connection is working. The next step is to connect everything to the internet ...... is there a good tutorial. to do this ?
Thank you very much for your patience and good advice.
Kind regards Bernard -
-
@Bernard Hi.
I have moved this thread to FAQ.
I am glad you've got it working!
@Bernard said in ESP8266 & Arduino & GUI-O automatic pairing:
So everything is back to normal and the wifi connection is working.
Does this mean the pairing is successful? GUI-O can communicate with Esp8266?
@Bernard said in ESP8266 & Arduino & GUI-O automatic pairing:
The next step is to connect everything to the internet ...... is there a good tutorial. to do this ?
I don't quite understand this... What do you mean by connecting everything to the internet?
Best regards,
kl3m3n -
@kl3m3n
Good morning kl3m3n
Yes, everything works fine! I asked a stupid question, wherever I am I have access to my application at home (at 70, we still ask funny questions!) but I have one that is not stupid: I program with Bascom. My application is saving data to a file and I can't find the correct syntax to write both a constant and a variable to it. For example I want to write the word "Temp:" followed by the "temp_v" variable.
Print "@extf1 FAC:1 FP:'"Temp: ; temp_v ; ", " Hum: ; Hum_v; "',"
Constant ^^ Var. ^^ Const. ^^ Va. ^^In any case, thank you again for your help and support.
Good day Bernard -
@kl3m3n
Finally I found the answer to my question about the "Constant / Variable" command format. the formula is:Print "@extf1 FAC:1 FP:'Temp:" ; Temperature ; " ,Humi:" ; Humidity ; " ,Press: " ; Pression ; "',"
Bernard
-
@Bernard Very nice! It is always a good feeling when you solve a problem yourself!