OpenSprinkler › Forums › Comments, Suggestions, Requests › Opensprinkler on ESP8266
Tagged: ESP8266 installation
- This topic has 171 replies, 26 voices, and was last updated 3 years, 3 months ago by zenonmb.
-
AuthorPosts
-
March 31, 2020 at 9:44 am #64920
RayKeymasterWhat’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.June 8, 2020 at 2:52 pm #66683
gadakaParticipantHi, 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?June 14, 2020 at 10:03 am #66806
gadakaParticipantHi, 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?
June 15, 2020 at 12:40 pm #66818
RayKeymasterI 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).
June 15, 2020 at 4:08 pm #66823
gadakaParticipantThank You for the response.
I’m following 3.0 version schemtaic
I found in my country PCA9555 so I’ll try use it 🙂June 15, 2020 at 6:40 pm #66826
RayKeymasterIf 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.
June 22, 2020 at 11:16 am #66938
gadakaParticipantHi, I bought PCA9555 ad everything works great but I have one question – is it possible to control 12 sections using one PCA9555?
June 22, 2020 at 8:55 pm #66952
RayKeymasterBy “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.
June 23, 2020 at 9:44 am #66958
gadakaParticipantYes, I mean 12 zones…
Ok, I undestand 🙂July 18, 2020 at 12:47 pm #67397
DarioBoccParticipantHello, 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?
ThanksOctober 12, 2021 at 12:00 pm #71412
zenonmbParticipantColleagues,
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 rapidly2nd 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 0xc02nd 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 8Finally, 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
October 13, 2021 at 12:30 pm #71421
zenonmbParticipantColleagues,
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:
October 13, 2021 at 12:39 pm #71423
RayKeymasterFrom 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).
October 13, 2021 at 1:22 pm #71424
zenonmbParticipantThanks 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,
martinOctober 13, 2021 at 6:33 pm #71428
RayKeymasterWell, 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.
October 14, 2021 at 6:25 am #71429
zenonmbParticipantUnderstand, 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 youOctober 14, 2021 at 12:14 pm #71430
RayKeymasterYou 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.
October 14, 2021 at 5:47 pm #71434
zenonmbParticipantTried 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 belowArduino: 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?
October 15, 2021 at 7:07 am #71436
zenonmbParticipantRay,
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:80October 15, 2021 at 10:35 am #71439
RayKeymasterAll 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.
October 15, 2021 at 11:40 am #71440
zenonmbParticipantRay,
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
October 15, 2021 at 1:37 pm #71442
zenonmbParticipantRay,
I am back…..sooner than expected.
I see a lot of timeouts and disconnects13: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 -> timeoutIs there anything that I can take a look?
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Comments, Suggestions, Requests › Opensprinkler on ESP8266