Date   

OCS 3 debugging

koal01
 

Hi, I'm testing OCS on the Mega, i've desactivated all sensors, power panel and light panel.
The debug mode is on "VERBOSE" status but no clear information.
As we can see in the screenshot no ping in the cmd console while the monitor display successively only success status.
They are no warning orany information that can help to understand what is going wrong
Question : is seems that the communication between the 5100 and the mega is perturabated ? Is there something i can do some test around this ?


Re: New OCS developments

koal01
 
Edited

Maybe we can focus on the mega for a week and then test the compilation on The Teensy board
I know it's a job to debug several boards at a time and especially on a very new board like the Teensy 4.1

Thank you Howard for integrating my old BMP180 in your design
I'll use the 3.c version with the bmp085 introduction in OCS3 for my second test tomorrow


Re: New OCS developments

Howard Dutton
 

On Thu, Oct 7, 2021 at 12:45 PM, Howard Dutton wrote:
an an issue on the T3.5 or T3.6 ... those have been around a lot longer.
And from a hardware standpoint they have a lot more in common with each other than they have with the T4.1.


Re: New OCS developments

Howard Dutton
 

On Thu, Oct 7, 2021 at 12:15 PM, koal01 wrote:
Talking about the Teensy 4.1 the compilation is now ok in the 3.b version, a light error concerning the TSL2591 (not with the Mega) but non blocking
Note: The chances of some given I2C device library having a problem running/compiling on the T4.1 is greater than an issue on the T3.5 or T3.6 ... those have been around a lot longer.


Re: New OCS developments

koal01
 

Talking about the Teensy 4.1 the compilation is now ok in the 3.b version, a light error concerning the TSL2591 (not with the Mega) but non blocking
I'll test this version tomorrow on the mega 2560 and see if it is stable 
Ok for the verbose mode if needed
Very big job !


Re: New OCS developments

Howard Dutton
 

Also, I added the BMP085 (supports BMP180 also) to the OCS, both thermostat and weather.  Uses the Adafruit library.


Re: New OCS developments

Howard Dutton
 

On Thu, Oct 7, 2021 at 10:39 AM, koal01 wrote:
I’ve also ordered a Teensy 4.1 with headers, less expensive than the 3.6 and quite interesting 
The Mega2560 is fast enough to run the OCS.  The Teensy3.6 is about 60x faster with far more resources (RAM especially.)  The T4.1 is about another 6x faster than a T3.6.

The OCS doesn't do anything that requires that kind of speed but having that RAM is definitely a big deal...  The T3.5 and 3.6 have 256KB of RAM.  The T4.1 has 1MB but  "only" 512KB is accessible without jumping through hoops.  The Mega2560 has 2KB of RAM, and that's a real limitation.

Flash memory on the Mega2560 is easily sufficient and obviously the Teensy's have no issue there either, 512KB on a T3.5 to 8MB on a T4.1.


Re: New OCS developments

koal01
 

I’ve also ordered a Teensy 4.1 with headers, less expensive than the 3.6 and quite interesting 


Re: New OCS developments

Howard Dutton
 

On Thu, Oct 7, 2021 at 07:32 AM, Fernando Nino Sr wrote:
Howard, which Teensy are we looking at for the new OSC3.  I might as well order a couple of them to have for testing.
Thanks
Nino
I'll probably use a T4.1.


Re: New OCS developments

Fernando Nino Sr
 

Howard, which Teensy are we looking at for the new OSC3.  I might as well order a couple of them to have for testing.
Thanks
Nino


Re: New OCS developments

Howard Dutton
 

Also, you might be running out of ram on the Mega2560 and seeing it crash.

Really, if the Mega2560 is (largely) left behind with OCS3 I don't care as I'm not omitting features.


Re: New OCS developments

Howard Dutton
 

You can also turn on the debug mode and see what it says at boot.

It'll tell you if the sensors were found or not.

There aren't many debug options now, it just shows messages for everything in VERBOSE or errors only if ON.


Re: New OCS developments

koal01
 

Thank you for patching  and  checkling  the weather sensor code.


Re: New OCS developments

koal01
 

Concerning the bmp180 I think the library is properly installed, BTW the sensor works fine in ocs2,  I was meaning a compatibility with Ocs3 as there is no parameter for this specific sensor in the config file 


Re: New OCS developments

Howard Dutton
 

On Wed, Oct 6, 2021 at 11:20 AM, koal01 wrote:
Actually the pressure sensor i'm using is the BMP180 and the pressure avalaible in OCS3 is the BMP280
Looks like it uses a different library.

https://github.com/adafruit/Adafruit-BMP085-Library


Re: New OCS developments

Howard Dutton
 

On Wed, Oct 6, 2021 at 11:20 AM, koal01 wrote:
Actually the pressure sensor i'm using is the BMP180 and the pressure avalaible in OCS3 is the BMP280, i thouhgt they could be compatible but it doesn't seem to be the case.
I would have to check.

The other ones : MLX
Code looks ok.

TSL2591
Looking at the code there was an issue, patched.

and modern device wind revP sensors
Code looks ok.

displaid "invalid" although I activated them in the config.h
The charts were accessible.


Re: New OCS developments

Howard Dutton
 

Trying to get the point across, this is in heavy development, don't count on it working.

Still, the testing is helpful, I patched the Teensy watchdog code for that case where it's not enabled.


Re: New OCS developments

koal01
 

Testing the latest version on the Teensy 4.1 i can read this error in the compilation around the watchdog although it is not activated in the config

C:\Users\me\AppData\Local\Temp\arduino_build_382019\sketch\src/HAL/HAL_Teensy_4.1.h:63:3: error: 'watchdog' was not declared in this scope
   watchdog.init(8); \
   ^
C:\Users\me\Documents\Arduino\setup\OCS\NORMAL\OCS3\OCSc\OCS\OCS.ino:80:3: note: in expansion of macro 'HAL_INIT'
   HAL_INIT()


Re: New OCS developments

koal01
 

I did a short test of OCS 3.a on the mega 2560 this afternoon.
As i was on the usb supply I could display the webpage but i had just two weathers sensors working (temp and humidity), other sensors were not working...
Actually the pressure sensor i'm using is the BMP180 and the pressure avalaible in OCS3 is the BMP280, i thouhgt they could be compatible but it doesn't seem to be the case.
The other ones : MLX, TSL2591 and modern device wind revP sensors displaid "invalid" although I activated them in the config.h
The charts were accessible.
Then I disconnected the usb cable and swithed the external supply on, at that moment i lost the webpage and impossible to get the ping.
I repeated serveral powercycles without progressing. I truned back to the 2.3i version and the ping came again and everything works in this stable version
Not discouraged at all, maybe some mysteries on the Mega or EEprom needs to be erased, I'll have more time on Friday, it will be the occasion to test the latest version.

Thanks Howard


Re: New OCS developments

Howard Dutton
 

On Mon, Oct 4, 2021 at 10:57 AM, Fernando Nino Sr wrote:
Nicely laid out script. Looks like VS Coding. 
I've moved all of my larger projects to VSC now, this was the last one.  The other revelation was the creation of my task manager, that untied my hands when working in the Arduino environment.  Makes the code much nicer.

Only OnStepX and this new OCS are really deep rewrites, the SHC and SWS are changed/better but not at the same level.  OnStepX was/is a much bigger undertaking too the OCS is simple in comparison.