×

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: 136
  • Thank you received: 9
Alright, it seems the code WORKED! I let it ran for straight 10 minutes with the fast switching relay (5 click per secs) and it does not crash like it used too (it took 10-20secs before your fix for the board to gave up). Let me try letting it run for a few hours and see what happens. Thank you so much!
Also, I can see that the "count" var in the rainsensor.h is an unsigned Interger (which will display the max value to 65k ish). And the count does not reset, it just keep adding up since the board boots up. What would happens if the counts get to 65k (which is quite frankly, not that much since a heavy rain here in Vietnam can have somewhere between 10-20k clicks, so 65k is like 4-5 big rain which is a week worth of rain on raining season here).
 
The following user(s) said Thank You: Wolfgang Reissenberger, jiberjaber
2 years 6 months ago #75580

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

  • Posts: 136
  • Thank you received: 9
Okay I think you fixed it. Thanks a heap! This got me scratched my head for weeks now.
2 years 6 months ago #75581

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

  • Posts: 1185
  • Thank you received: 370
OK, the new version 1.16 has found its way into the master and is available now in the latest sources at github.com/indilib/indi-3rdparty
2 years 6 months ago #75596

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

  • Posts: 1185
  • Thank you received: 370
Btw: the count variable is only used for bucket mode. For drop detection the frequency is calculated by intervalCount, which is typically reset to 0 once a minute. And for the bucket mode, I would question that anyone sees the overflow.
The following user(s) said Thank You: Nguyễn Trọng Minh
2 years 6 months ago #75597

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

  • Posts: 136
  • Thank you received: 9
Umh. I am using drop detection mode and the count does not resets. It just keep adds up.the drop rate is reset every cycle though
Last edit: 2 years 6 months ago by Nguyễn Trọng Minh.
2 years 6 months ago #75598

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

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

Time to create page: 1.311 seconds