Forum Replies Created

Viewing 25 posts - 1 through 25 (of 32 total)
  • Author
    Posts
  • in reply to: ESP32 port of 2.1.9 firmware #79072

    v1pr
    Participant

    Hi @romantao,

    thanks for the details, but I don’t think you’re right. In the ESP32 var definitions in OpenSprinkler.cpp PIN_SENSOR2 gets a value, so the define should be “active”

    `
    PIN_RFRX = E0_PIN_RFRX;
    PIN_RFTX = E0_PIN_RFTX;
    PIN_BOOST = E0_PIN_BOOST;
    PIN_BOOST_EN = E0_PIN_BOOST_EN;
    PIN_SENSOR1 = E0_PIN_SENSOR1;
    PIN_SENSOR2 = E0_PIN_SENSOR2;
    `

    in reply to: ESP32 port of 2.1.9 firmware #78784

    v1pr
    Participant

    Thanks for the feedback @polskifacet. I did not had the time till now to work on the firmware. I was able to upgrade the firmware to the latest OS 2.2.0 (3), it’s in my git, if interested.

    I’ll try to debug the sensor2 issue in the coming days.


    @Ken
    .238 how is your expander board?

    in reply to: ESP32 port of 2.1.9 firmware #76250

    v1pr
    Participant

    @Ken.238: please check the PIN config for SENSOR2, there is/was a typo in esp32.h, the assignment from the original firmware:

    #define E0_PIN_SENSOR1 36 // sensor 1
    #define E0_PIN_SENSOR2 2 // sensor 2


    @polskifacet
    : I’m glad it’s working. I’m currently busy with some renovations, will work on the esp8266 when finished. Please be patient 🙂

    in reply to: ESP32 port of 2.1.9 firmware #76127

    v1pr
    Participant

    Ken, any chance, that it’s a sensor fault? Have you tried swapping the sensors? The connected pin number should be an easy thing to test. Either follow the trace on the board to the esp32 or use a multimeter in diode check mode – unplug the board first! – (preferably with sound). From the top of my head I’m not sure, if the sensors are GND or 5V based, but I guess the first; so one pin of the sensor is connected to GND, the other is to the esp somewhere.
    Once you know where it’s connected on the esp32, you can check any esp32 pinout diagram on the net and adjust the esp32.h accordingly.

    What’s the type of the second sensor?

    in reply to: ESP32 port of 2.1.9 firmware #76125

    v1pr
    Participant

    From this I cannot tell. Please copy the whole compile output.

    in reply to: ESP32 port of 2.1.9 firmware #76119

    v1pr
    Participant

    I totally understand your point 🙂 I’ll change the code once I’ve finished with the current stuff.

    in reply to: ESP32 port of 2.1.9 firmware #76117

    v1pr
    Participant

    @polskifacet thanks for the feedback, I’m glad to here. IMHO it’s easier to hook up a $2-$3 I2C RTC to the I2C bus – to the same pins as the LCD. Same stands for the IO Expander.
    About the ESP8266: yes, it’s possible, but needs some – pretty minor – modification to the code, in OpenSprinkler.cpp, so that the HW revision is not based on an IO Expander on the I2C bus. Unfortunatelly I cannot do it now, since I’ve “messed” up the codebase a bit for another thing, but I can do it later to support that. As a B) option, you can buy a cheap IO expander with PCF8574.

    in reply to: ESP32 port of 2.1.9 firmware #76115

    v1pr
    Participant

    Don’t be so lazy pls… the whole topic is just 5 pages, and you only have to read back 1 or 2…

    in reply to: ESP32 port of 2.1.9 firmware #76105

    v1pr
    Participant

    Great 🙂 All looks good than? Or is there something else, what is not working for you?

    in reply to: ESP32 port of 2.1.9 firmware #76098

    v1pr
    Participant

    What was the error, when you wanted to compile? Are these line exists in esp32.h:

    #define SDA_PIN 5
    #define SCL_PIN 4

    ?

    Wire.begin should look like this: Wire.begin(SDA_PIN, SCL_PIN);

    Sorry, forgot one thing. Please modify I2CRTC.cpp also! Line 46. You also have to remove the comment block signs ‘/*’ and ‘*/’ from the begining (line 32 and 37), so esp32.h gets included.

    (search for SDA in the whole Opensprinkler.cpp)

    in reply to: ESP32 port of 2.1.9 firmware #76093

    v1pr
    Participant

    @polskifacet I’ve check Ja.Charer’s esp32.h and I see the issue. For some reason he changed the I2C pins from the default 21/22 PINS to PIN 4/5. To get the screen working do the following:

    – pull esp32.h (just I file) from my repo, I’ve changed it to reflect Ja.Charer’s original config

    After that search for ‘SDA’ in OpenSprinkler.cpp, and change SDA and SCL near it to SDA_PIN, SCL_PIN – this should be done in 3 places, around line 96, 98 and 789 (I’ve done some other changes, so I cannot push it to git now).


    @ken
    .238 check the wiring/routing and change the pin in esp32.h accordingly. (E0_PIN_SENSOR1 and E0_PIN_SENSOR2)

    I’m using a totally different board, so – till today – esp32.h reflected my setup. FYI: you should always check esp32.h if it matches your HW setup.

    in reply to: ESP32 port of 2.1.9 firmware #76072

    v1pr
    Participant

    That’s interesting… Nothing happens, if you press a button? Or after a factory reset it’s still black? No logo, nothing?
    When, you flash back with the old 2.1.9 fw, than you’re using Arduino Ide, right? What is the oled’s library version there? (search for ssd1306 in library manager, should be the ThingPulse one)

    in reply to: ESP32 port of 2.1.9 firmware #76067

    v1pr
    Participant

    @polskifacet the error is ok, it’s due to the internal working of LittleFS. About the screen: are you sure, it’s a 0.96″? You can try switching to SH1106. The lib is the same as in the original FW and Ja.Carer’s fw… other thing you can try, is to change the OLED lib’s version in platformio.ini (4.4.0 is the latest ). Cabeling is ok? PIN21 = SDA PIN22 = SCK is the I2C

    in reply to: ESP32 port of 2.1.9 firmware #76063

    v1pr
    Participant

    Sure, it’s in esp32.h:

    #define E0_PIN_SENSOR1 39 // sensor 1
    #define E0_PIN_SENSOR2 33 // sensor 2

    If debug is enabled, than you can also check in the output upon bootup.

    in reply to: ESP32 port of 2.1.9 firmware #76029

    v1pr
    Participant

    The LCD works for me, but I only hae 1.3″ one, which uses the SH1106 driver. One bug still exists, the LCD turns off after ~10s, when everything is initialized… still chasing that one.

    I’ve pushed a new version to git, managed to fix the factory_reset loop, please give it a try (don’t forget to change the LCD type to LCD_SSD1306 in esp32.h ! )

    in reply to: ESP32 port of 2.1.9 firmware #76024

    v1pr
    Participant

    @Ray: seems so. I was able to track it down to OTF ESP32 server.begin() – that’s where it’s crashes (after factory reset). If I initialize an AP beforehand, all is OK.

    in reply to: ESP32 port of 2.1.9 firmware #76009

    v1pr
    Participant

    Sorry for the late reply, did not see the update mails.


    @Ray
    , it seems to me, that after a factory reset the AP is not started, but OTF is in OpenSprinkler::start_network() and this leads to a crash, when OTF want’s to start the server (server.begin) – I’m guessing here – ‘cos the TCP stack is not available. If I start an AP/STA beforhand, than it does not crash.


    @polskifacet
    which LCD are you using?


    @usydow
    : I’ve (hard)disabled LAN support (for now). It’s possible to get it working, but I don’t have any LAN boards now. It does not matter if you use I2C portexpander or an 74HC595 shift-register. I’m using the later on my custom board, since that’s how my friend designed it. On an another install I’ve I2C expanders. Really does not matter. About the encoder: I’m not 100% happy with the 3 button solution, I prefer to use a rotary encoder, but did not had the time to finish the implementation – it’s much more difficult, than I first calculated due to the extensive button logic.

    Finally my test setup’s parts arrived, I’ll put the together quickly to speed up the debugging.

    in reply to: ESP32 port of 2.1.9 firmware #75968

    v1pr
    Participant

    @usydow: thanks for the finding, I’ve fixed it.


    @Ken
    .238 @polskifacet please download the latest/refresh. Everything should be fixed know, no workarounds needed (platformio should update espressif32 platfrom automatically for correct version)

    in reply to: ESP32 port of 2.1.9 firmware #75952

    v1pr
    Participant

    @usydow great, I was thinking the same (that’s why the start AP is there). There is a glitch in the whole flow somewhere 🙁 upon the first start (after factory reset), the controller should start an AP, which happens later than wifiserver begin… Logically this should not work on the original esp8266 either…


    @Ray
    ,the esp32 otf is missing the flush/close for sure

    in reply to: ESP32 port of 2.1.9 firmware #75937

    v1pr
    Participant

    @Ray: the error is in the OTF library somewhere 🙁 Do you’ve any idea what can be behind it?

    assert failed: tcpip_send_msg_wait_sem IDF/components/lwip/lwip/src/api/tcpip.c:455 (Invalid mbox)

    The error is within somewhere in localServer.begin();

    in reply to: ESP32 port of 2.1.9 firmware #75936

    v1pr
    Participant

    read the readme and the previous posts (the FW still not works, but you can get rid of the errors)

    in reply to: ESP32 port of 2.1.9 firmware #75911

    v1pr
    Participant

    I’ve added more debug prints and changed some other stuff. Please pull down the latest from git (be aware, that I’ve changed some things in esp32.h! GPIO IOEXP is set now, but only with 2 pins for testing, SSD1306 is the default LCD, but there are also some new lines, so take care 🙂 )

    in reply to: ESP32 port of 2.1.9 firmware #75897

    v1pr
    Participant

    Nope, it’s using GPIO IOs, but it cannot find any LCD/RTC on the I2C bus (and that’s not handled in the original code). You’ve to put at least one OLED display on the I2C bus (I’m not sure about the RTC, will check)

    in reply to: ESP32 port of 2.1.9 firmware #75885

    v1pr
    Participant

    Please enable debug in defines.h (line 27), to see what’s going on.

    in reply to: ESP32 port of 2.1.9 firmware #75850

    v1pr
    Participant

    NP 🙂 Please report back, if it’s working for you! (please state your config also) Thanks!

Viewing 25 posts - 1 through 25 (of 32 total)