×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Weather Radio: RG11 sensor resets ESP8266 on heavy rain?

  • Posts: 1185
  • Thank you received: 370
For simplicity reasons the count variable is delivered for both types of rain sensors, bucket count and drop count. For the latter, only the eventFrequency is of relevance, count can be ignored.
The following user(s) said Thank You: Nguyễn Trọng Minh
2 years 6 months ago #75599

Please Log in or Create an account to join the conversation.

  • Posts: 136
  • Thank you received: 9
Thanks. That means even if the counter overflows the board wont crash right?
about the false positive that you said before, check to see if you are having something that cast rotating shadows over your rg11? mine have some false clicks when I put it under the annonemeter so the blades cast rotating shadows over the sensor. When I move it to clearer sky, the false alarm stops.
but mine was just some random click, not a series of click like yours. Is your cable from your rg11 to the esp long? If the cable is long, it should be in twisted pair otherwise it could be interference.
2 years 6 months ago #75604

Please Log in or Create an account to join the conversation.

  • Posts: 1185
  • Thank you received: 370
Right, the overflow will not create a crash, the counter is simply ignored for drop counting. There is one function evaluates the interval counter and calculates both rainVolume and eventFrequency. It does not distinguish between drop and bucket count. The differentiation comes through the serialization function, that creates a JSON document:
void serializeRainSensor(JsonObject &doc, rainsensor_data &data, String name) {
  JsonObject json = doc.createNestedObject(name);
  json["init"] = data.status;
  json["mode"] = data.mode == 0 ? "tipping bucket" : "drop detect";
  if (data.status) {
    json["count"] = data.count;     // only relevant in tipping bucket mode
   if (data.mode == 0) {
      json["rain volume"] = data.rainVolume;
   } else {
      json["drop freq"] = data.eventFrequency;
   }
 }
}
The count value is only for debugging purposes so that you can check whether an event has been recognized - nothing more.
The following user(s) said Thank You: Nguyễn Trọng Minh
2 years 6 months ago #75605

Please Log in or Create an account to join the conversation.

  • Posts: 1185
  • Thank you received: 370
And good point about the false positives, it could be that the evening sun casts some rapid shadow movements since it shines through the tree.
2 years 6 months ago #75606

Please Log in or Create an account to join the conversation.

  • Posts: 333
  • Thank you received: 23
Sorry for the OT.
I have throubles to have working weatherradio with its webinterface using an old Rpi model B+.
Seems that some python modules required by the scripts, are missing.
I use last raspbianos. I remeber a discussion about these problems, but I can not find it
2 years 6 months ago #76023

Please Log in or Create an account to join the conversation.

  • Posts: 1185
  • Thank you received: 370
Maybe the easiest is sending me a message and we have a direct chat.
The following user(s) said Thank You: ALESSANDRO PENSATO
2 years 6 months ago #76025

Please Log in or Create an account to join the conversation.

  • Posts: 333
  • Thank you received: 23
First of all

Indi packages works on this system?

processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2835
Revision : 000e
Serial : 0000000022f30029
Model : Raspberry Pi Model B Rev 2


if i run /usr/bin/indiserver -v indi_weatherradio it return me Segmentation fault
2 years 6 months ago #76028

Please Log in or Create an account to join the conversation.

  • Posts: 1185
  • Thank you received: 370
Never tried it. I know it works on RPi-zero, RPi 3b and 4b.
2 years 6 months ago #76029

Please Log in or Create an account to join the conversation.

  • Posts: 333
  • Thank you received: 23
I was able to install packages but then they does not work.
I need to obtain weather radio also with GPS that can be connected to two different raspberry with its astrosetup. This can be do using a wireless devices like Wemos, but this kind of device does not supports the library for the TSL237.
2 years 6 months ago #76030

Please Log in or Create an account to join the conversation.

  • Posts: 1185
  • Thank you received: 370
Have you tried to compile them?
2 years 6 months ago #76031

Please Log in or Create an account to join the conversation.

  • Posts: 333
  • Thank you received: 23
No I used pkg from ppa.stellarmate.com, I could try to build from source to adapt they to my old Rpi
2 years 6 months ago #76032

Please Log in or Create an account to join the conversation.

  • Posts: 333
  • Thank you received: 23
cmake -DCMAKE_INSTALL_PREFIX=/usr - DCMAKE_BUILD_TYPE=Debug ~/Projects/indi-3rdparty/indi-duino
-- The CXX compiler identification is GNU 8.3.0
-- The C compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found INDI: /usr/lib/arm-linux-gnueabihf/libindidriver.so;/usr/lib/arm-linux- gnueabihf/libindiAlignmentDriver.so (found version "1.7.5")
-- Found CURL: /usr/lib/arm-linux-gnueabihf/libcurl.so (found version "7.64.0")
-- Performing Test COMPATIBLE_FORTIFY_SOURCE
-- Performing Test COMPATIBLE_FORTIFY_SOURCE - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/Projects/build/indi-duino
pi@raspberrypi:~/Projects/build/indi-duino $ make -j4
Scanning dependencies of target indi_weatherradio
Scanning dependencies of target firmata
[ 10%] Building CXX object CMakeFiles/firmata.dir/libfirmata/src/arduino.cpp.o
[ 10%] Building CXX object CMakeFiles/firmata.dir/libfirmata/src/firmata.cpp.o
[ 15%] Building CXX object CMakeFiles/indi_weatherradio.dir/gason/gason.cpp.o
[ 20%] Building CXX object CMakeFiles/indi_weatherradio.dir/weatherradio.cpp.o
[ 25%] Linking CXX static library libfirmata.a
[ 25%] Built target firmata
Scanning dependencies of target blink_pin
Scanning dependencies of target indi_duino
Scanning dependencies of target read_digital_pin
[ 30%] Building CXX object CMakeFiles/blink_pin.dir/libfirmata/examples/blink_pi n.cpp.o
[ 35%] Building CXX object CMakeFiles/read_digital_pin.dir/libfirmata/examples/r ead_digital_pin.cpp.o
[ 40%] Building CXX object CMakeFiles/indi_duino.dir/indiduino.cpp.o
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp: In member function ‘virtual bool WeatherRadio::updateProperties()’:
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:207:13: error: ‘defi neProperty’ was not declared in this scope
defineProperty(&temperatureCalibrationNP);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:207:13: note: sugges ted alternative: ‘deleteProperty’
defineProperty(&temperatureCalibrationNP);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:225:13: error: ‘defi neProperty’ was not declared in this scope
defineProperty(&humidityCalibrationNP);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:225:13: note: sugges ted alternative: ‘deleteProperty’
defineProperty(&humidityCalibrationNP);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:240:17: error: ‘defi neProperty’ was not declared in this scope
defineProperty(&sqmCalibrationNP);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:240:17: note: sugges ted alternative: ‘deleteProperty’
defineProperty(&sqmCalibrationNP);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:271:13: error: ‘defi neProperty’ was not declared in this scope
defineProperty(&windDirectionCalibrationNP);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:271:13: note: sugges ted alternative: ‘deleteProperty’
defineProperty(&windDirectionCalibrationNP);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:297:13: error: ‘defi neProperty’ was not declared in this scope
defineProperty(&wetnessCalibrationNP);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:297:13: note: sugges ted alternative: ‘deleteProperty’
defineProperty(&wetnessCalibrationNP);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:301:13: error: ‘defi neProperty’ was not declared in this scope
defineProperty(&rawDevices);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:301:13: note: sugges ted alternative: ‘deleteProperty’
defineProperty(&rawDevices);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:308:9: error: ‘defin eProperty’ was not declared in this scope
defineProperty(&resetArduinoSP);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:308:9: note: suggest ed alternative: ‘deleteProperty’
defineProperty(&resetArduinoSP);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:344:29: error: ‘Weat herInterface’ has not been declared
for (int i = 0; i < WeatherInterface::ParametersNP.nnp; i++)
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:346:18: error: ‘Weat herInterface’ has not been declared
free(WeatherInterface::ParametersN.aux0);
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:347:18: error: ‘Weat herInterface’ has not been declared
free(WeatherInterface::ParametersN.aux1);
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:348:18: error: ‘Weat herInterface’ has not been declared
free(WeatherInterface::ParametersRangeNP.np);
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:351:14: error: ‘Weat herInterface’ has not been declared
free(WeatherInterface::ParametersN);
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:352:9: error: ‘Weath erInterface’ has not been declared
WeatherInterface::ParametersN = nullptr;
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:353:9: error: ‘Weath erInterface’ has not been declared
WeatherInterface::ParametersNP.nnp = 0;
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:354:13: error: ‘Weat herInterface’ has not been declared
if (WeatherInterface::ParametersRangeNP != nullptr)
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:356:13: error: ‘Weat herInterface’ has not been declared
WeatherInterface::ParametersRangeNP->nnp = 0;
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:357:18: error: ‘Weat herInterface’ has not been declared
free(WeatherInterface::ParametersRangeNP);
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:358:13: error: ‘Weat herInterface’ has not been declared
WeatherInterface::ParametersRangeNP = nullptr;
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:360:9: error: ‘Weath erInterface’ has not been declared
WeatherInterface::nRanges = 0;
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:362:14: error: ‘Weat herInterface’ has not been declared
free(WeatherInterface::critialParametersL);
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:363:9: error: ‘Weath erInterface’ has not been declared
WeatherInterface::critialParametersL = nullptr;
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:364:9: error: ‘Weath erInterface’ has not been declared
WeatherInterface::critialParametersLP.nlp = 0;
^~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp: In member function ‘IPState WeatherRadio::getBasicData()’:
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:413:5: error: ‘defin eProperty’ was not declared in this scope
defineProperty(&FirmwareInfoTP);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:413:5: note: suggest ed alternative: ‘deleteProperty’
defineProperty(&FirmwareInfoTP);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp: In member function ‘IPState WeatherRadio::handleFirmwareConfig(JsonValue)’:
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:556:9: error: ‘defin eProperty’ was not declared in this scope
defineProperty(&FirmwareConfigTP);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:556:9: note: suggest ed alternative: ‘deleteProperty’
defineProperty(&FirmwareConfigTP);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp: In member function ‘void WeatherRadio::addSensorSelection(ISwitchVectorProperty*, std::vector<Weath erRadio::sensor_name>, const char*, const char*)’:
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:626:5: error: ‘defin eProperty’ was not declared in this scope
defineProperty(sensor);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:626:5: note: suggest ed alternative: ‘deleteProperty’
defineProperty(sensor);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp: In member function ‘virtual bool WeatherRadio::ISNewText(const char*, const char*, char**, char**, int)’:
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:648:36: error: ‘DEVI CE_ADDRESS’ is not a member of ‘INDI::SP’
if (strcmp(name, INDI::SP::DEVICE_ADDRESS) == 0)
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:648:36: note: sugges ted alternative: ‘DEVICE_TCP_ADDRESS’
if (strcmp(name, INDI::SP::DEVICE_ADDRESS) == 0)
^~~~~~~~~~~~~~
DEVICE_TCP_ADDRESS
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp: In member function ‘void WeatherRadio::handleWeatherData(JsonValue)’:
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:1059:21: error: ‘def ineProperty’ was not declared in this scope
defineProperty(deviceProp);
^~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:1059:21: note: sugge sted alternative: ‘deleteProperty’
defineProperty(deviceProp);
^~~~~~~~~~~~~~
deleteProperty
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp: In member function ‘bool WeatherRadio::receiveSerial(char*, int*, char, int)’:
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:1514:22: error: ‘TTY _PORT_BUSY’ was not declared in this scope
int returnCode = TTY_PORT_BUSY;
^~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/weatherradio.cpp:1514:22: note: sugge sted alternative: ‘TTY_PORT_FAILURE’
int returnCode = TTY_PORT_BUSY;
^~~~~~~~~~~~~
TTY_PORT_FAILURE
[ 45%] Linking CXX executable blink_pin
[ 50%] Linking CXX executable read_digital_pin
[ 50%] Built target blink_pin
[ 50%] Built target read_digital_pin
Scanning dependencies of target read_string
Scanning dependencies of target read_analog_pin
[ 55%] Building CXX object CMakeFiles/read_string.dir/libfirmata/examples/read_s tring.cpp.o
[ 60%] Building CXX object CMakeFiles/read_analog_pin.dir/libfirmata/examples/re ad_analog_pin.cpp.o
/home/pi/Projects/indi-3rdparty/indi-duino/indiduino.cpp: In member function ‘vi rtual void indiduino::TimerHit()’:
/home/pi/Projects/indi-3rdparty/indi-duino/indiduino.cpp:277:46: error: ‘getCurr entPollingPeriod’ was not declared in this scope
time_t max_delay = static_cast<time_t>(5*getCurrentPollingPeriod() < 30000 ? 30 : 5*getCurrentPollingPeriod()/1000);
^~~~~~~~~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/indiduino.cpp:277:46: note: suggested alternative: ‘setDefaultPollingPeriod’
time_t max_delay = static_cast<time_t>(5*getCurrentPollingPeriod() < 30000 ? 30 : 5*getCurrentPollingPeriod()/1000);
^~~~~~~~~~~~~~~~~~~~~~~
setDefaultPollingPeriod
/home/pi/Projects/indi-3rdparty/indi-duino/indiduino.cpp: In member function ‘bo ol indiduino::setPinModesFromSKEL()’:
/home/pi/Projects/indi-3rdparty/indi-duino/indiduino.cpp:935:29: error: ‘getCurr entPollingPeriod’ was not declared in this scope
sf->setSamplingInterval(getCurrentPollingPeriod() / 2);
^~~~~~~~~~~~~~~~~~~~~~~
/home/pi/Projects/indi-3rdparty/indi-duino/indiduino.cpp:935:29: note: suggested alternative: ‘setDefaultPollingPeriod’
sf->setSamplingInterval(getCurrentPollingPeriod() / 2);
^~~~~~~~~~~~~~~~~~~~~~~
setDefaultPollingPeriod
make[2]: *** [CMakeFiles/indi_weatherradio.dir/build.make:76: CMakeFiles/indi_we atherradio.dir/weatherradio.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:112: CMakeFiles/indi_weatherradio.dir/all] Er ror 2
make[1]: *** Attesa per i processi non terminati....
make[2]: *** [CMakeFiles/indi_duino.dir/build.make:63: CMakeFiles/indi_duino.dir /indiduino.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:139: CMakeFiles/indi_duino.dir/all] Error 2
[ 65%] Linking CXX executable read_analog_pin
[ 70%] Linking CXX executable read_string
[ 70%] Built target read_string
[ 70%] Built target read_analog_pin
make: *** [Makefile:130: all] Error 2
2 years 6 months ago #76047

Please Log in or Create an account to join the conversation.

Time to create page: 0.879 seconds