×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Weather radio don't want connect

  • Posts: 1187
  • Thank you received: 370
OK, so in principle it connects and reads the values, but it runs quite often into timeout problems. With version 1.4 I've introduced caching into the firmware, which partially at least speeds up reading.

Maybe the first thing you should change: set the update period to 60 seconds (in French: Mettre à jour). It is currently set to 10 seconds. This could lead to flooding the serial connection via USB.

Typically, you experience these timeouts from long running sensor readouts. For example, reading the TSL2591 at night might take 2 seconds or more. If one of the other sensors shows similar behavior, it could be beyond the interface timeout of 5 seconds. Additionally, it seems that the serial interfaces queues requests and responses, so it might happen that after a timeout everything gets out of sync.

This is not so easy to resolve, since Arduino does not have really a concept for concurrency. So I cannot have two threads or processes in parallel, one answering requests by reading from a cache and the other one updating the cache.

I personally have very good experience with a Wemos D1, which has a WiFi interface integrated. Meanwhile I only use the WiFi connection, which is running flawlessly now for more than two weeks. With the USB interface, I had problems from time to time.

Regarding the pressure: that's intentionally, that it shows a different value than the raw value. The shown value is the calculated pressure on sea level taking the location that you have setup in KStars/INDI.

Wolfgang
3 years 9 months ago #56454

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

  • Posts: 294
  • Thank you received: 54
Sorry for not replying since yesterday, was on the road.

Since I moved to using a Wemos D1 Mini, I haven't had any problem but my Weather Radio (version 1.3) has been offline for sometime since I am (very) slowly working on finishing my observatory. I must admit that I much prefer the way Weather Radio is impletemented vs MeteoStation, based on 'firmata', which is heavier and makes difficult adding functionnality. Furthermore, I had more and more connection problems with MeteoStation, which made the change to Weather Radio a welcomed solution.

Thanks for the excellent work Wolgang.
3 years 9 months ago #56456

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

  • Posts: 294
  • Thank you received: 54
From what I vaguely remember with my Arduino Nano version of the later versions of Weather Radio, even issuing commands directly, using the serial console of the Arduino IDE, did not work well. The first command sent returned the correct info but further commands seemed to be queued somewhere and never be replied to or returned invalid data.

As far as referencing the pressure to sea level value, that's the logical thing to do.
3 years 9 months ago #56457

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

  • Posts: 50
  • Thank you received: 2
Thanks for the response with details. It's very nice.
But, My project is already assembly and if it's possible, I prefere don't retry from 0.
This is not the price of a wemos D1 mini but just I haven't the time to retry.

Like as G_Gagnon, I have a similar problem with the serial command. If i send P I have the good values but if I send just next W I have problem to receive value.

For the delay of sensor response, with the example arduino firmware, the values are instantaneous.
But, if the 5s are long, is it possible to change for 10s for example?

Also, for the 10s I have change for test but i have put 60s by default and the pb are the same.
if I succed to connect to ekos (and it's a very challange!!) the values don't change.

And for the pressure, I forgot this detail with the seal level !! thanks to explain me :)

And sorry for my bad english...I'm newbie with this language ^^

Olivier
3 years 9 months ago #56460

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

  • Posts: 50
  • Thank you received: 2
hmm I don't understand,

why, when I send the command "p" the serial monitor send me the value but if i send a new "p" the serial monitor not responding... and whatever the command send the serial monitor not responding, I must to reset arduino.
I think it's a similar problem with kstars no?

and the second send return me always an error in the text; look:

Last edit: 3 years 9 months ago by Alonso.
3 years 9 months ago #56461
Attachments:

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

  • Posts: 1187
  • Thank you received: 370
Salut Olivier,
the easiest way to drill down where the connection problem comes from is to deactivate the sensors in the firmware and stepwise re-activating them. This is directly controlled from the config.h. The INDI driver itself is flexible, you do not need to change anything there.

As soon as we know which sensor is the one creating delays, we need to check where this delay comes from. It could also be that one of the sensors is not working properly - maybe due to a wiring/soldering problem or it is simply broken.

Hope that helps. Maybe it's easier if you send me a PN here in the forum, since the details might not be of general interest.

A bientôt
Wolfgang
3 years 9 months ago #56462

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

  • Posts: 294
  • Thank you received: 54
Olivier and Wolgang,

I am not sure that there is a defective or badly connected sensor as I observed the same behavior with my Nano version but not with the Wemos version of Weather Radio.

If there is a sensor I would suspect of causing the delay, it is the TSL2591 as, depending of sky brightness, its integration time may not be negligible (600ms) and the sensor may need its integration time and gain to be adjusted a number of times in order to give a meaningful reading, particularly in darker conditions.
3 years 9 months ago #56464

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

  • Posts: 50
  • Thank you received: 2
I agree that G_Gagnon said.
If I send the example for each sensor all send me the goods values
If I send indiduino I have also the good value
But not with the weather radio firmware or indi driver

I have check all sensor one by one and it's always the same issue.
the problem start with the arduino firmware because if I send twice "p" or "w" or "v" the arduino nano block and I must to reset it.

So I think the indi driver send this letters via Serial and the arduino block.

I hope that the 1.4 fix the pb.

If I haven't the choice I will buy a wemos D1 mini to test and re solder all .

PS: when you say speak via PN how to to? Sorry I don't how to do.
My mail is "This email address is being protected from spambots. You need JavaScript enabled to view it." if you prefer :)

thanks
3 years 9 months ago #56467

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

  • Posts: 1187
  • Thank you received: 370
I cannot test it currently with my old Nano, it seems to be broken. By next weekend I can give you an update.

Wolfgang
3 years 9 months ago #56470

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

  • Posts: 1187
  • Thank you received: 370
OK, I can reproduce your problem with a Nano Every, after the second request for weather data, the Arduino seems to hang.

Let's see if I can get it fixed...

Wolfgang
3 years 9 months ago #56475

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

  • Posts: 1187
  • Thank you received: 370
Hi folks,
I think I found the problem. It looks like on some Arduinos its a problem when a function defined as String does not invoke a return.

To fix it, please correct parseInput() in weatherradio.ino to type void and correct the return value three lines below accordingly:
void parseInput() {
  // ignore empty input
  if (input.length() == 0)
    return;
...

It will be fixed in V 1.4. Here you can see this change: github.com/indilib/indi-3rdparty/pull/16...ea6beed1d7cf6980069b
Last edit: 3 years 9 months ago by Wolfgang Reissenberger.
3 years 9 months ago #56479

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

  • Posts: 50
  • Thank you received: 2
Hi Wolfgang,

Thank you to do necessary. You're very reagent wouaahhh!! So good.
I can't to test in the day but tonight i will try and I say you if it's OK.

Have a nice day

Olivier
3 years 9 months ago #56486

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

Time to create page: 0.742 seconds