Open doreks opened 5 years ago
The code was written for the ESP8266 and i'm not sure if your problem is related to that.
How did you change the pinout?
for the pinout for this esp8285 i have double check this web:
https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-Basic
here you can find old model of sonoff basic with esp8266 and new model with esp8285. as you can see led pin is 13 and digital input sensor could be 3 or 2.
do you think after change numbers of pin could i reuse the code ? on the other hands to can run this code in my sonoff i have erased this line
attachInterrupt(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), onPulse, RISING);
with this line the program doesn run and i get following error;
isr not in iram
after erase this line i can access and ping the sonoff, but still witout see power of the line and this things, i can imagin that is because i need to solder pin 3 or 2 right?
and last question for xtm position pin 20 and 21 towards what pins are conected in our board?
thank you so much for your suppor!
The header pinout is the same on both models, the diference is only internal.
What settings are you using when flashing the device?
so in this case i do not need to change pinout let or pinout digital input sensor..?
related with settings that i'm using to flash device I have followed this guide:
https://www.pcdemano.com/revisiones/235/2/
In the second screenshot that has configuration to flash with ArduinoIDE you can see the settings that im using to connect to this device and flash.
On the screenshot I see that Placa is set as 8266 and you say your sonoff has a 8285. Can this be the reason for your error?
i dont think so because if i flash using this model of board that i have i'm getting the same error :
isr not in iram
so the way to can run sonoff i need to remove the line with attachInterrupt and i can do run the code. in this point where i can run the code the issue is, how connect the pinout towards XTM device, I mean what pin from sonoff towards what port of pinout in XTM..? because i can access to web server of sonoff to see values of energy but everything there, counters, are in 0
The error isr not in iram
has to do with the Espressif library.
https://community.platformio.org/t/how-to-fix-isr-not-in-iram/8031
Try to change the library to another version and test it. If you remove that line the code won't count the pulses from the XTM.
good point!!! but for me has been the beginning of a special relationship with windows 10 and their blue screenshots each time that i tried flash the code in my esp. at the end has been imposible flash the code using windows 10 with release 2.5.0 of esp8266. The only way to fix this issue has been installing arduino ide in mac os and flash the code with release 2.5.0 No errors of isr not in iram, and seems tha the code works fine now I just have to clarify which pinout to use in my sonoff towards XTM..:
in sonoff i have:
thank you so much @jorgeassuncao for your support!!!
You have to choose gnd and another available pin (which is the one you have to put on #define DIGITAL_INPUT_SENSOR
)
cool! i have defined this value with id pin 01, which is assigned to TX.
now i'm able to see the current power and curren consumption, but it's not stable i mean, it doesn't show always values as current consumption or curren power only some times, most of the times it show values with value 0.
:-/
any idea..?
That is "normal". Try changing SEND_FREQUENCY
to 30000 (30 seconds) or 60000 (1 minute) and see if it gets better.
hi ! i have sonoff modue with chip esp8285. i was wondering if is there any way to test this project with this module, I have try to upload to my module sonoff this code , changing pinout, but seems that is not working, wifi doesnt work.. and there is no way to double check connectivity due i cannot reach the device.
i would like if you could give me support
BR