×

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

Bi-monthly release with minor bug fixes and improvements

Weather Radio: Can't connect to Leonardo

  • Posts: 989
  • Thank you received: 161
I use an Arduino UNO based DIY SQM. It connects via USB to the Indi server. Basically it works well with the existing driver. The issue that I have is this: The darker the sky, the longer it takes the device to reply to "rx" commands. Launching minicom -D /dev/ttyUSB0 allows communicating to the device directly. If I type rx in minicom, the device will reply something like

"r, 11.42m,0000005915Hz,0000000000c,0000000.000s, 028.3C" within less than a second. However, if I somewhat cover the SQM's sensor and type rx again, it will reply

"r, 20.32m,0000005915Hz,0000000000c,0000000.000s, 029.1C" after ca. 11 seconds

The maximum polling period I can set in the Indi panel is 2999ms. If I set higher values Indi will display a warning:
"[WARNING] Make sure SQM web timeout is configured for 3 seconds or more. Otherwise SQM will disconnect prematurely."

The debug log looks like this:

DEBUG 3544.616234 sec : CMD <rx>
DEBUG 3545.930298 sec : RES <r, 10.83m,0000005915Hz,0000000000c,0000000.000s, 027.7C> <--- sqm 10.8, response time 1,3s
DEBUG 3555.940458 sec : CMD <rx>
DEBUG 3557.496803 sec : RES <r, 16.68m,0000005915Hz,0000000000c,0000000.000s, 027.7C> <--- sqm 16.7, response time 1,6s
[...]
DEBUG 3649.714789 sec : CMD <rx>
DEBUG 3651.507324 sec : RES <r, 17.62m,0000005915Hz,0000000000c,0000000.000s, 027.9C> - sqm 17.6 after 1,8s
DEBUG 3661.517468 sec : CMD <rx>
DEBUG 3664.083262 sec : RES <r, 19.01m,0000005915Hz,0000000000c,0000000.000s, 028.0C> - sqm 19.0 after 2,6s

higher sqm values that need response times of 3s or more trigger a timeout error:
DEBUG 3737.404237 sec : CMD <rx>
ERROR 3740.407647 sec : Serial read error: Timeout error.

Setting the polling period to values higher than 2999ms doesn't change the situation as the driver will always report a timeout error after 3 seconds.

What I would like to have is a driver that simply polls the SQM once a minute by sending "rx" and waits for the reply up to 60s before sending the next "rx". Unfortunately I am not able to modify the existing driver to achieve this. To be clear, what I am asking for is not the existing driver to be modified. Just another, more simple "DIY-SQM" driver derived from the existing one. Would this be possible?
Last edit: 7 months 3 days ago by Alfred.
7 months 3 days ago #95921

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

  • Posts: 152
  • Thank you received: 20
Hi Alfred, I have solved this issue: Instead on single-code Arduino, use dual-core ESP32 and rewrite the SQM code
7 months 2 days ago #95936

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

  • Posts: 334
  • Thank you received: 23
ok but TSL237 sensor is not compatible with esp32, you can use TSL2591, that i not the same as precision
7 months 2 days ago #95937

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

  • Posts: 152
  • Thank you received: 20
I am using TSL2591 and it is precise enough. My SQM is able to measure the same values as SQM from Unihedron, with tolerance 10%
7 months 2 days ago #95938

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

  • Posts: 989
  • Thank you received: 161
Thanks a lot for your replies, Hades and Alessandro! Hades, this would require me to build another SQM. I'd prefer using the one that is already here. I believe the existing Indi driver needs just minor modifications to allow for longer than 3s reply times.
Last edit: 7 months 2 days ago by Alfred.
7 months 2 days ago #95951

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

  • Posts: 334
  • Thank you received: 23
I use WeatherRadio project and it does not have problem with timing and SQM near 21.60
The following user(s) said Thank You: Alfred
7 months 2 days ago #95953

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

  • Posts: 989
  • Thank you received: 161

This did the trick! Thanks a lot, Alessandro! I uploaded the Weatherradio sketch and it works!
Last edit: 7 months 1 day ago by Alfred.
7 months 1 day ago #95967

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

  • Posts: 989
  • Thank you received: 161
Today I stumbled upon an issue with my weather radio setup.

I run a simple system (derived from RDBeck's DIY SQM "box"): Leonardo + TSL2591 + DHT22.



Since I like this box quite a bit, I thought it was a good idea to make a few more of them as presents for astro friends. So I built another two Leonardo+TSL+DHT boxes and uploaded the same sketch that has been working nicely for me so far. To my utter astonishment the two new boxes did not work. When I try to connect to them, the RX diode lights up and nothing happens. It doesn't matter whether an Indi driver or a serial monitor is used. Any attempt to connect ends with the RX LED on forever.

Interesting:
1. When I use the *old* TSL instead of the new ones, the new box works! When I use any one of the new TSLs, it does not.
2. When I successfully start the box with the old TSL connected and (while the box keeps running) I swap a new TSL in, the box still works. It keeps sending temperature/humidity/SQM data. As soon as I press reset or disconnect/reconnect, the RX diode will light up and block everything again.
3. When I upload the (Arduino IDE-supplied) "Examples/TSL2591 library/TSL2591" sketch, all box/TSL combinations do work right from the start.

So the issue only occurs when the weather radio sketch AND a new TSL is used. Any ideas what might go wrong? Is there anything that I could try to hunt this bug down? Thanks a lot for suggestions/hints!
Last edit: 5 months 6 days ago by Alfred.
5 months 1 week ago #97280
Attachments:

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

Time to create page: 0.700 seconds