OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266

Tagged: ,

This topic contains 138 replies, has 18 voices, and was last updated by  Jisse154 6 days ago.

Viewing 15 posts - 31 through 45 (of 139 total)
  • Author
    Posts
  • #41859

    fivos
    Participant

    @pbecchi
    -A remote master unit and several slave units is a great idea. There are many situation where you have sprinklers in different areas of a house and a single interface to handle them all would be really helpful.
    -Local sensors would greatly improve accuracy and flexibility of weather adjustment.
    -As for the local control, I don’t use it very much but some users may benefit of it.

    When you can please upload the logging fix so I can check it. I don’t have much time but I’m interested in this project and I’ll do my best to help.

    I didn’t find any other bugs, only some errors in the schematic you posted.
    -SCL SDA lines are inverted on nodeMCU
    -LCD PCF8574 P1 goes to LCD RW
    -LCD PCF8574 P2 goes to LCD E
    -LCD A1 A2 A3 should go to VCC for the default LCD address
    also you should consider not using pin define that are nodeMCU specific
    e.g. #define SDA_PIN 4 //D2 //:this is standard….it may be changed
    so that the code will be compatible with other esp8266 modules

    #41860

    pbecchi
    Participant

    Fivos

    tanks for your corrections and suggestions!

    I will use GPIO n. in the defines and I will correct the HW drawing then I will upload a commit that include also the logging fix.

    Regarding the future development

    I have started working on the master unit core and in a couple of week I should be able to upload something….

    If you have some time you could start to download the existing weather code available on the github (in pyton and/or in javascript…languages I don’t know) and port it to c++ writing a scketch that can do the same functions:

    I had a look today and I think it will not be a long work than we can go with new sensors and new algorithms(there is a lot of topics on this subject in this forum).

    #41923

    Ray
    Keymaster

    I just had time to check the previous posts in this thread. Seems the I2C issue has been ironed out. Be aware that a lot of the ESP8266 modules out there have incorrectly swapped GPIO 4 and 5 pins. Because these are default I2C pins, they often cause a lot of confusions. So if I2C doesn’t work, just swap GPIO 4 and 5 in software and try again.

    #42013

    ganralf
    Participant

    @pbecchi

    Kudos dude for all the hard work porting this project! I have been itching to do the same since December last year (actually got everything except the webserver compiling) but have not been able to take it any further.

    I want to get involved with this and help out, but I am struggling to get the project to run. It seems that the RTC library is causing some issues.

    I removed all the ../ from the includes and added a visual studio solution to the main opensprinkler project as I could not get the W5100 to compile. Or am I using the wrong approach?

    Anyway, I got it compiling and uploaded it and the NodeMCU v3 I use went into a bootloop. Uncommented stuff until I got it “working”, added again until I found the cause. When I include the RTC it bootloops. I will look into that, could be something I am doing wrong on my side.

    My real problem is now that it runs (without RTC) it does not seem to store the configuration information. Where does it store the info?

    Port closed
    Opening port
    Port open
    128 256 384 512 640 768 896 1024 1152 1280 1408 1536 1664 1792 1920 wiped
    nvdata
    
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    file written
    OptionsWrite OS:216
    255
    done
    
     ets Jan  8 2013,rst cause:2, boot mode:(3,6)
    
    load 0x4010f000, len 1264, room 16 
    tail 0
    chksum 0x42
    csum 0x42
    ~ld
    Started...
    wire begin
    Scanning..I2C.....
    No I2C devices found
    
    12
    <W>12<W>12<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>13<W>13<W>14<W>12<W>12/stns.dat
    b1=1
    b2=1
    b3=0
    OptSetup...
    weather.opensprinkler.com
    25
    255
    Reset EEPROM
    0 128 256 384 512 640 768 896 1024 1152 1280 1408 1536 1664 1792 1920 wiped
    nvdata
    
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    fileOpen:/stns.dat
    file exist open R/W
    0>record written
    file written
    OptionsWrite OS:216

    It always reboots and writes the config. Does the system store to the internal memory or to the flash on the RTC board?

    Regards

    #42014

    fivos
    Participant

    @pbecchi
    I haven’t had time to check on the project the last two weeks but I have installed the prototype 2 end it’s working flawlessly in the garden since then.
    Sorry but I’m also not familiar with python and/or in javascript. I’m an electrical engineer, so more into the hardware side of things.
    I will try to compile your new version soon and will let you know.

    @ganralf
    At least the previous code was using the memory on the RTC module so it won’t work without it. From what I can see it doesn’t find any I2C devises and that’s
    why it stays in the boot loop.
    Scanning..I2C…..
    No I2C devices found

    As Ray mentioned some ESP8266 modules have incorrectly swapped GPIO 4 and 5 pins (I2C pins). So maybe try to swap the cables and see if it works.

    #42016

    pbecchi
    Participant

    @ganralf
    Some of the available RTC library are NOT compatible with ESP8266 : some do not compile, some compile but dosn’t run.
    You should use the one specified in the readme……
    Regarding your boot loop …Fivos is correct if you are using EEPROM on I2C you need to have the RTC board with the EEPROM cip on it!
    It should show up at boot …but he saying “no I2c devices found!”.
    Otherwise you can specify EEPROM_ESP with a define on pins.h and libsel.h files and the ESP flash will be used as an EEPROM.
    @fivos
    I uploaded yesterday a new release of the code.It Is in the branch modAfterUplaod, I changed the name of the .ino to OpenSprinkler_ESP8266_2_1_6!
    I have also put all the files in the same directory deleting all “../”.
    This code contain several bugs corrections:
    now most of the function I have tested works…
    (regarding logs ..I believe that the code is correct but there is some problem in the java code that run in the server that I cannot asses and correct)
    it may depend on the browser I use….. try and tell me what’s append!
    I am doing little changes right now, since I am working now on the new “OpenSprinkler_Master” code I did to you mention earlier:
    I have now 3 Opensprinkler boards ( proto 1,2 and 3) to monitor and control ….it is coming out …. a little more time …..!

    #42017

    ganralf
    Participant

    @fivos
    Thanks for the advice, I will check my RTC module’s wiring.

    @pbecchi
    Woot, thanks, the EEPROM_ESP flag is what I need. I want to run the module without a RTC attached and have it update the time from a timeserver. One less component to worry about.

    Final plan is to have a module that can attach directly to one or two relays using the onboard GPIO pins for the areas where you don’t need lots of valves.

    Great job so far, will look into it tonight (South Africa here)

    #42022

    pbecchi
    Participant

    @ganralf

    You can try to use it the way you propose , but be aware:
    -RTC may not be used (I haven’t tried…) but time synchronization it is slow…
    -all pins 8+3 need to be declared on pins.h file and ESP8266 has no sufficient GPIO
    -you may try to give the pins you are not using a dummy number but must be an available GPIO.
    -3 pins are necessary for OS buttons.

    Much better to use an expansion cip: or a PCF8574 or a shift register cip.

    Paolo

    #42024

    ganralf
    Participant

    @pbecchi
    Thank you for the advice. I have already added a LCD_NONE flag that removes all LCD logic from the system. Without that the buttons are redundant so I will look into having it just reset the system settings if you hold one button in on bootup.

    As for the GPIO pins, I am going to see if I can add logic to reduce the amount of stations available, perhaps have 8 but hide 4 of them by default or something. For a more complex controller I will definitely add a shift register or a IO expander yes.

    I flashed my nodemcu last night got it connected to the wifi. However on subsequent boots it continually writes the config :/

    It also did not store my wifi password in the password file so is unable to connect to the wifi.

    I will post logs tonight.

    Regards.

    #42026

    ganralf
    Participant

    Ok, I hardcoded my wifi ssid and password into the password file for now.

    Here is the output logs: http://pastebin.com/s1cMfiUQ

    #42091

    Ray
    Keymaster

    @ganralf: the OpenGarage project actually has a decent way to allow users to connect to their own WiFi, without having to hardcode ssid / password. This is probably something you can directly integrate into your work. Basically the way it works is: the controller starts in AP mode, presenting a simple webpage allowing you to select a detected network and put in password. Then it switches to AP+STA mode, trying to connect to your WiFi and report back the IP address. After this, the ssid and password are stored in a file in flash, and the controller restarts in STA mode only. Not the most elegant way (compared to smartconfig), but seems to work fine. In any case, the firmware code is at:
    https://github.com/OpenGarage/OpenGarage-Firmware/tree/master/OpenGarage
    and everything related to AP mode can be found by searching ‘OG_MOD_AP’ in main.cpp.

    #42682

    gmauzy
    Participant

    What did you do exactly to get out of the boot loop? I am having the same problem. No RTC.

    #42731

    Ray
    Keymaster

    I am not sure if I understand this ‘boot loop’. Is it because it’s not finding the I2C device expected, so that it stays in this boot loop?

    Actually for OpenGarage I found some rare boot loops (which I suspect has to do with flash memory corruption and results in firmware crashing). I don’t think is the same issue as the one we are discussing here. But in case there is any relevance, see this page:
    http://opengarage.io

    #42746

    pbecchi
    Participant

    What kind of “boot loop” you are in?

    If you give me more detail a may give you some guidance….. anyhow to run an opensprinkler without a RTC is not advisable!
    In theory NTC should provide right time syncronisation, but since the unit restart very often and syncronisation require more trials……

    By the way , I will upload a new release of ESP8266 OpenSprinkler at the end of the week, it will include several improvements:

    OTA upload capability to upload firmware by TCPIP
    WiFi Manager to select WiFi SSID and password without USB connection
    other minor and bug correction.

    #42903

    gmauzy
    Participant

    This is what I get:

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

    load 0x4010f000, len 1264, room 16
    tail 0
    chksum 0x42
    csum 0x42
    ~ld

Viewing 15 posts - 31 through 45 (of 139 total)

You must be logged in to reply to this topic.

OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266