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


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


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.)


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


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.


Howard Dutton
 

On Mon, Oct 4, 2021 at 03:11 AM, Howard Dutton wrote:
And I wouldn't run this on any real OCS hardware yet.  It's not done.
Let alone tested.