×

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

Bi-monthly release with minor bug fixes and improvements

Weather Radio doesn't compile cleanly and other Arduino Issues.

  • Posts: 21
  • Thank you received: 0
Hi Folks,

I've had to move out of my house for about a year for some flood repairs to take place and I really miss the observatory :(

It has a rolloff roof powered by a garage door opener.

I'm trying to set up remote operation through INDI. I've got the Rolloff.ino driver cleanly compiled and working properly on a RPi5/Arduino on my desk, but really I need weather too. I have two propblems. Firstly, the INDI control panel has difficuly distinguishing between two Arduinos. the UNO for rolloff.ino and a Nano with a weather station. Even if I can get a weather station to compile, and most of them don't, then the roof stops working and INDI struggles to work out which Arduino is which, even if I specify the port.

Secondly, even if I disconnect the roof Arduino replace the roof driver with a simulator, I can't find an Arduino weather driver that clean compiles and feeds sensor data into INDI. Weather Radio seems to be the most completely documented. It has many compile problems, but these can be overcome, I still can't get the sensor values to display on the INDI control panel. I get the follwing error:

"INDI weather radio Failed to receive full response: Timeout error. (Return code: -4). Retrying..."

It may be the json driver, which had many compile problems. I have fixed these to some extent. The 'w' command gives what appears to be a valid json string, But this is not accepted by INDI.

Any ideas gratefully received.

Kind regards

Steve
1 month 2 weeks ago #99584

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

  • Posts: 320
  • Thank you received: 42
Stephen,
About distinguishing the Arduinos. Are you using /lib/udev/rules.d/99-observatory.rules?
Example to distinguish between 2 nanos, you can then refer to them like /dev/flpFlat instead of /dev/ttyACM0.
Here 2 Arduino nanos from the same product supplier:

# DeepskyDad FP1 Flat light panel, Arduino Nano
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0058", ATTRS{serial}=="D204FE65515146544E4B2020FF0C1723", MODE="0666", SYMLINK+="flipFlat"

# DeepskyDad AF3 Focuser Arduino Nano
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0058", ATTRS{serial}=="60E1ECB651514746304B2020FF0C324F", MODE="0666", SYMLINK+="focuser"

For the roof I have an entry like:
# Arduino Uno Rolloffino Roof controller roofCtrl. Arduino SA - Arduino Uno.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0043", MODE="0666", SYMLINK+="roofCtrl"
and refer to it in INDI as /dev/roofCtrl Did not need the serial ID since it is the only Arduino uno

The rolloffino roof driver doesn't need building anymore since it is now included with the released product.

/Tom
The following user(s) said Thank You: Stephen Cookson
1 month 2 weeks ago #99592

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

  • Posts: 21
  • Thank you received: 0
Thanks Tom, that's just what need.

When I said compile I meant on the Arduino, sorry I wasn't clear. Rolloff.ino is fine, weather radio is not.

The weather radio driver also seems to be fine, just not the .ino file.

Tx

Steve.
1 month 2 weeks ago #99593

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

  • Posts: 21
  • Thank you received: 0
So the big item is that ArduinoJson v7 gives a lot of errors. When I drop back to v6 it's much better. The OLED 1306 also gives a string overflow, so it's best to leave that out. Maybe a prior version works, but I don't have the time now to test them all.
1 month 2 weeks ago #99608

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

  • Posts: 21
  • Thank you received: 0
Hi Tom,

So there was no such file. I created it using sudo -s and here is what I put in it:
# Arduino Uno Rolloffino Roof controller roofCtrl. Shown as Arduino SA - Arduino Uno.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0043", MODE="0666", SYMLINK+="roofCtrl"
 
# Arduino Nano weather/met station controller.  - Shown as QinHeng Electronics CH340 serial converter
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE="0666", SYMLINK+="metCtrl"
I restarted and it doesn't seem to make any difference. Do I need to register the file 99-observatory.rules? Or point to it in some way, or is everything in rules.d automatically registered.

Tx.

Steve.
Last edit: 1 month 2 weeks ago by Stephen Cookson.
1 month 2 weeks ago #99613

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

  • Posts: 320
  • Thank you received: 42
As far as I know nothing else is needed. The name of the file is not important, the startup procedure works through the .rules files in the directory. I think for testing you can run the starup manually with:
sudo udevadm control --reload-rules && udevadm trigger

Working with just one device plugged in at a time and just one of the two entries in the .rules file.

lsusb shows you the 2341:0043 identifying the Arduino?
ls -l /dev shows you the Arduino as /dev/ttyACM0?
There is no sign of /dev/roofCtrl?

If the one device does not show, remove it and try the other one and switch them in the rules file. You should be able to see one of the devices in the /dir and then be able to make some impact with the rules file. Once you can tell that the file is being seen and can make a difference it might be easier to figure out what is going wrong.
1 month 2 weeks ago #99621

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

  • Posts: 21
  • Thank you received: 0
So my mistake, when you do ls/dev/, I still get the old Arduino port names, which I hadn't expected, however, the new names were there. With both ports plugged in the Rolloff roof connects and the driver works as before, the weather station does not.

I have not been able to get any of the arduino-based weather stations to work at all, even without the roof.

I might have to buy the Lunatico AAG CloudWatcher Cloud Detector. What do people think? Acxtually, I think it's probably better for rain, which I think the Arduino doesn't do well and wind.

Kind regards

Steve.
1 month 2 weeks ago #99634

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

  • Posts: 320
  • Thank you received: 42
Yes if the ls -l /dev/roofCtrl you will see it just links to one of the /dev/ttyACMn connections. Same with the one assigned to the weather nano.
So hopefully you can now communicate with both drivers and not have to deal with confusion between the when making the initial connection.

I don't have anything to offer with the choice of weather station. But if I followed along right you have fixed the build errors you were having on the Arduino side and can receive JSON strings at the driver. You mentioned timeout warnings and partial strings. So you might be getting close with the Weather Radio? Assuming you are past the obvious things like baud rate settings perhaps being specific with what you are seeing and posting the logs and examples of the partial JSON strings might assist those with Weather Radio installs to understand where you are with the debugging.
There is also apparently the option of using WiFi with the Weather Radio.
github.com/indilib/indi-3rdparty/blob/ma...adme-WeatherRadio.md
The following user(s) said Thank You: Stephen Cookson
1 month 2 weeks ago #99645

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

  • Posts: 21
  • Thank you received: 0
So I'm alternating between WeatherRadio and indiduinoMETEO, they both seem to have the same problem. If I use METEOtest, all the hardware works nicely through the Serial connection. When I switch back to either of the other ones, the driver doesn't connect. Also there is nothing in the logs. I've switched on all the options I can find, like 'verbose' etc. The baud rate is set properly, but the connection tag is red. As far as I can see the difference is firmata. Indi-rolloffino also does work and that doesn't use firmata.

I feel a bit lost.

I could potentially hand-roll my own third party driver based on the indi-rolloffino driver, but it seems like a lot of hard work. That's why I'm thinking of moving away from INDI-duino to Cloudwatcher etc. And obviously there is a cost involved.

Kind regards

Steve.
1 month 2 weeks ago #99660

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

  • Posts: 21
  • Thank you received: 0
Actually, there is something in the WeatherRadio log, but not InduinoMETEO
INFO	136.229156 sec	: Session log file /home/pi/.indi/logs/2024-03-10/indi_weatherradio/indi_weatherradio_15:24:34.log
DEBUG	136.229227 sec	: Toggle Logging Level -- Driver Debug
DEBUG	136.229319 sec	: saveConfigItems
DEBUG	136.229899 sec	: Configuration successfully saved.
DEBUG	196.262588 sec	: Sending query: w
INFO	203.292517 sec	: Failed to receive full response: Timeout error. (Return code: -4). Retrying...
INFO	208.296450 sec	: Failed to receive full response: Timeout error. (Return code: -4). Retrying...
INFO	213.301532 sec	: Failed to receive full response: Timeout error. (Return code: -4). Retrying...
DEBUG	213.301593 sec	: Reading weather data from Arduino succeeded.
DEBUG	273.324881 sec	: Sending query: w
 
1 month 2 weeks ago #99667

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

  • Posts: 146
  • Thank you received: 16
Actually I'm successfully using RollOff.ino (with some modifications) with my long-standing roof controller built around a R-Pi. I've had to bring out the relevant lines and attach them to an Arduino (a Nano 33 BLE in my case) but it all works fine. I'm also using a weather input -- in my case (for now) the WeeWX driver, where the WeeWX is running on a R-Pi too (reading from a Davis thingie).

However I have a CloudWatcher, which is much more adapted to an observatory: the rain sensor is much, much more sensitive. There is a driver for that in INDI, but I want to make a new driver. The latest version of CloudWatcher includes an SQM-quality light meter. I am the author of the macOS version of the CloudWatcher app and I have agreed with Lunatico a new format for the JSON file produced by their(Windows) and my (macOS) app. This includes the SQM value too.

I want to write an are INDI driver for this but am having trouble making a build environment on macOS. Then I will have to face the problem of getting JSON data from a file instead of via TCP.

But we will get there eventually !

Cheers,
Richard

PS: I recommend Lunatico's CloudWatcher - it's sensitive and well adapted to observatory use.
The following user(s) said Thank You: Stephen Cookson
1 month 2 weeks ago #99672

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

  • Posts: 21
  • Thank you received: 0
Hi Richard,

Thanks for that.

I thought I might get a quick and dirty weather station going, but it's too hard, and doesn't really include rain, which is the must-have component.

My rolloff.ino software seems to work in a test rig, so I can start to implement that.

Then I'll go the Cloudwatcher route. Do you have the Cloudwatcher on the RPi as well?

Thanks for that,

Kind regards

Steve.
Last edit: 1 month 2 weeks ago by Stephen Cookson.
1 month 2 weeks ago #99683

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

Time to create page: 0.209 seconds