Forum Replies Created
-
AuthorPosts
-
ja.charerParticipantWow, looks like you made great progress since I’ve been here last time.
Answering some questions:
1. I’ve never tested firmware without RTC however if a bug is present it should be also for ESP8266 (or is in ESP32 NTP library)…
2. I do consider porting the last MQTT version also, however I wait till the final version will be released with MQTT subscription
3. @argita what RTC bug are you referring too ? If you have a spare board I would be interested…BR
ja.charerParticipantTnx cherokeecruiser2 for finding this obvious error… I wonder how my test environment works with that…
Github updated
ja.charerParticipantHi agisofttm
Problem may be different as a your board has a lora which is using GPIO’s {5,14,18,19,26,27) and GPIO 16 for OLED reset.
In my esp32.h I use some of those pins for controlling a station “#define ON_BOARD_GPIN_LIST {12,13,14,15,16,255,255,255}” and button 3 “#define E0_PIN_BUTTON_3 26”. This may bring a conflicts.
So my suggestion is to redefine all necessary buttons, sensor and station gpios to avoid conflicts
ja.charerParticipantHello, have you checked this https://opensprinkler.com/forums/topic/opensprinkler-on-esp32/. Two year ago I’ve manage to compile a code for ESP32.
ja.charerParticipantSuccess !!!
After changing I2C pins to 5,4 (from 26,25) all seems to work perfectly and much much faster then on ESP8266. Why changing pins made a different I din’t know 🙁 I was trying to find anything in doc and forums but without success. Maybe this is related to my chip OLED build in esp32 development board.
Anyway. Now everything works maybe except logs, circle is spinning and spinning without any results. In debug info is also one error “wtopts.txt does not exist” this is related to weather options file but after changing API key weather is shown correctly. Another issue may by whit NTP synchronization. During startup looks like NTP client try connect several times but whit unknown result. I need to investigate this.
So to any interested. Looks like OpenSprinkler works on ESP32 (whit some limitation) Paolo great work !!!
BTW. Have you seen this https://github.com/zhouhan0126/WIFIMANAGER-ESP32 looks like WiFiManager is ported on ESP32 already.
Attachments:
ja.charerParticipantHi Paolo
Are you sure that your ESP32-Sprinkler GitHub contain lattes code? it may opinion not as for example: definition of SDA_PIN and SDL_PIN are in ESP8266 naming (eg D6, D4) for ESP32 we need to have GPIO number. But this is easy to fix. I find additional part which prevent code to work. In function void GetWeather() is table declaration char weather_Url[15]; where DEFAULT_WEATHER_URL is copied form EPPROM. But DEFAULT_WEATHER_URL is 25 chars long and event 40 chars declared in Define.h!I’ve uploaded all my changes (most of them are DEBUG_PRINTs allowing me understand code) to my GitHub branch (pins.h is there too, my HW config is ESP32 + 2xPCF8574 + SSD1306OLED + RTC + I2C (SDA 26, SDL 25)) https://github.com/JaCharer/Esp32-Sprinkler/tree/Working-conde-v1 – can you please take a look on it
Now code, let say try to work, behave very unstable and unpredictable. Hangs very often in random times. I will upload some logs later and this may help find where problem is. For me all this b0 6 something are totally unknown 🙁
I do not this this is problem of dev environment (Visual studio versus Arduino IDE), so eider we do have different libraries? can you please share yours, or published code is not final one as maintained.
BDW and this is very strange as strcpy_P and strcat_P sims to crash code, change to strcpy or strcat fix problem. Additional fight i had whit I2C. Wire.begin() without SDA and SDL in i2crtc.cpp, PCF8574Mio.cpp and even Adafruit_SSD1306.cpp do not allows proper I2C initialization. Explicit I2C pin declaration in Wire.begin(SDA_PIN,SDL_PIN) make my LCD working.
ja.charerParticipantHi again,
I just would like only report that I’ve successfully compiled a code. I had to only bypass Ping.ping function (now packetLoopIcmpCheckReply always returns 1) but this should be fine for test purpose. Additionally FS.h do not include Dir class so this part of code is commented now and need to be rewritten , Dir is used to print some DEBUG only anyway. Looks like you missed also some “&& !defined(ESP32)” in make_logfile_name function.
I will build test environment next week and immediately share an outcome.
I’ve also forked github repository to document all made changes. Link is https://github.com/JaCharer/Esp32-SprinklerRegards
Charer
ja.charerParticipantHello again,
My instance of Opensprinkler on ESP8266 work sins two mount now whit out any significant problems. I can complain only speed but to be honest this is not big issue. However just after initial compilations I’ve observed strange behavior.After power up device always end-up in WiFi Manager mode. Entering password and WiFi Name and soft reset switched device in operational mode. Hard reset and again WiFi Manager mode. After some googling I’ve found solution. Adding below two lines in to “bool EtherCardW5100::WiFiconnect()” in file EtherCard5100.cpp (after DEBUG_PRINTLN(“Wait WIFI…”);) totally solved the issue.
Added lines:
WiFi.disconnect();
WiFi.setAutoConnect(true);Hope this will be usable for anyone.
Regards
ja.charerParticipantHello, last two day i was trying compile code unfortunately without success 🙁 i’m using Ardunio IDE version 1.8.3 and latest espressif/arduino-esp32. I thing I’ve solved some issues but no i’m stack. Below summary of changes:
1. file Esp32-Sprinkler.ino – #include <Time/TimeLib.h> changed to #include <TimeLib.h>
2. I’ve got ‘File’ was not declared in this scope error so in EtherCardW5100.cpp i’ve added #include <SPIFFS.h> and downloaded SPIFFS.h library for ESP32
3. For some reason unclear for me #define MY_PING included in Pins.h did not work and I’ve got “‘Ping’ was not declared” error. Adding #define MY_PING in EtherCardW5100.cpp solved this problem.
4. Next i’ve got “‘SOCKET’ does not name a type” error so i’ve added #include <lwip/sockets.h> in EtherCardW5100.cppbut now i’ve got several errors “macro “write” requires 3 arguments, but only 1 given”. I’m running out of ideas… do you have any ?
EDIT:
If I read this post correctly https://www.esp32.com/viewtopic.php?t=2317 my problem number 4 whit write macro is due Macro incompatibility between lwip/sockets.h and functional libraries. I do not know if this may be simple solved.
@pbecchi i see that you going to develop ping library, can you share time frame please? I’m also curious why we need ping at all. Can we checks for example WiFI connection status and/or NTP server using NTP library and if this fails reconnect network or reboot (after 6 attempts) ?Attachments:
ja.charerParticipantHi,
My intention is not to change the code at all, I just want to compile a minimal configuration as possible. 11 proto case looks perfect for me but won’t compile. I will try again from scrath. In meantime I order some HW as suggested Real Time Clock may be useful.
@avgjoe I can’t wait when you succeed.Regards
ja.charerParticipant@pbecchi and @argjoe
What ESP8266ping.h you are using? I can’t find <Arduino-Ping-master\ESP8266ping.h> library declared in EtherCardW5100.h I’ve downloaded this one https://github.com/dancol90/ESP8266Ping and looks like this library is causing some problems.
I’m trying to accomplish same goal as argjoe to have minimal HW system as posible to be controlled over html or/and OpenHAB. And please be patient whit me 🙂 I’m beginner…Regards
CharerAttachments:
-
AuthorPosts