Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 25 21:03
    ardupic commented #1311
  • Nov 25 14:17
    mcspr commented #1311
  • Nov 25 14:16
    mcspr commented #1311
  • Nov 24 17:53
    gmag11 commented #682
  • Nov 24 17:53
    gmag11 commented #682
  • Nov 24 14:05
    ardupic commented #1311
  • Nov 24 12:03
    ardupic commented #1311
  • Nov 24 11:58
    mcspr commented #1311
  • Nov 24 10:21
    ardupic commented #1311
  • Nov 24 10:20
    ardupic commented #1311
  • Nov 23 19:36
    mcspr commented #2399
  • Nov 22 23:10
    mcspr commented #1311
  • Nov 22 22:44
    ardupic commented #1311
  • Nov 22 06:28
    nbaglietto labeled #2399
  • Nov 22 06:28
    nbaglietto opened #2399
  • Nov 21 10:34
    mcspr commented #1311
  • Nov 21 06:58
    ardupic commented #1311
  • Nov 16 20:39
    mcspr closed #2281
  • Nov 16 20:39
    mcspr commented #2281
  • Nov 16 16:03
    luebbe commented on 12ae9d1
Max Prokhorov
@mcspr
@RDobrinov decoded stacktrace points at begin() right there? effectively, only thing it does is add a 0.0.0.0 listener, which does not require wifi being up
Росен Добринов
@RDobrinov
@mcspr I don't know. I didn't use a decoder. Just invoke _server.begin() after MESSAGE_CONNECTED received from JustWiFi and webserver goes live. How to add 0.0.0.0 as listener?
Max Prokhorov
@mcspr
@RDobrinov _server.begin() already uses 0.0.0.0, there's no option to set ip in espasyncwebserver
adbensi
@adbensi
@mcspr Hi! I try it many times before report.
If I can not connect to network, then it reset..
Only if not connect..
My Exception Decoder is
Exception 3: LoadStoreError: Processor internal physical address or data error during load or store
PC: 0x40100c58: umm_malloc_core(size_t) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\umm_malloc\umm_malloc.cpp line 397
EXCVADDR: 0x400715a1

Decoding stack results
0x40100e48: malloc(size_t) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\umm_malloc\umm_malloc.cpp line 511
0x40100530: ets_post(uint8, ETSSignal, ETSParam) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_main.cpp line 160
0x401010a0: calloc(size_t, size_t) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\umm_malloc\umm_malloc.cpp line 820
0x40100758: pvPortZalloc(size_t, char const*, int) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\heap.cpp line 301
0x40100581: __wrap_spi_flash_read(uint32_t, uint32_t*, size_t) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_phy.cpp line 309
0x40100581: __wrap_spi_flash_read(uint32_t, uint32_t*, size_t) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_phy.cpp line 309
0x4021e8f4: ESP8266WiFiSTAClass::disconnect(bool) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\libraries\ESP8266WiFi\src\ESP8266WiFiSTA.cpp line 367
0x4021e8d0: ESP8266WiFiSTAClass::disconnect(bool) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\libraries\ESP8266WiFi\src\ESP8266WiFiSTA.cpp line 360
0x40100628: millis() at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_wiring.cpp line 188
0x40100b88: umm_free_core(void*) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\umm_malloc\umm_malloc.cpp line 316
0x40100e13: free(void*) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\umm_malloc\umm_malloc.cpp line 362
0x40220afd: JustWifi::_doScan() at C:\Users\Alexandre\Documents\Arduino\build\libraries\justwifi-master\src\JustWifi.cpp line 360
0x40220f39: JustWifi::_machine() at C:\Users\Alexandre\Documents\Arduino\build\libraries\justwifi-master\src\JustWifi.cpp line 465
0x4022101c: JustWifi::loop() at C:\Users\Alexandre\Documents\Arduino\build\libraries\justwifi-master\src\JustWifi.cpp line 905
0x402079b2: wifiLoop() at C:\Users\Alexandre\Documents\Arduino\build\teste_espurna\espurna\code\espurna/wifi.ino line 719
0x4020367b: loop() at C:\Users\Alexandre\Documents\Arduino\build\teste_espurna\espurna\code\espurna/espurna.ino line 310
0x402359fc: loop_wrapper() at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_main.cpp line 180
What You think?
ziggurat29
@ziggurat29

Hi folks; OK, noob question, but I am trying to make a new 'board' in the platform.io config, and it is not clear to me how. (Please do refer me to any existing docco, though I did not find such).
I gather this from reading source:

  • there's a 'platformio.ini' that looks like one place where boards are defined in some way
  • there's a 'board.ino', a 'migrate.ino', a 'arduinio.h', and a 'hardware.h' that looks like they need modifications to coordinate with stuff in 'platformio.ini' that might be added

Background: I am exploring support for a Gosund plug, which doesn't appear to be explicitly supported ATPIT. Those haven't arrived, but I have a handful of ESP01 modules (old, 512kB) that I wanted to kick the tires of the build system in advance.
I have never used PlatformIO, or Arduino, but I do have a few decades of C/C++ and embedded experience.
TIA; Cheers!

adbensi
@adbensi
@ziggurat29 see hardware.h on the config folder
ziggurat29
@ziggurat29
@adbensi I did look at that, but I'm sure I will need to munge the other files as well? platformio.ini seems the most arcane -- the C stuff I can grok. Well, except one thing that may be arduinoesque:
  • the '#define RELAY1_PIN' number. My board has one GPIO called '2' (in ESP8266 parlance). So, would it also be '2' in this codebase, or is there some different numbering?
adbensi
@adbensi
Yes... gpio is the port of the esp8266
You can put here:
```CPP
#if defined(MANUFACTURER) and defined(DEVICE)

    // user has defined custom hardware, no need to check anything else
ziggurat29
@ziggurat29
Ok, thanks, I'll give it a go. I'm still mystified by the platformio.ini, which seems to 'drive' it. I do notice a definition for the 512 kb boards, but I don't see any examples that actually use it, alas. (these are 5 year old boards, good times)
Max Prokhorov
@mcspr
@adbensi If the crash happens right after debug log prints something about scanning or attempting to connect to wifi... can't really offer much advice about that :/ erasing flash usually helps with that (specifically last 16KiB), or erase.config terminal if module survives enough time to read commands
Max Prokhorov
@mcspr
...but you should probably do a full save of flash contents before clearing it, if that is reproducible 100%. maybe some debugging can be done with that
Росен Добринов
@RDobrinov

@mcspr Do you mean _server->begin() create listener at 0.0.0.0? Hm!
Backtrace decoded

0x4008c434: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:707
0x4008c665: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:707
0x40088869: xQueueGenericReceive at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:1996
0x4013648a: sys_mutex_lock at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c:203
0x40136766: sys_arch_protect at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c:469
0x40126204: do_memp_malloc_pool at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/memp.c:459
0x4012626d: memp_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/memp.c:459
0x40127838: tcp_alloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/tcp.c:1765
0x40127924: tcp_new_ip_type at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/tcp.c:1782
0x400d5c5e: AsyncServer::begin() at /mnt/500GB/esp32DotFW/.pio/libdeps/esp32doit-devkit-v1/AsyncTCP/src/AsyncTCP.cpp:1039
0x400dbe5a: AsyncWebServer::begin() at /mnt/500GB/esp32DotFW/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/WebServer.cpp:54
0x400d219e: webSetup() at /mnt/500GB/esp32DotFW/.pio/libdeps/esp32doit-devkit-v1/ArduinoJson_ID64@5.13.4/src/ArduinoJson/StaticJsonBuffer.hpp:60
0x400d2f7c: setup() at /mnt/500GB/esp32DotFW/.pio/libdeps/esp32doit-devkit-v1/ArduinoJson_ID64@5.13.4/src/ArduinoJson/StaticJsonBuffer.hpp:60
0x400df44f: loopTask(void*) at /home/vbox/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:14
0x40088b7d: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Part of code mostly from espura

void webSetup() 
{   
    // Cache the Last-Modifier header value
    snprintf_P(_last_modified, sizeof(_last_modified), PSTR("%s %s GMT"), __DATE__, __TIME__);    
    // Create server
    //unsigned int port = webPort();
    unsigned int port = 80;

    _server = new AsyncWebServer(port);
    _server->rewrite("/", "/index.html");
    _server->serveStatic("/", SPIFFS, "/")
        .setLastModified(_last_modified)
        .setFilter([](AsyncWebServerRequest *request) -> bool {
            webLog(request);
            return true;
        });
    _server->onNotFound(_onRequest);
    _server->on("/auth", HTTP_GET, _onAuth);
    _server->begin();
    DEBUG_MSG_P(PSTR("[WEBSERVER] Webserver running on port %u\n"), port);
}
Any ideas, why tcp_new_ip_type invoke an abort()?
ziggurat29
@ziggurat29
folks; does anyone know if, or if not, the Realtek RTL8710 is supported? The espurna /seems/ to be Espressif oriented, but I wasn't sure.
I ask because I just got some Teckin SP10 units and cracked one open, and Longtour Photology evidently made a design change because the module now sports an RTL8710 rather than an ESP8266. The RTL8710 uses an ARM core, so definitely different tooling.
Max Prokhorov
@mcspr
@RDobrinov ah. you should've mentioned that it was esp32 :) setup sequence is weird there, you can sort-of workaround that issue by having something call WiFi.peristent(false); WiFi.enableSTA(true); before webserver, because network task isn't running yet (at least from what i remember). WiFi connection can happen later down the line
Max Prokhorov
@mcspr
@ziggurat29 nope. fw is definitely espressif oriented, we depend on more than a couple platform specific features
Росен Добринов
@RDobrinov
@mcspr Sounds bad. No other chances, so I start to rewrite whole WiFi. Tnx.
Joop Hilverink
@HilverinkJ
I used platformio and flashed sonoff rf bridge 433 succesfully. On my atempt to make wifi connection, i probably made a type mismatch with the default wifi password. Now this device is not visible anymore in my list of wifi devices.
How can i solve this?
Росен Добринов
@RDobrinov
@HilverinkJ Flash it again if you put wrong password as default ( 7 chars for example )
Joop Hilverink
@HilverinkJ
Yes I did. unfortunately I don't know exactly what I entered ...
Росен Добринов
@RDobrinov
@HilverinkJ You flashed, change 'fibonacci' default password on first login, or change default password in source #define ADMIN_PASS in general.h? If first one, just reset to default setting ( push and hold button on RF-Bridge for 10 sec. ), if second just check what you type as password in ADMIN_PASS. Make sure the password entered in source are at least 8 characters. Then erase flash and flash fw again.
Joop Hilverink
@HilverinkJ
Tanks, Solved.
Joop Hilverink
@HilverinkJ
Can anyone tell me if it is possible to realize the following with ESPurna:
Detecting temperature and switching a relay at an adjustable temperature.
Sending temperature and on / off switch information to domoticz.
Use of the following hardware:
Temperature sensor DS18B20.
Hardware Tinkerman ESPurna.
Max Prokhorov
@mcspr
@HilverinkJ see https://github.com/xoseperez/espurna/wiki/RPN-Rules#rule-execution, hope that's what you mean
domoticz should be able to receive data from sensors by default, just need to adjust idx settings. there is a known issue with incoming data though, xoseperez/espurna#2166
Росен Добринов
@RDobrinov
@mcspr Can you help, or give me idea? I try to rewrite parts of espurna for esp32. Now I stuck at this - https://github.com/xoseperez/espurna/blob/b289c77021c4d3fcd70feb25ca14178929f31e6c/code/espurna/ws_internal.h#L108 throws an exception after json for Status page in web. Backtrace is
```
stack:
0x400d3b27: std::function<void (ArduinoJson::JsonObject&)>::operator()(ArduinoJson::JsonObject&) const at /mnt/500GB/esp32DotFW/src/ws.ino:624
0x400d67c7: ws_data_t::sendCurrent(ArduinoJson::JsonObject&) at /mnt/500GB/esp32DotFW/include/ws_internal.h:111
  \-> inlined by: ws_data_t::send(ArduinoJson::JsonObject&) at /mnt/500GB/esp32DotFW/include/ws_internal.h:119
0x400d6893: _wsHandleClientData(bool) at /mnt/500GB/esp32DotFW/src/ws.ino:554
0x400d6929: _wsLoop() at /mnt/500GB/esp32DotFW/src/ws.ino:573
0x400d1a65: loop() at /mnt/500GB/esp32DotFW/src/ws.ino:624
0x400e3c91: loopTask(void*) at /home/vbox/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:19
0x40088b7d: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Ignore the line numbers - there are lots of debug code.
Max Prokhorov
@mcspr
std::function operator() does not check for nullptr, some callback was not set / set as nullptr perhaps?
adbensi
@adbensi

Guys, please, it is possible to use RF 433 on the custom hardware? I have one receiver 433 connected on the SerialRX pin, but, I get only this over debug:

[079121] [WEBSOCKET] Requested action: rfblearn
[079121] [RF] Entering LEARN mode
[087227] [RF] Learn timeout triggered
[087227] [RF] Action 0xA2
[087227] [RF] Learn timeout

My custom hardware is:

    #define RFB_DIRECT                1
    #define RF_SUPPORT                  1

    #define RFB_RX_PIN                  3
    #define RFB_TX_PIN                  GPIO_NONE

    #define SERIAL_BAUDRATE             19200
    #define DEBUG_SERIAL_SUPPORT        0

    // Buttons
    #define BUTTON1_PIN                 0
    #define BUTTON1_MODE                BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
    #define BUTTON1_PRESS               BUTTON_MODE_NONE
    #define BUTTON1_CLICK               BUTTON_MODE_TOGGLE    
    #define BUTTON1_DBLCLICK            BUTTON_MODE_AP
    #define BUTTON1_LNGCLICK            BUTTON_MODE_RESET
    #define BUTTON1_LNGLNGCLICK         BUTTON_MODE_FACTORY    
    #define BUTTON1_RELAY               2

    // Relays
    #define DEBUG_SERIAL_SUPPORT        0
    #define RELAY_PROVIDER              RELAY_PROVIDER_STM
    #define DUMMY_RELAY_COUNT           10

    #define RELAY1_PIN                  GPIO_NONE
    #define RELAY1_TYPE                 RELAY_TYPE_NORMAL
    #define RELAY2_PIN                  GPIO_NONE
    #define RELAY2_TYPE                 RELAY_TYPE_NORMAL
    #define RELAY3_PIN                  GPIO_NONE
    #define RELAY3_TYPE                 RELAY_TYPE_NORMAL
    #define RELAY4_PIN                  GPIO_NONE
    #define RELAY4_TYPE                 RELAY_TYPE_NORMAL
    #define RELAY5_PIN                  GPIO_NONE
    #define RELAY5_TYPE                 RELAY_TYPE_NORMAL

    #define RELAY6_PIN                  GPIO_NONE
    #define RELAY6_TYPE                 RELAY_TYPE_NORMAL
    #define RELAY7_PIN                  GPIO_NONE
    #define RELAY7_TYPE                 RELAY_TYPE_NORMAL
    #define RELAY8_PIN                  GPIO_NONE
    #define RELAY8_TYPE                 RELAY_TYPE_NORMAL
    #define RELAY9_PIN                  GPIO_NONE
    #define RELAY9_TYPE                 RELAY_TYPE_NORMAL
    #define RELAY10_PIN                  GPIO_NONE
    #define RELAY10_TYPE                 RELAY_TYPE_NORMAL

Please, any ideas?

adbensi
@adbensi
I want to change relay state/switch by RF433 too. I have one expansor over SerialTX working.. because this I put RFB_TX_PIN GPIO_NONE.
adbensi
@adbensi
ESPurna can not drive 433 module receiver direct? It works by serial to another MCU connected to 433 module only?
Max Prokhorov
@mcspr
@adbensi you disable debug over serial but RELAY_PROVIDER_STM still uses serial pin. also note of serialmode -> https://github.com/esp8266/Arduino/blob/db75d2c448bfccc6dc308bdeb9fbd3efca7927ff/cores/esp8266/HardwareSerial.h#L62-L66, begin() method needs to be different than what we do.
see Serial.begin(...) spots, system.ino & debug.ino
ziggurat29
@ziggurat29

folks; question regarding flashing procedure:

  • I have already successfully built and flashed to a generic ESP01 board, so I think I understand the build and flashing process in general
  • my actual goal is to use a Gosund WP3, which is a garden variety smart socket
  • I broke one of them down and verified it is based on a ESP8285 module from CDTech
  • I can see GPOI 0, rst, rx, tx exposed on the module, and I mapped out the led, button and relay gpios, so I am pretty confident that I can create a definition and build a working firmware for it

so my question is: is it required to crack open these modules individually and solder wires to flash the built firmware, or is there some way to 'hijack' the stock firmware's update procedure to avoid having to crack them open? Did I miss something?

adbensi
@adbensi
@mcspr Yes.. I can see, and it Works.. Thanks a Lot Max!
Max Prokhorov
@mcspr
@ziggurat29 https://github.com/ct-Open-Source/tuya-convert is one well known conversion method, in case the manufacturer used tuya sdk. wiki does list wp3 as compatible btw
Росен Добринов
@RDobrinov
Hey @mcspr ! Is there a way to check for registered callback for onData before this ( https://github.com/xoseperez/espurna/blob/032f921fc4c4758c80c5c3068b190b608acb8624/code/espurna/ws.ino#L463 ) has invoked? If there no registered callback wsPostSequence throws an exception. Same time https://github.com/xoseperez/espurna/blob/032f921fc4c4758c80c5c3068b190b608acb8624/code/espurna/ws.ino#L461 do not throw on empty callback for on_visible.
Max Prokhorov
@mcspr
@RDobrinov ws_data_t::sendCurrent can check for counter.done()
btw now that I look at that class, I think I forgot that iterators exist. there is actually no reason to have ws_counter class, something like this could be used instead: https://gist.github.com/mcspr/b402d22c3fb0dcc7520489f7266c902c
KianYeo
@KianYeo
Hi. I am new to Espurna. I have a smartplug that is not one of the support hardware in the espurna list. The model is JH-G01B1 and I found online that it require the following pins:
REL1 = GPIO14
Button1 = GPIO12
LED_INV - GPIO13
I have used tuya convert and loaded in the default espurna firmware. Now I can connect the smartplug to my home wifi and i can enter its configuration page. But I don't how which firmware I need to load or how to modify the firmware for my application. I just need to control the smart plug on and off using MQTT.
Anyone can help or guide me to some useful and easy to follow resource?
Росен Добринов
@RDobrinov
@KianYeo There are no predefined hardware like this ( BUTTON1 = 12, RELAY1 = 14 ). You must define custom hardware and compile firmware yourself.
@mcspr Yay. "Something like instead" working like a charm :-) and no more exceptions on empty lists. Here is modified ws_internal.h without sw_counter class https://gist.github.com/RDobrinov/9e739fd77990d0a77fc1b867176bf48c
KianYeo
@KianYeo
Thanks @RDobrinov