Date   

Re: SD Card

Fernando Nino Sr
 

Switched these to ON m(config.h) and monitor for any errors on you serial windows.

#define DEBUG_SD                      ON // 
#define DEBUG_WEBSERVER               ON /


Re: OCS watchdog

koal01
 

I found an external source that was perturbating OCS, i stopped it and i have no more timeouts in OCS.
I was actually using a netgear wifi extender in my network, i was not using it for OCS but for other purposes.
When it is plugged OCS crashes everytime i switch inputs on and off, this kind of extender is normally supposed to improve the wifi signal.
I don't know the reason of this problem, maybe the extender is generating lots of broadcasts inside the network...
OCS has been running for three days now and is very responsive clicking on charts, lights and any inputs.
Here'a a screenhsot , watchdog is off


Re: OCS watchdog

koal01
 

So my 220 V is rubbish.
Actually it is coming from my 12v batteries storing energy from solar panels, The current is converted from  a 12 v - 220 v converter. Here is the model
Convertisseur 375VA 12V pure sinus Phoenix VE.Direct-Victron Energy

I know what you are going to ask me to do, supplying the relay directly from mains.
I’ll do that and let you know !


Re: OCS watchdog

Howard Dutton
 

On Wed, Jul 29, 2020 at 01:48 PM, koal01 wrote:
I’ve just tested with no 220v on relay6 and OCS is working fine. I switched on and off the relay ten times without any problem. When the 220v is connected i can only do a switch on and off one time and  OCS becomes unstable.
Is the 220v causing problem ?
Yes, that sure appears to be the case.


Re: OCS watchdog

koal01
 

I’ve just tested with no 220v on relay6 and OCS is working fine. I switched on and off the relay ten times without any problem. When the 220v is connected i can only do a switch on and off one time and  OCS becomes unstable.
Is the 220v causing problem ?


Re: OCS watchdog

Howard Dutton
 

On Wed, Jul 29, 2020 at 01:05 PM, koal01 wrote:
As i'm speaking the 220 v relay is connected on relay 5 and OCS is working fine.
The website and the ethernet shield are disturbed when i switch the relay 5 on and off on the webpage
Even when no 220V is present on the relay?


Re: OCS watchdog

koal01
 

As i'm speaking the 220 v relay is connected on relay 5 and OCS is working fine.
The website and the ethernet shield are disturbed when i switch the relay 5 on and off on the webpage


Re: OCS watchdog

Howard Dutton
 

The exact meaning of your statements is lost.

Is this only a problem when 220V is present?


On Wed, Jul 29, 2020 at 3:42 PM koal01 <melyacoubi@...> wrote:
Everything is ok when the 220V is disconnected or connected but not used. The webserver is very responsive and charts as well.
If if switch on the 220 V relay everything is still ok but when i switch if off, the pings are not working and the webserver is not avalaible.


Re: OCS watchdog

koal01
 

Everything is ok when the 220V is disconnected or connected but not used. The webserver is very responsive and charts as well.
If if switch on the 220 V relay everything is still ok but when i switch if off, the pings are not working and the webserver is not avalaible.


Re: OCS watchdog

Howard Dutton
 

Disconnect the 220V and see what happens.


On Wed, Jul 29, 2020 at 2:34 PM koal01 <melyacoubi@...> wrote:
i thought that the relay 5 could be damaged so i passed to the 220 V on  relay 6 and the result is the same.
When i switch on and off this relay the ping on the ethernet shield stops and logically the webserver is not reachable.
weird !


Re: OCS watchdog

koal01
 

i thought that the relay 5 could be damaged so i passed to the 220 V on  relay 6 and the result is the same.
When i switch on and off this relay the ping on the ethernet shield stops and logically the webserver is not reachable.
weird !


Re: OCS watchdog

koal01
 

Actually i'm noticing something curious, when i'm switching 12 V relays OCS remains stable.
When i'm switching on the 220 V and off on the relay 5, the ping stops and the webpage is not reachable.
I have to go to the board and power cycle it and then i can repeat this dozens of times.
Don't know if my mega is the cause.
I changed the 12V supply last week-end.


Re: OCS watchdog

koal01
 

Sorry for not being able to bring any feedback 
I'm waiting for new megas coming from china...


Re: OCS watchdog

Fernando Nino Sr
 

Had mine running without sensors attached from thursday to monday morning with no reboots, Monday I added my sensors and had two reboots since. again mine is connected to my workbench pc, so I dont know if it was a usb issue. So i just tried to compile the sketch with watchdog on and got an error msg. "setRelayOff" not declared in this scope. So I turn off watchdog and the error did not pop up.  I turned de bug on but does not show any errors. The system reboots but I still have access to it via pc or cell phone. I am running 2.3h
Nino



Re: OCS watchdog

Howard Dutton
 

Here's a screenshot:


Re: OCS watchdog

Howard Dutton
 

Running the latest OCS all options enabled...

  • Watchdog is ON without being disabled even for SD card access.
  • Connection check is ON but with NO watchdog reboot, it can only reset the W5100.  I don't see the point of rebooting a working Mega2560 on purpose unless there is no other way to bring Ethernet back up.
  • Worst case delays were < ~2.7 seconds at midnight when it creates the new log file.
  • I keep a firefox connection alive for most of the past four days and peeked in to trigger a roof opening or select a relay here and there with no issues observed.

It hasn't rebooted once and is at 5935 minutes uptime now.


Re: OCS watchdog

Fernando Nino Sr
 

FYI, mine is still running no reboots. tomorrow I will start adding the sensors and RTC clock back and bench test it over the weekend. Last thing, I will had my relays.
I dont know what happened to my set up. I could not get the server to pull up weather or sky conditions without timing out, Other times I could not even get to the main screen on either pc or phone. I tried different OCS sketches and different SD card, but no lock, system acted like something was not running correctly.
I finally loaded a different sketch on to the mega to clean it out and reinstalled an older version (2.1d) of OCS that I had and that worked, no server time outs,  pulled weather page and could access it from my phone.  So I uploaded a plain 2.3h OCS sketch up with no modifications to the code (BME280, DHT11, etc) and seems to be working like before. 
I ran the system since Feb2020 till late June with no reboots.  Well at least I ended up with a spare set up{mega and shield)
Nino


Re: OCS watchdog

Howard Dutton
 
Edited

Keep in mind the relays and having high voltages present nearby the MCU present challenges.

That certain OCS board I designed uses relays that have mains terminals off of the PCB for a reason, that provides something of an electrical barrier between mains voltages and the PCB and thus the micro-controller and sensitive circuitry.

Even with the above... if there is, for example, condensation formed on the PCB/Relay surface all bets are off you have a path for 220V/240V.  Then there is the relay contacts closing and the EMI pulse that can happen with that (more an issue with carrying high currents.)

Additional precautions were taken where there are optically isolated relays driving the mechanical relays so no back EMF pulse (from the relay coils) etc. can get to the Mega2560 pins.

Naturally I'm using the same board without trouble and I switch 220V with it also (electric heater, etc.)

I'd also make sure the 12V power supply running it is of good quality.


Re: OCS watchdog

koal01
 

On Fri, Jul 24, 2020 at 05:26 AM, koal01 wrote:
I was showing to someone else the webserver switching off and on the relay 5 supplied in 220 V, i did that several times.
I mean i was connected to the webserver through my mobile phone, checking the relay 5 box on and off.


Re: OCS watchdog

koal01
 

Thanks Howard for your answer ok i'll adapt the response interval correctly.

However i think i've damaged the mega since the webserver is no more responding at all even after having flashed it several times in different versions, though i can ping the ethernet shield...
Let me give more details please. The moment where i lost control on the mega it was the 5th day without resets, OCS was very responsive and working good.  I was showing to someone else the webserver switching off and on the relay 5 supplied in 220 V, i did that several times. It is at this specific moment that the mega stopped responding, i opened the box to check if something was burnt but nothing weird. Since then i can't access to the webserver.
I'd like to specify that this relay was wired several months ago now and has always worked nicely. 

I guess my mistake is that one of my two fusers on the PCB is 20 Amp witch did not protected the mega from a great intensity even if I don't know how this can occurr..
A second mistake, several weeks ago i accidentally created a 12 V+ and 12V- little contact while i was moving my batteries, maybe i partially damaged the mega at that moment until it died totally last tuesday.

I'll change the mega considering that these instabilities are due to external circumstances, i hope i'm right.

Nice skies
Koal01 


Le ven. 24 juil. 2020 à 13:36, Howard Dutton <hjd1964@...> a écrit :
On Wed, Jul 22, 2020 at 03:57 PM, koal01 wrote:
I don't understand a sudden instability as i was checking cases in the power and lights panel just before a session.
OCS has become unstable from that moment with important latencies on the webserver.
I've seen my OCS go crazy when connected to across the internet in a high latency/low bandwidth condition.  Almost sounds like this and I saw strange long client times in the webserver/logs you posted.  Makes me wonder.

There is a Config.h setting added specifically to address the high latency/low bandwidth condition which perhaps would help IF this is going on:
#define RESPONSE_INTERVAL            1000 //   1000, n. Where n=500..10000 (ms.) Default for LAN latency, Internet use 5000.  Option

This slows down the network background Ajax data exchange rate so you don't overrun the network capacity.

241 - 260 of 528