Date   

Re: OCS 3 power relays question

Howard Dutton
 

On Sun, Oct 3, 2021 at 03:44 PM, koal01 wrote:
I didn't know i could copy all my Power panel from OCS 2 and paste it to OCS3, nice !
I only changed Config.h settings where required or very desirable.  They were close to what I feel is optimal to start with.

The sensors errors have also disappeared, for the bmp280 after a google research i found guys advicing to add Adafruit_BusIO-master in the library folder, doing this fixed the issue.
As for the MLX i just updated the library and the problem was gone.
Only, the  the Rev-P modern device sensor is still causing errors :
C:\Users\me\AppData\Local\Temp\arduino_build_374851\sketch\src\lib\weatherSensor\WindModernRevP.cpp: In member function 'bool WindRevP::init()':
C:\Users\me\AppData\Local\Temp\arduino_build_374851\sketch\src\lib\weatherSensor\WindModernRevP.cpp:25:59: error: 'windRevPTask' was not declared in this scope
   if (tasks.add(WEATHER_SENSOR_SAMPLE_PERIOD, 0, true, 7, windRevPTask)) {
                                                           ^~~~~~~~~~~~
C:\Users\me\AppData\Local\Temp\arduino_build_374851\sketch\src\lib\weatherSensor\WindModernRevP.cpp:25:59: note: suggested alternative: 'windRevP'
   if (tasks.add(WEATHER_SENSOR_SAMPLE_PERIOD, 0, true, 7, windRevPTask)) {
                                                           ^~~~~~~~~~~~
                                                           windRevP

Good.  I patched the little typo for the RevP compiles now.


Thes ETHERNET_RESET_PIN and CONNECTION_CHECK_HOURS parameters need also some debugging in the extended config.h
I skipped over implementing that on the first pass over the code.

And I wouldn't run this on any real OCS hardware yet.  It's not done.


Re: OCS 3 power relays question

koal01
 

Magical, nearly everything solved.
I didn't know i could copy all my Power panel from OCS 2 and paste it to OCS3, nice !
The sensors errors have also disappeared, for the bmp280 after a google research i found guys advicing to add Adafruit_BusIO-master in the library folder, doing this fixed the issue.
As for the MLX i just updated the library and the problem was gone.
Only, the  the Rev-P modern device sensor is still causing errors :
C:\Users\me\AppData\Local\Temp\arduino_build_374851\sketch\src\lib\weatherSensor\WindModernRevP.cpp: In member function 'bool WindRevP::init()':
C:\Users\me\AppData\Local\Temp\arduino_build_374851\sketch\src\lib\weatherSensor\WindModernRevP.cpp:25:59: error: 'windRevPTask' was not declared in this scope
   if (tasks.add(WEATHER_SENSOR_SAMPLE_PERIOD, 0, true, 7, windRevPTask)) {
                                                           ^~~~~~~~~~~~
C:\Users\me\AppData\Local\Temp\arduino_build_374851\sketch\src\lib\weatherSensor\WindModernRevP.cpp:25:59: note: suggested alternative: 'windRevP'
   if (tasks.add(WEATHER_SENSOR_SAMPLE_PERIOD, 0, true, 7, windRevPTask)) {
                                                           ^~~~~~~~~~~~
                                                           windRevP

Thes ETHERNET_RESET_PIN and CONNECTION_CHECK_HOURS parameters need also some debugging in the extended config.h

Outside it doesn't stop raining, when the weather is better i'll update the mega and let you know

Thank you


Re: OCS 3 power relays question

Howard Dutton
 

On Sat, Oct 2, 2021 at 02:12 PM, koal01 wrote:
Howard, i was using in OCS 2 the power panel in config.h for specific use and i really did like as they relay were named as Device 1, 2, 3 etc..
My shelter is not a standard
In OCS3, the power panel has become a roof panel.
I've scripted many commands to switch on and off my devices in OCS2, in this new version i'm quite lost to use it as i was doing before.
Let me show you as i was using the power panel, the example will certainly be clearer than explanations
I'm not sure what you mean by "scripted" but generally the "Power Panel" works as before.

I did test with your settings and they would crash it though, this was a buffer overflow, the scratchpad for data from flash storage wasn't large enough.  I fixed that and it's better optimized now (smaller memory footprint) and can handle quite large strings before it overflows now (just keep the _NAMES strings <= 40 chars and you should be good.)


Re: OCS 3 compiling error on 2 sensors

Howard Dutton
 

I'm guessing these are both related to your not having the proper libraries installed for the Arduino IDE.

I think you might have realized/fixed this but not sure, at any rate I can enable both of these and it compiles successfully here.


Re: New OCS developments

koal01
 

Hi Fernando ocs 3 is in the master branch


Re: New OCS developments

Fernando Nino Sr
 

Hi Howard, is there a link to the new OCS, I would like to try it on my spare set up. Just checked the GitHub, is the 2.33 version the latest?
Thanks
Nino


Re: OCS 3 power relays question

koal01
 
Edited

Feedback :
The wind sensor RevP is not operational
I also tried to activate ETHERNET_RESET_PIN and CONNECTION_CHECK_HOURS parameters in the extended config.h and the IDE display errors

When these options are not activated the compiling ok, big job ! Nice !
Thanks


OCS 3 power relays question

koal01
 

Howard, i was using in OCS 2 the power panel in config.h for specific use and i really did like as they relay were named as Device 1, 2, 3 etc..
My shelter is not a standard
In OCS3, the power panel has become a roof panel.
I've scripted many commands to switch on and off my devices in OCS2, in this new version i'm quite lost to use it as i was doing before.
Let me show you as i was using the power panel, the example will certainly be clearer than explanations
// POWER PANEL ---------------------------------------------------------------------------------------------------------------------
#define POWER                         ON //    OFF, ON to enable the OCS website power panel display.                        Option
 
#define POWER_DEVICE1_RELAY           1 //    OFF, n. Where n=1..14 (Relay#) with _NAME below.                              Option
#define POWER_DEVICE1_MEMORY          ON //    OFF, ON to enable memory (across power cycles) for this relay state.          Option
#define POWER_DEVICE1_NAME "OnStep_12V-2A+Hub"
 
#define POWER_DEVICE2_RELAY           2 //    OFF, n. Where n=1..14 (Relay#) with _NAME below.                              Option
#define POWER_DEVICE2_MEMORY          ON //    OFF, ON to enable memory (across power cycles) for this relay state.          Option
#define POWER_DEVICE2_NAME "Camera_RAF_12V-4A"
 
#define POWER_DEVICE3_RELAY           3 //    OFF, n. Where n=1..14 (Relay#) with _NAME below.                              Option
#define POWER_DEVICE3_MEMORY          ON //    OFF, ON to enable memory (across power cycles) for this relay state.          Option
#define POWER_DEVICE3_NAME "ReculCabane_12V"
 
#define POWER_DEVICE4_RELAY           4 //    OFF, n. Where n=1..14 (Relay#) with _NAME below.                              Option
#define POWER_DEVICE4_MEMORY          ON //    OFF, ON to enable memory (across power cycles) for this relay state.          Option
#define POWER_DEVICE4_NAME "AvanceCabane_12V"
 
#define POWER_DEVICE5_RELAY           5 //    OFF, n. Where n=1..14 (Relay#) with _NAME below.                              Option
#define POWER_DEVICE5_MEMORY          ON //    OFF, ON to enable memory (across power cycles) for this relay state.          Option
#define POWER_DEVICE5_NAME "Ouverture_Fermeture_Porte"
 
#define POWER_DEVICE6_RELAY           6 //    OFF, n. Where n=1..14 (Relay#) with _NAME below                               Option
#define POWER_DEVICE6_MEMORY          ON //    OFF, ON to enable memory (across power cycles) for this relay state.          Option
#define POWER_DEVICE6_NAME "AllSky"

Thanks again


OCS 3 compiling error on 2 sensors

koal01
 

Howard, i have errors with 2 sensors, the MLX90614 and the bmp280 (actually i'm using the bmp180 but i downloaded the bmp280 lib for the test, the bme280 works fine as well as other sensors.

Error on the MLX :
C:\Users\me\AppData\Local\Temp\arduino_build_975909\sketch\src\lib\weatherSensor\CloudMlx90614.cpp: In member function 'bool Mlx90614w::init()':
C:\Users\me\AppData\Local\Temp\arduino_build_975909\sketch\src\lib\weatherSensor\CloudMlx90614.cpp:25:52: error: no matching function for call to 'Adafruit_MLX90614::begin(int)'
   if (mlxSensor.begin(WEATHER_SENSOR_CLOUD_MLX90614)) {                                                    ^
In file included from C:\Users\me\AppData\Local\Temp\arduino_build_975909\sketch\src\lib\weatherSensor\CloudMlx90614.cpp:8:0:
C:\Users\me\Documents\Arduino\libraries\Adafruit-MLX90614/Adafruit_MLX90614.h:52:11: note: candidate: boolean Adafruit_MLX90614::begin()
   boolean begin();
           ^~~~~
C:\Users\me\Documents\Arduino\libraries\Adafruit-MLX90614/Adafruit_MLX90614.h:52:11: note:   candidate expects 0 arguments, 1 provided

Error with the bmp280 :
In file included from C:\Users\me\AppData\Local\Temp\arduino_build_975909\sketch\src\lib\weatherSensor\TpBmp280.cpp:9:0:
Plusieurs bibliothèque trouvées pour "SD.h"
C:\Users\me\Documents\Arduino\libraries\Adafruit_BMP280/Adafruit_BMP280.h:26:10: fatal error: Adafruit_I2CDevice.h: No such file or directory
Utilisé : C:\Users\me\Documents\Arduino\libraries\SD
 #include <Adafruit_I2CDevice.h>

Thank you for your help


Re: New OCS developments

koal01
 

I've just deleted 2 messages i send since i couldn't compile but seeing the arduiino IDE error it was a library problem with the digitalWriteFast lib, i downloaded it and the compilation is ok


Re: New OCS developments

Howard Dutton
 
Edited

Yes for weather but untested, look in Config.h they are listed.

Only Bme280 for thermostat now, easy to add others though.

Reminds me i should attach thermostat pressure to weather as it applies.


Re: New OCS developments

koal01
 

Are the bmp180 and si7021 sensors compatible with ocs3 ?


Re: New OCS developments

Howard Dutton
 

Speaking of new features... one of them is due to using the Sense class (from OnStepX) for digital inputs:

Now these digital inputs have a built-in ability to filter noisy conditions.

Normally, you specify the ON state as follows:
#define SENSE1_ON_STATE HIGH

To enable filtering add an extra bit specifying the filter time (how long the signal needs to be stable to be accepted.)  In this example it's 50 milliseconds...
#define SENSE1_ON_STATE HIGH|HYST(50)

The above line (and similar) can be added to the Config.h file if you want to change the default behavior for any sense inputs.


Re: New OCS developments

Howard Dutton
 

I have things mostly working I think (on a Mega2560).

The BME weather sensor works (new design/code there so that's good.)
The website and charts work.
NPT works.
Relays almost work.  The fast relay pwm has problems, so its commented out, but otherwise things look ok.
Sense inputs are untested.
I see Analog inputs floating as they should when disconnected (test h/w).

Memory is tighter on the Mega2560, as expected... you don't get lots of new features without a price.
So the new much more elaborate DEBUG mode makes things REALLY tight if enabled.  If disabled things seem fine, not sure how many sensors can be enabled all at once though.  As this is targeted primarily at more capable h/w (Teensy etc.) this is an acceptable situation.


Re: New OCS developments

koal01
 

Never mind, i'm candidate for bugs and crashes LOL , ok just tell me when i can test OCS3 !


Re: New OCS developments

Howard Dutton
 

On Thu, Sep 30, 2021 at 02:19 AM, koal01 wrote:
i'll try the update tommorrow and let you know.
It's very much a work in progress at this point, lots of bugs, so you should wait for a little while still.


Re: New OCS developments

koal01
 

Hi, i'm currently at the 2.3i version and  I'm a candidate to the new version 3, i'll try the update tommorrow and let you know.
Always a pleasure to test the latest improvements 
Thank you for ALL


Re: New OCS developments

Paul Romero <paul@...>
 

Howard,
I am happy that your project is top notch. I look forward to buying a board, as it looks like the most professional design (hardware) I've seen! My current plan is to get a simpler Arduino uno board and put it together as shown in the Joe's Astrophotography part 2 video on YouTube. As my learning curve progresses and I begin to understand the how tos associated with Arduino based projects, I will complete an OCS.
Clear Skies,
Paul


Re: New OCS developments

Howard Dutton
 

I've started work on the OCS update, it's on Github as the master branch.

The last stable OCS is now release-2.3 and the default branch, which is a good thing as this new version 3 of the OCS will take a fair bit of time to become stable and actually work well I'm sure.

The main features it has integrated at this point...

  • Much easier code to work on (using Visual Studio) and still compiles in the Arduino IDE as usual.
  • Uses tasks for better/smoother concurrent operation.
  • All code I had for weather sensors was given a good once over then integrated in a consistent manor.  You simply select the sensors you want in the Config.h file and they are activated, no need to edit the source code as before.
    • When more than one sensor for a given feature (temperature for instance) are present the first one gets ownership of that feature and the others are denied.
      • They may fail to init. in this case OR if they provide other features (humidity for instance) they may still init and handle just those other features.
  • The (serial and IP) command processing code is now unified (leaning on the work done in OnStepX.)  It has (untested) code for both Wifi (ESP32) and Ethernet (W5100/W5500) IP command channels.  Basic testing of the serial command processing seems to show at least that works.
  • The functions that create the web-page content were broken down and logically grouped together, and have better naming.  Much easier to see what they are doing now.  This paves the way for expansion of features without the whole thing becoming ungainly.
  • The web-page design was changed to allow use with either ESP32/Wifi or Ethernet (just not both at once.)  The Wifi web server is not implemented yet.
  • Analog inputs are now numbered (1 to 16) instead of being specified directly by the pin.
  • There are now per processor pin maps.
  • Pin initialization and logic states can be specified by adding #defines to the Config.h file.  You can invert the logic (LOW is ON) and control the initialization (pullups, etc.) using this capability.
    • Note that this control is not by the pin# but rather by sense# input# or analog# that's associated with the pin# in the pin map.


Re: New OCS developments

koal01
 

Ok for analog inputs changes, very good !
I confirm the Teensy 4.1 is cheaper than the 3.6, i was surprised about that, it is on the way as well as the w5500.
Ok for the green connectors with screws replacing male headers for molex connectors in OCS2.
Hope that these connectors will maintain wires strongly over time.

Thank you !