OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266

Viewing 22 posts - 151 through 172 (of 172 total)
  • Author
    Posts
  • #64920

    Ray
    Keymaster

    What’s the I2C address configured by your PCF8574 module? Note that it has 3 bits that you can use to set the I2C address (if I understand correctly, these would be the 3 yellow-colored jumpers on your module). It’s not clear to me whether you are following OS 3.0, 3.1 or 3.2 schematic. Only 3.0 uses PCF8574 (whereas 3.1 and 3.2 use PCF9555 16-channel IO expander). So assuming you are following 3.0 schematic, which is available here:
    https://github.com/OpenSprinkler/OpenSprinkler-Hardware/tree/master/OS/3.0/AC_driver
    it assumes that on the AC driver board, the three bits are A0=1 (high), A1=A2=0 (low). You need to set the jumpers correctly to match this address.

    #66683

    gadaka
    Participant

    Hi, could someone help me with connecting PCF8574 to NodeMcu?
    I compiled nad successfully uploaded a sketch to NodeMcu and all is fine except communication with PCFmodule – I set A0=1,A1=A2=0 and I can not change a state of SSR High level trigger… Should I change sth in source code?

    #66806

    gadaka
    Participant

    Hi, I bought PCF8574AP, connected it to NodeMcu with OLED display. Display works great but a module set High on all outputs and does not change after setting on in Openspringler. Could You help me?

    #66818

    Ray
    Keymaster

    I am not sure exactly which schematic you are following. As I said in my first reply: only version 3.0 board design uses PCF8574 — in fact, it uses one on the top level board, and one on the driver board. Revisions 3.1 and 3.2 do NOT use PCF8574, instead, they use a single PCA9555 IO expander chip. The reason is that PCA9555 is a 16-channel IO expander chip, while PCF8574 is 8-channel. So the original 3.0 design had to use 2x PCF8574, and later with PCA9555 it only needs one single IO expander chip. Also, PCA9555 uses totem output so can source much higher current into the traics on the driver board. PCA8574, on the other hand, uses weak pullup so cannot source high current (and for that reason OS 3.0 driver design had to use additional PNP transistors to provide high current).

    #66823

    gadaka
    Participant

    Thank You for the response.

    I’m following 3.0 version schemtaic
    I found in my country PCA9555 so I’ll try use it 🙂

    #66826

    Ray
    Keymaster

    If you follow OS 3.0 schematic, please note that there are two PCF8574 IO expanders, one on the top level (master controller), one on the bottom (AC-driver). The top level is set to I2C address 000, and bottom is 001. The bottom level controls solenoid drivers.

    #66938

    gadaka
    Participant

    Hi, I bought PCA9555 ad everything works great but I have one question – is it possible to control 12 sections using one PCA9555?

    #66952

    Ray
    Keymaster

    By “12 sections” did you mean 12 zones? The main controller can only control 8 zones. If you want to go beyond 8 zones, that’s what the expanders are for: each expander uses one additional PCA9555 to add 16 zones.

    The reason the main controller only does 8 zones is that among the 16 IO pins of PCA9555, 8 are used for zone control, the other 8 are reserved for other purposes: including button 3, boost converter control on DC-powered OpenSprinkler etc.

    #66958

    gadaka
    Participant

    Yes, I mean 12 zones…
    Ok, I undestand 🙂

    #67397

    DarioBocc
    Participant

    Hello, actually I am unable to compile with errors like “‘uint8_t’ has not been declared” in SPIFFSdFat , I suppose due to a bad configuration. To configure and compile which files I have to edit? I heve to add defines in Config.h and change PROTO in Pins.h ? Are there exemples?
    Thanks

    #71412

    zenonmb
    Participant

    Colleagues,

    Was happily using opensprinkler in pi zero, but suddenly stopped working. Pi is dead and the issue is that I can not get a spare, so trying to move to ESP8266 HW . I do have 12F version. Downloaded the compiled file for ver 3.0 from here http://raysfiles.com/os_compiled_firmware/v3.0/ os_219_rev9.bin . Used the Express ESP flash tool, and followed this procedure https://www.allaboutcircuits.com/projects/flashing-the-ESP-01-firmware-to-SDK-v2.0.0-is-easier-now/
    My question here is the starting memory. In that page it states 0xFB000. Is this correct?
    The issue I am having is continues reboot, (btw, did not see any error on flashing the esp8266) and the blue led is flashing rapidly

    2nd boot version : 1.4(b1)
    SPI Speed : 40MHz
    SPI Mode : DIO
    SPI Flash Size & Map: 8Mbit(512KB+512KB)
    jump to run user1 @ 1000

    â–’n’t use rtc mem data
    rl$rlv
    Ai-Thinker Technology Co.,Ltd.

    ets Jan 8 2013,rst cause:2, boot mode:(3,6)

    load 0x40100000, len 1396, room 16
    tail 4
    chksum 0x89
    load 0x3ffe8000, len 776, room 4
    tail 4
    chksum 0xe8
    load 0x3ffe8308, len 540, room 4
    tail 8
    chksum 0xc0
    csum 0xc0

    2nd boot version : 1.4(b1)
    SPI Speed : 40MHz
    SPI Mode : DIO
    SPI Flash Size & Map: 8Mbit(512KB+512KB)
    jump to run user1 @ 1000

    â–’n’t use rtc mem data
    rl$rlv
    Ai-Thinker Technology Co.,Ltd.

    ets Jan 8 2013,rst cause:2, boot mode:(3,6)

    load 0x40100000, len 1396, room 16
    tail 4
    chksum 0x89
    load 0x3ffe8000, len 776, room 4
    tail 4
    chksum 0xe8
    load 0x3ffe8308, len 540, room 4
    tail 8

    Finally, at this point I do not have any HW attached to the ESP8266-12F . I would need the RTC + PCF8574. Is it possible this behavior because I do not have connected that HW?
    Any idea what night be wrong?
    Cheers,

    martin

    #71421

    zenonmb
    Participant

    Colleagues,

    Still fighting….after another flashing attemps, I think I am moving(slowly…) . Now the ESP does not reboot and pop up as AP (SSID = OS_16ACD2) with 192.168.4.1, so I was able to connect and got the attached screen from opensprinkler(wifi config). To input SSID and pass , which I did and after that It register to my wifi, but can not get any response from the browser.
    Any idea?

    Attachments:
    #71423

    Ray
    Keymaster

    From the screenshot, it looks like the firmware is successfully uploaded. Depending on your WiFi network and the browser, after clicking on Connecting, it might not respond and may look as if it’s stuck. But what’s important is to watch the LCD screen: if it can connect to your WiFi router, then it will reboot itself (you may need to unplug and re-plug in power because ESP8266 has a well-known bug that triggers a stall if you reboot right after flashing the firmware. Power cycle it will fix the problem).

    #71424

    zenonmb
    Participant

    Thanks Ray .
    I have already power cycle the ESP and I see no response for the browser.
    At this time, I do not have display, nor expansion board (PC8574). Just the ESP8266 12F . Will connect the RTC module + PCF8574 and see what happens.
    cheers,
    martin

    #71428

    Ray
    Keymaster

    Well, having an OLED display connected would be tremendously helpful to see what’s going on. You can also turn on serial debugging and that way you can watch the output from serial. This would require you to compile the firmware. To turn on serial output, just uncomment this line:
    https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/defines.h#L27
    and compile the firmware.

    The latest firmware no longer requires an RTC — if an RTC doesn’t exist, it will fall back on NTP syncing. I don’t think it requires PCF8574 either: without PCF8574 it will by default assume this is an AC-powered opensprinkler.

    #71429

    zenonmb
    Participant

    Understand, but compiling the code seems challenging for me. Yes, you provided the instructions, but those are for linux and my Arduino IDE is on Windows and not sure if the procedure would be the same.
    Thank you

    #71430

    Ray
    Keymaster

    You may not overthinking the difficulty of compiling the firmware. If you use Arduino IDE, you can simply install the required libraries in the IDE. Or, you can install virtualbox in Windows, and install linux in virtualbox.

    #71434

    zenonmb
    Participant

    Tried and as you suggested it was not difficult at all. Copied all files into the mainArduino directory , also added the 4 libraries and hit compile/upload(all within Arduino IDE).
    No error, perfect clean. Same result as before, showed the WIFI as OS-ACD16, open browser, set my network credentials and after a minute did a reboot.
    As before, it did not respond to the browser, so went to the defines.h files and uncommented the debug line.
    Now when tried to compile, got errors stating that some libraries were not used . For example had with mqtt and also Ethernet(old libraries already in my arduino), so remove those and still getting the error below

    Arduino: 1.8.12 (Windows 10), Board: “Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200”

    sketch\main.cpp: In function ‘void do_loop()’:
    sketch\main.cpp:445:71: error: ‘static uint8_t Enc28J60Network::readReg(uint8_t)’ is private within this context
    445 | uint16_t estat = Enc28J60Network::readReg((uint8_t) ENC28J60_ESTAT);
    | ^
    In file included from C:\Program Files (x86)\Arduino\libraries\EthernetENC-master\src/Ethernet.h:31,
    from sketch\OpenSprinkler.h:38,
    from sketch\main.cpp:26:
    C:\Program Files (x86)\Arduino\libraries\EthernetENC-master\src/utility/Enc28J60Network.h:65:18: note: declared private here
    65 | static uint8_t readReg(uint8_t address);
    | ^~~~~~~
    sketch\main.cpp:446:67: error: ‘static uint8_t Enc28J60Network::readReg(uint8_t)’ is private within this context
    446 | uint16_t eir = Enc28J60Network::readReg((uint8_t) ENC28J60_EIR);
    | ^
    In file included from C:\Program Files (x86)\Arduino\libraries\EthernetENC-master\src/Ethernet.h:31,
    from sketch\OpenSprinkler.h:38,
    from sketch\main.cpp:26:
    C:\Program Files (x86)\Arduino\libraries\EthernetENC-master\src/utility/Enc28J60Network.h:65:18: note: declared private here
    65 | static uint8_t readReg(uint8_t address);
    | ^~~~~~~
    sketch\main.cpp:447:71: error: ‘static uint8_t Enc28J60Network::readReg(uint8_t)’ is private within this context
    447 | uint16_t econ1 = Enc28J60Network::readReg((uint8_t) ENC28J60_ECON1);
    | ^
    In file included from C:\Program Files (x86)\Arduino\libraries\EthernetENC-master\src/Ethernet.h:31,
    from sketch\OpenSprinkler.h:38,
    from sketch\main.cpp:26:
    C:\Program Files (x86)\Arduino\libraries\EthernetENC-master\src/utility/Enc28J60Network.h:65:18: note: declared private here
    65 | static uint8_t readReg(uint8_t address);
    | ^~~~~~~
    exit status 1
    Error compiling for board Generic ESP8266 Module.

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

    Any suggestion?

    #71436

    zenonmb
    Participant

    Ray,

    Commented out the lines and was able to compile it. This is what I get

    09:02:16.368 -> 2106-02-07 02:28:20 – MQTT Init
    09:02:16.368 -> 2106-02-07 02:28:20 – MQTT Init: ClientId OS-34AB9516ACD2
    09:02:20.455 -> req_mqtt_restart
    09:02:20.455 -> 2106-02-07 02:28:24 – MQTT Begin
    09:02:20.455 -> 2106-02-07 02:28:24 – MQTT Begin: Config (:1883 ) Disabled
    09:02:20.489 -> NTP Syncing…
    09:02:20.489 -> ntp: time.google.com connected
    09:02:20.695 -> 1634299340
    09:02:20.730 -> host: weather.opensprinkler.com:80

    #71439

    Ray
    Keymaster

    All these messages look fine: it got NTP synced correctly, and seems to be able to connect to the weather server as well. If you know it’s IP address, you should be able to type that into a browser, or use the OpenSprinkler app, to access the controller.

    #71440

    zenonmb
    Participant

    Ray,

    You were right. Now I do have the web and app running. Will get the HW, RTC and PCF8574 and put it to work. (not sure what happened before…)
    Thank you very much for your support and regarding your system, there is no much to add . There are many messages in the forum stating the awsome product that you developed and opened to the community. Thank you
    cheers,

    martin

    #71442

    zenonmb
    Participant

    Ray,

    I am back…..sooner than expected.
    I see a lot of timeouts and disconnects

    13:23:56.730 -> host: weather.opensprinkler.com:80
    13:50:40.485 -> WiFi disconnected, going back to initial
    13:53:15.366 -> WiFi disconnected, going back to initial
    13:59:55.131 -> WiFi disconnected, going back to initial
    14:26:14.206 -> WiFi disconnected, going back to initial
    14:30:20.140 -> WiFi disconnected, going back to initial
    14:32:20.141 -> timeout
    14:38:29.028 -> WiFi disconnected, going back to initial
    14:46:48.476 -> WiFi disconnected, going back to initial
    14:48:48.491 -> timeout
    14:50:48.510 -> timeout
    14:52:48.538 -> timeout
    14:54:48.538 -> timeout
    14:56:48.526 -> timeout
    14:58:48.527 -> timeout
    15:00:48.536 -> timeout
    15:02:48.556 -> timeout
    15:04:48.584 -> timeout
    15:06:48.574 -> timeout
    15:08:48.591 -> timeout
    15:14:56.222 -> WiFi disconnected, going back to initial
    15:16:56.213 -> timeout
    15:24:28.770 -> WiFi disconnected, going back to initial
    15:26:28.802 -> timeout
    15:28:28.782 -> timeout

    Is there anything that I can take a look?

Viewing 22 posts - 151 through 172 (of 172 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266