Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Pro2 PLUS - Timezone config query
#1

Hi
I am building the Pro2 plus having  received the board yesterday, and have a question re the RX software for the Pro2 plus;

In the config file for the daylight saving, if there is no daylight saving, (as is the case in Queensland Australia), I assume "Timezone myTZ (aEDT, aEST);" is the correct thing to do , but what is the format for the TimeChangeRule sections.

I am hoping to go live next week with it
Regards
Jim
Reply
#2

Hi Jim,
I don't know the answer and Werk is very busy at the moment.
But I did find this https://github.com/JChristensen/Timezone
maybe by using the examples in the code and what at the above link you may be able to get your head around it.

Anyway I think you could just run it up and see how the time looks. I think Cumulus won't mind if the clock is out though I'm not sure on that one, but yeah, maybe just run it up and take a look.

Cheers Bob
Reply
#3

(10-12-2016, 02:54)Barrow4491 Wrote:  In the config file for the daylight saving, if there is no daylight saving, (as is the case in Queensland Australia), I assume "Timezone myTZ (aEDT, aEST);" is the correct thing to do , but what is the format for the TimeChangeRule sections.

Hi

The configuration on the TimeChangeRule is very simple for any place:
Taking the example given on the code:

Code:
// Example for Australia Eastern Time Zone (Sydney, Melbourne)
TimeChangeRule aEDT = {"AEDT", First, Sun, Oct, 2, 660};    //UTC + 11 hours
TimeChangeRule aEST = {"AEST", First, Sun, Apr, 3, 600};    //UTC + 10 hours
Timezone myTZ(aEDT, aEST);

This is for a zone which starts the summer time, on the first Sunday of April, and the zone is 10 hours ahead of UTC
also, this zone ends summer time on the first Sunday of October, starting to be 11 hours ahead of UTC.

Now, for the cases, as is yours, where the Summer Time does not apply, just configure the first line, defining the amount of time your zone is ahead or behind the UTC time, and then pass the same rule twice to the constructor, for example:

Code:
Timezone myTZ(aEDT, aEDT);

There is a readme file in the timezone library folder, where you can find more info.

On the Pro2 PLUS, no matter the place you are, the internal RTC is always set to run in UTC, so its very important to correctly set your time zone.
Reply
#4

Werk,

I get the following error, vI assume regarding a missing library file???
I have attached my Config file for your perusal
Thanks
Jim

Arduino: 1.7.11 (Windows 8.1), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

WeatherDuinoPro2Plus_RX_v100_b015_09122016.ino:24:22: fatal error: Timezone.h: No such file or directory

compilation terminated.

Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

Code:
// --------------------------------------------------------------------------------------
//     Start of user configurable options 
// --------------------------------------------------------------------------------------


// --------------------------------------------------------------------------------------
//   Define ID's for this weather station
// --------------------------------------------------------------------------------------
#define Station_ID   0xA1    // Station_ID, use the same value in all TX units
#define Relay_ID     0xB3    // Relay_ID,   use the same value in all WD units


// --------------------------------------------------------------------------------------
//   Define your Weather Station location
// --------------------------------------------------------------------------------------
#define LATITUDE      -19    // Put here your Station latitude in tenths of degrees North
#define LONGITUDE     146    // Put here your Station longitude in tenths of degrees (minus for West)
#define ELEVATION      55    // Put here your Station height above sea level in Meters


// --------------------------------------------------------------------------------------
//   Define rules for Auto Summer Time Display, and clock adjustment
// --------------------------------------------------------------------------------------
// Example for Australia Eastern Time Zone (Sydney, Melbourne) 
// TimeChangeRule aEDT = {"AEDT", First, Sun, Oct, 2, 660};    //UTC + 11 hours 
// TimeChangeRule aEST = {"AEST", First, Sun, Apr, 3, 600};    //UTC + 10 hours 
// Timezone myTZ(aEDT, aEST); 

TimeChangeRule aEDT = {"AEST", First, Sun, Oct, 2, 600};   //UTC + 10 hours 
Timezone myTZ(aEDT, aEST);


// --------------------------------------------------------------------------------------
//   Define Roll Over Hour for Meteorological Day
// --------------------------------------------------------------------------------------
#define MeteoDay_HStart 9    // Use values from 0 to 23


// --------------------------------------------------------------------------------------
//   Define your Display type
// --------------------------------------------------------------------------------------
#define DisplayType       3   // 1= LCD 20x4, 3= TFT 320x240 ILI9341

// --------------------------------------------------------------------------------------
//   Define Display Backlight TimeOut
// --------------------------------------------------------------------------------------
const byte  BackLight_Timeout = 0;   // Timeout for display backlight in minutes (1 to 255). 0 = Always ON 
#define Use_ScreenSaver           1    // Instead of turn off backlight show a big clock screen. 0= No, 1= Yes

// --------------------------------------------------------------------------------------
//   Define data display units
// --------------------------------------------------------------------------------------
#define Date_Time_Format 0     // 0 for dd-mm-yyyy, 1 for yyyy/mm/dd
byte Temp_Display_Unit = 0;    // 0 for ºC, 1 for ºF
byte ATM_Display_Unit  = 0;    // 0 for mBar, 1 for inHg
byte Rain_Display_Unit = 0;    // no setting, always mm
byte Wind_Display_Unit = 3;    // 0 for Km/h, 1 for mph, 2 for m/s, 3 for Knots


// --------------------------------------------------------------------------------------
//   Define the type of your Barometric Pressure Sensor
// --------------------------------------------------------------------------------------
#define Barometric_Sensor  1   // 0= BME280, 1= BMP280 2= BMP085 / BMP180


// --------------------------------------------------------------------------------------
//   Define the type of your inside Temperature / Humidity Sensor
// --------------------------------------------------------------------------------------
#define InsideTH_Sensor  0   // 0= BME280, 1= HTU21D, 2= SHT21, 3= SHT31


// --------------------------------------------------------------------------------------
//   Fine adjusts for Inside Temperature and Barometer
// --------------------------------------------------------------------------------------
const int   TemperaturaInt_offset =   0;   // Inside Temperature Fine Adjust in Tenths of Degree (-4 = -0,4ºC) 
const float pressure_offset       =   0;   // Pressure Fine Adjust in mB


// --------------------------------------------------------------------------------------
//   Define the type of your outside Temperature / Humidity Sensor
// --------------------------------------------------------------------------------------
#define MainOutTH_Sensor 0   // 0 for sensor type SHT31, SHT21 or HTU21D, 1 for sensor type SHT1x or DHT22 


// --------------------------------------------------------------------------------------
//   Define Wind Speed and Wind Gust resolution
// --------------------------------------------------------------------------------------
// This setting only have effect when the software is used in Davis VP emulation mode
#define VP2_WindRes     0    // If set to 2, set Cumulus Wind Speed and Wind Gust multipliers to 0.448. Wind Resolution 0.72 Km/h
                             // If set to 1, set Cumulus Wind Speed and Wind Gust multipliers to 0.224. Wind Resolution 0.36 Km/h
                             // WARNING !!! Setting this variable to 1 allows a better wind speed and gust resolution,
                             // but also limits both of them, to a maximum reading of just 91.8 Km/h
                             // If set to 0, system uses Standard Davis 1 mph wind resolution.
   

// --------------------------------------------------------------------------------------
//   Define use of Wind Gust Spike prevention routines (mostly for FO anemometers)
// --------------------------------------------------------------------------------------
#define WindSpikeControl 1   // 0= Disable, 1= Enable method 1, 2= Enable method 2


// --------------------------------------------------------------------------------------
//   Define the source of your main outside sensors
// --------------------------------------------------------------------------------------
// ---- If you have all the sensors connected to only one TX board, always select Unit 0 as source
// ---- Define the source of your main Temperature / Humidity sensor
#define TH_OutUnit       0   // 0 for Temp/Hum sensor connected to TX_Unit 0, 1 for Temp/Hum sensor connected to TX_Unit 1
// ---- Define the source of your Main Wind sensor
#define WIND_OutUnit     0   // 0 for Wind instruments connected to TX_Unit 0, 1 for TX_Unit 1 
// ---- Define the source of your main Rain Gauge
#define RAIN_OutUnit     0   // 0 for Rain Gauge connected to TX_Unit 0, 1 for TX_Unit 1, 3 for Auriol RF Rain Gauge
// ---- Define the source of your main Solar / UV sensores
#define SRUV_OutUnit     9   // 0 for Solar Rad / UV sensors connected to TX_Unit 0, 1 for TX_Unit1, 9 for not used
// ---- Define installed Solar / UV Sensors
#define Solar_Sensor     1   // 0 for not present; 1 for present
#define UV_Sensor        1   // 0 for not present; 1 for present
#define UV_Transmission 10   // UV Transmission percentage of UV sensor cover material

// --------------------------------------------------------------------------------------
//   Extra Sensors Settings and Mapping
// --------------------------------------------------------------------------------------
// ---- Define the source and sensor number of each of the seven extra sensors, insert 9 if not used.
// ---- Source 0 (up to 3) means TX unit0, 1 means TX unit1... (sensor type SHT21 or HTU21D is number 0, sensor type SHT1x or DHT22 is number 1)
// ---- Source 6 is for OneWire sensors
// ---- Source 7 is for BIOS Sensor (Only Temp is get)
// ---- Source 8 is for Dust Density sensor. Sensor 0 is Temperature / Humidity, 1 is Dust Density / AQI
// ---- First field = Sensor source, Second field = Sensor number (0 or 1 for TX units) 
// ---- Example:
// ----                          ES0   ES1   ES2   ES3   ES4   ES5   ES6     
//#define ExtraSensors_Source { {0,1},{1,1},{9,9},{6,3},{9,9},{9,9},{9,9} }
//               {0,1} - First extra sensor (ES0), will be sensor 1 from TX unit0
//               {1,1} - Second extra sensor (ES1), will be sensor 1 from TX unit1
//               {9,9} - Third extra sensor (ES2), not used - not mapped
//               {6,3} - Fourth extra sensor (ES3), will be OneWire sensor number 3 (OneWire sensors are numbered from 0 to 3)
//
//-----                        ES0   ES1   ES2   ES3   ES4   ES5   ES6     
#define ExtraSensors_Source { {9,9},{9,9},{9,9},{9,9},{9,9},{9,9},{9,9} }

// ---- Define personalized names for each Extra sensor. Attention, maximum 8 chars
#define ExtraSensor1_Name "SENSOR 0"
#define ExtraSensor2_Name "SENSOR 1"
#define ExtraSensor3_Name "SENSOR 2"
#define ExtraSensor4_Name "SENSOR 3"
#define ExtraSensor5_Name "SENSOR 4"
#define ExtraSensor6_Name "SENSOR 5"
#define ExtraSensor7_Name "Dust/AQI"


// --------------------------------------------------------------------------------------
//   BIOS soil moisture sensor settings
// --------------------------------------------------------------------------------------
// ---- Please use the included BIOS_ID_Scanner sketch to find you BIOS Device ID
#define BiosSensor_ID 0xE   // Device ID in HEX format, or 0 not used

// --------------------------------------------------------------------------------------
//   Soil / Leaf Interface Settings and Sensors Mapping
//   (The mapping logic is the same than used with the Extra Sensors)
// --------------------------------------------------------------------------------------
// 0 = Soil Leaf Interface not used
// 1 = Soil Leaf Interface connected to a TX unit
#define SoilLeaf_Interface  0   // 0, 1, 

// ---- For Soil & Leaf data from SoilLeaf_Interface wired to a TX unit, use TX Unit number as source 
// ---- For BIOS Soil Temp / Moisture use 7 as source
// ---- To disable use 9 in both fields
//                                 S1    S2    S3    S4
#define SoilTempSensors_Source  { {9,9},{9,9},{9,9},{9,9} }
#define LeafTempSensors_Source  { {9,9},{9,9},{9,9},{9,9} }
#define SoilMoistSensors_Source { {9,9},{9,9},{9,9},{9,9} }
#define LeafWetSensors_Source   { {9,9},{9,9},{9,9},{9,9} }

// ---- Define personalized names for each Soil and Leaf sensor. Attention, maximum 8 chars
#define SoilSensor1_Name "Solo Frt"
#define SoilSensor2_Name "-"
#define SoilSensor3_Name "-"
#define SoilSensor4_Name "LagoAgua"
#define LeafSensor1_Name "Folhas  "
#define LeafSensor2_Name "1"
#define LeafSensor3_Name "2"
#define LeafSensor4_Name "4"

// Define VWC calculation method
// Method 1 applies only for VH400 soil moisture sensor
//
// METHOD 1 - Conversion from voltage to VWC (volumetric water content) is done using the piecewise regressions provided by the manufacturer 
// at http://www.vegetronix.com/Products/VH400/VH400-Piecewise-Curve.phtml 
//
// METHOD 2 - Used for any sensor which have a linear output between voltage and VWC (0V=0VWC, maxV=100VWC) .

#define VWC_CalcMethod 1

// Max and Min output voltage of the analog sensors connected to Soil / Leaf Interface
// Default value for Decagon Devices LWS Leaf Wetness Sensor (5V power): Max. Output Voltage - 1400mV (max wetness), Min Output Voltage - 530mV (dry)


//                                                  ADC1  ADC2  ADC3  ADC4  
const unsigned int AnalogSensor_MaxVoltOut[4]   = { 3000, 1395, 5000, 5000 };    // Values in miliVolts
const unsigned int AnalogSensor_MinVoltOut[4]   = {    0,  530,    0,    0 };


// --------------------------------------------------------------------------------------
//   Broadacasting settings for Wireless Display Units
// --------------------------------------------------------------------------------------
#define Relay_Data       1   // 0= Disables Data Relay, 1= Enables Data Relay


// --------------------------------------------------------------------------------------
//   Davis compatible Data Logger Settings
// --------------------------------------------------------------------------------------
#define Logger_Enable    1   // 0= Disable 1= Enable
byte ARCHIVE_PERIOD  =   5;  // Default Archive Period in Minutes (Usable values: 1, 5, 10, 15, 30)


// --------------------------------------------------------------------------------------
//   Easyweather format data Output 
// --------------------------------------------------------------------------------------
#define Easyweather_Out  0   // 0= Disable (defaut) 1= Enable


// --------------------------------------------------------------------------------------
//   Internet Settings 
// --------------------------------------------------------------------------------------
#define Enable_Internet     1                        // 1= Enable Internet connection, 0= Disable

#define SSID        "ASUS"                        // Write here your WiFi SSID 
#define PASSWORD    "************"                        // Write here your WiFi password

#define Enable_NTP          1                        // 1= Enable Sync time with NTP servers, 0= Disable
// NTP Servers:
#define timeServer "80.96.196.58"                    // timp.mcsi.ro
//#define timeServer "193.79.237.14"                 // ntp1.nl.net NTP server

#define Enable_WUupload     1                        // 1= Enable upload to Wunderground,     0= Disable
#define WUupload_period     3                        // Period in minutes between uploads to WU (avoid use less than 3 minutes) 
#define WUupload_InTemp     0                        // 1= Enable upload of Inside Temperature / Humidity, 0= Disable

// ---- Wunderground Personal Data
#define WUNDERGROUND_STATION_ID "INORTHWA13"            // Weather Underground station ID
#define WUNDERGROUND_PWD        "********"            // Weather Underground password


// --------------------------------------------------------------------------------------
//   Enable / Disable GPIO routines - General Purpose Input / Output ports
// --------------------------------------------------------------------------------------
#define UseGPIO  0   // 0=Disable, 1= Enable


// --------------------------------------------------------------------------------------
//   Test Mode : Never run a live system in test mode 
// --------------------------------------------------------------------------------------
#define TestMode    false    // false= Normal working mode, true= Test mode only (no logger, no usb connection)


// --------------------------------------------------------------------------------------
//   Hardware settings 
// --------------------------------------------------------------------------------------

// ---- Define LCD I2C address 
// Only change this if your LCD don't display any data. I2C_Scanner utility may help you to find the address of your LCD display
// Default address will work most of the times!
#define LCD_I2C_Address 0x27   


// --------------------------------------------------------------------------------------
//   SHT31 I2C Address - Default address will work most of the times!
// --------------------------------------------------------------------------------------
#define SHT31_address 0x44       // Default value is 0x44, but it can be changed to 0x45


// --------------------------------------------------------------------------------------
//   Presure Sensor Address (no need to change)
// --------------------------------------------------------------------------------------
//#define BMP085_ADDRESS 0x77    // I2C address of BMP085 or BMP180


// --------------------------------------------------------------------------------------
//   Debug helper 
// --------------------------------------------------------------------------------------
//#define PRINT_DEBUG_NTP_UPDATE    // Prints to serial monitor messages related to sync time with NTP server
//#define PRINT_DEBUG_WU_UPLOAD     // Prints to serial monitor messages related to Weather Underground upload.
//#define PRINT_DEBUG_AURIOL
//#define PRINT_DEBUG_BIOS

// ---------------------------------------------------------------------------------------------------
//     End of user configurable options
// ---------------------------------------------------------------------------------------------------
Reply
#5

Hi Jim

Please download the latest Pro2 PLUS software release, that library was missing on initial release. There are info about this on the forum, please try to keep informed:

http://www.meteocercal.info/forum/Thread...03#pid5303

http://www.meteocercal.info/forum/Thread...04#pid5304

Reply
#6

Jim,

Looking at your RX_Config.h file, I also have noted several incongruences or possible errors:


Code:
TimeChangeRule aEDT = {"AEST", First, Sun, Oct, 2, 600};   //UTC + 10 hours
Timezone myTZ(aEDT, aEST);

If you haven't defined aEST, using it on the Timezone constructor, will throw an error for sure!
For your case (no daylight saving zone), do this its enough:

Code:
TimeChangeRule aEDT = {"AEST", First, Sun, Oct, 2, 600};   //UTC + 10 hours
Timezone myTZ(aEDT, aEDT);



Code:
// --------------------------------------------------------------------------------------
//   Define the type of your Barometric Pressure Sensor
// --------------------------------------------------------------------------------------
#define Barometric_Sensor  1   // 0= BME280, 1= BMP280 2= BMP085 / BMP180


// --------------------------------------------------------------------------------------
//   Define the type of your inside Temperature / Humidity Sensor
// --------------------------------------------------------------------------------------
#define InsideTH_Sensor  0   // 0= BME280, 1= HTU21D, 2= SHT21, 3= SHT31

If you are using a BME280, define it on both places.


Are you really using this sensor?

Code:
// --------------------------------------------------------------------------------------
//   BIOS soil moisture sensor settings
// --------------------------------------------------------------------------------------
// ---- Please use the included BIOS_ID_Scanner sketch to find you BIOS Device ID
#define BiosSensor_ID 0xE   // Device ID in HEX format, or 0 not used

If not change #define BiosSensor_ID  to 0 (zero)


Every time you upgrade or do a new install, always check and edit the user configurable options at each software, often default values are not suitable to everyone.


Regards
Reply
#7

Werk,
I fixed the errors which you observed and now get the following;



Code:
Arduino: 1.7.11 (Windows 8.1), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Using library SPI in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI 

Using library VirtualWire in folder: C:\Program Files\Arduino\libraries\VirtualWire (legacy)

Using library Wire in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire 

Using library RTClib in folder: C:\Program Files\Arduino\libraries\RTClib (legacy)

Using library Time in folder: C:\Program Files\Arduino\libraries\Time (legacy)

Using library Timezone in folder: C:\Program Files\Arduino\libraries\Timezone (legacy)

Using library Timer in folder: C:\Program Files\Arduino\libraries\Timer (legacy)

Using library Adafruit_HTU21DF in folder: C:\Program Files\Arduino\libraries\Adafruit_HTU21DF (legacy)

Using library SHT21 in folder: C:\Program Files\Arduino\libraries\SHT21 (legacy)

Using library Adafruit SHT31 Library in folder: C:\Program Files\Arduino\libraries\Adafruit_SHT31 

Using library BME280 in folder: C:\Program Files\Arduino\libraries\BME280 

Using library BMP280 in folder: C:\Program Files\Arduino\libraries\BMP280 (legacy)

Using library BMP085 in folder: C:\Program Files\Arduino\libraries\BMP085 (legacy)

Using library LiquidCrystal-I2C in folder: C:\Program Files\Arduino\libraries\LiquidCrystal-I2C (legacy)

Using library TFT_ILI9341 in folder: C:\Program Files\Arduino\libraries\TFT_ILI9341 (legacy)

Using library ads7843 in folder: C:\Program Files\Arduino\libraries\ads7843 (legacy)

Using library EEPROM in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\EEPROM 

Using library ClickButton in folder: C:\Program Files\Arduino\libraries\ClickButton (legacy)

Using library SerialCommand in folder: C:\Program Files\Arduino\libraries\SerialCommand (legacy)

Using library DataFlash in folder: C:\Program Files\Arduino\libraries\DataFlash (legacy)

Using library WeeESP8266 in folder: C:\Program Files\Arduino\libraries\WeeESP8266 (legacy)



C:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=107011 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\mega -IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files\Arduino\libraries\VirtualWire -IC:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Program Files\Arduino\libraries\RTClib -IC:\Program Files\Arduino\libraries\Time -IC:\Program Files\Arduino\libraries\Timezone -IC:\Program Files\Arduino\libraries\Timer -IC:\Program Files\Arduino\libraries\Adafruit_HTU21DF -IC:\Program Files\Arduino\libraries\SHT21 -IC:\Program Files\Arduino\libraries\Adafruit_SHT31 -IC:\Program Files\Arduino\libraries\BME280 -IC:\Program Files\Arduino\libraries\BMP280 -IC:\Program Files\Arduino\libraries\BMP085 -IC:\Program Files\Arduino\libraries\LiquidCrystal-I2C -IC:\Program Files\Arduino\libraries\TFT_ILI9341 -IC:\Program Files\Arduino\libraries\ads7843 -IC:\Program Files\Arduino\hardware\arduino\avr\libraries\EEPROM\src -IC:\Program Files\Arduino\libraries\ClickButton -IC:\Program Files\Arduino\libraries\SerialCommand -IC:\Program Files\Arduino\libraries\DataFlash -IC:\Program Files\Arduino\libraries\WeeESP8266 C:\Users\JBA\AppData\Local\Temp\build2559921996831438432.tmp\WeatherDuinoPro2Plus_RX_v100_b015_12122016_test.cpp -o C:\Users\JBA\AppData\Local\Temp\build2559921996831438432.tmp\WeatherDuinoPro2Plus_RX_v100_b015_12122016_test.cpp.o 

In file included from WeatherDuinoPro2Plus_RX_v100_b015_12122016_test.ino:40:0:

C:\Users\JBA\AppData\Local\Temp\build2559921996831438432.tmp\Config_RX.h:31:21: error: 'aEST' was not declared in this scope

 Timezone myTZ(aEDT, aEST);

                     ^

Error compiling.
Reply
#8

Werk 
Please ignore my previous post as I missed the bit about the Timezone. I have since fixed it up and it compiles now but have a timeout error in the upload phase.
The message is

arvdude: stk500v2_RecieveMessage() :timeout
This line is repeated four times then
arvdude: stk500v2_getsync() : timeout communicating with programmer

Any ideas?


Thanks
Jim
Reply
#9

Do you remember the Run / Program switch? Turn it OFF for programming, then turn it ON for normal operation.

Reply
#10

Werk,

Yes I had mislabeled the switch, all Ok now.
After the opening screen it rebooted as expected, 
but is now just sitting there with the two right hand digits "W" "R". Is it waiting for the temperature? and if so it has been about twenty minutes with both led's lit
Is there an issue?
Regards
Jim
Reply




Users browsing this thread: 1 Guest(s)