×

INDI Library v1.9.0 Released (23 Apr 2021)

Major INDI Library release v1.9.0 bring significant internal changes championed by @pawel-soja to modernize core INDI Library drivers and clients. New drivers for DeepSkyDad Flat Panel & Pegasus devices plus further improvements to PCM8 drivers.

Weather radio don't want connect

  • Posts: 89
  • Thank you received: 16
Of course the Wemos D1 mini (4Mb) pro (16Mb) is flush with memory compared to the Uno (32K flash and 2K SRAM)

So if a Wemos D1 mini pro is used there will be no shortage of ram compared to the UNO.
3 months 4 weeks ago #65753

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

  • Posts: 732
  • Thank you received: 197
Adrian,
I filled a breadboard with a BME280, a DHT11, a MLX90614, a TSL2591, a RG-11, a Davis Wind sensor and a OLE display. At least on a Wemos D1 mini, serializing works fine:
{
 
  "Davis Anemometer": {
    "init": true,
    "direction": 3,
    "avg speed": 0,
    "min speed": 0,
    "max speed": 0,
    "rotations": 0
  },
 
  "Rain Sensor": {
    "init": true,
    "rainfall": 0,
    "count": 0
  },
 
  "BME280": {
    "init": true,
    "Temp": 21.08,
    "Pres": 974.0237,
    "Hum": 26.83203
  },
 
  "DHT": {
    "init": true,
    "Temp": 19.9,
    "Hum": 36
  },
 
  "MLX90614": {
    "init": true,
    "T amb": 21.01,
    "T obj": 20.55001
  },
 
  "TSL2591": {
    "init": true,
    "Lux": 1.487565,
    "Visible": 505,
    "IR": 108,
    "Gain": 32,
    "Timing": 1
  }
}

Therefore I suspect it is a memory issue or a cabling problem.

Wolfgang
TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | Moravian G2-8300 + ASI 1600mm pro | KStars/INDI on Raspberry Pi 4 with Raspbian 10
3 months 3 weeks ago #65806

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

  • Posts: 89
  • Thank you received: 16
Thanks for looking at that Wolfgang, you are very kind to do all that work.

Do you have an Uno to try with?

Like Mark I doubted my wiring so I had redone it several times before I looked at the code.

Yes, it definitely seems to be due to lack of memory on the UNO.

Options:
- Use bigger memory device, like your Wemos D1
- Limit sensors used
- Spread sensors over several microcontroller boards
- It may be possible to save some memory, so that lower powered devices can be used

The main memory hogs are the JSON calls that are copied back to a large long string. The JSON object is big and the string output to the serial port is larger.
In addition, reading about the String object suggests that it is somewhat notorious for giving memory problems.

I have been looking at the code and I am trying to get rid of the String objects and the ArduinoJSON library.

I see the same information is in three places - the basic structure storing the results for each sensor, the JSON object
and the large character buffer that is built up to send to the serial port.

I have written a shortJSON library to generate the JSON strings. I store these in a character buffer for each sensor (the memory is assigned at the start and continuously reused) I just allocated a little more characters than are needed to accomodate the sensor readings.
At the moment I call the function to update this character buffer every time
when the sensor is updated (I call it after the structure is updated eg mlxData.variable.= mlxreadCAll(object).
This is a little wasteful in processing time but the strings are just there and ready to go when they are requested.

These are just Serial.print(MLXstring); on the calls to w, p etc. from the serial console.

I have these working for davis, mlx, tsl and bme, no problem with funny output or memory shortage so far, so seems stable with less memory usage.

Before I move on to the other sensors I will see if I can get indi to talk to the new code.

I will upload the code to github so you can have a look at it.

Kind regards,

Adrian
3 months 3 weeks ago #65811

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

  • Posts: 732
  • Thank you received: 197
Is there a specific reason why you are using an Uno instead of a ESP8266 type Arduino? A Wemos D1 mini looks like significantly more powerful, has WiFi inside, is quite small and costs only a few Euros...
TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | Moravian G2-8300 + ASI 1600mm pro | KStars/INDI on Raspberry Pi 4 with Raspbian 10
3 months 3 weeks ago #65859

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

  • Posts: 14
  • Thank you received: 2
Personally, I have lots of unos and xbees lying around so I'm just trying to use them rather than buying new kit. There's something nice too about using minimal kit - the easy option for these kind of projects is always to use another raspberry pi and wireless - the cost isn't too much, but where's the fun in that? :)
3 months 3 weeks ago #65860

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

  • Posts: 89
  • Thank you received: 16
I have unos and nanos and no Wemos D1, probably should invest I suppose.

I have been using the usb cable to power the microcontroller and communicate with it (two objectives with one cable).

I bought a longer USB cable which goes to the weather station's microcontroller.
This is commected back to a raspberry pi in a nicer weather proof environment which has AC power and an ethernet connection.

The wifi from the house does not reach the garden well where the pi is and is much less reliable than the cable usually.

I did set up the pi as a wifi hotspot so that the pi zero on the skycam can communicate back, so it would be easy to use this trick with a Wemos.

Still have to get power to the pizero and have used a portable power bank 5V (lasts the whole night) and 12V DC via buck converter to 5 V,
which I can power via a 12V battery or a 12V power supply running off the mains. Suppose I could power the Wemos in a similar fashion.

Bit old fashioned with the uno, I know. Suppose I should move with the times!
3 months 3 weeks ago #65862

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

  • Posts: 89
  • Thank you received: 16
My investment has arrived a nice little Wemos No NAME D1 mini EUR 5.59, for pennies.
SSD1306 OLED 0.96", EUR 6.46.

I also discovered that you can use a slightly different oled begin call to use my old SH1106, but there are some artefacts.

Works perfectly with version 1.11 development with my hardware, (MLX90614, BME280, TSL2591, Davis anenometer, OLED)
Had to figure out that the pins have a different numbering to the arduino.
Wemos	Arduino	Connected
D0	16
D1	5	Yellow	SCL
D2	4	Green	SDA
D3	0	Purple	Anenometer Wind Speed
D4	2	
D5	14
D6	12
D7	13
D8	15	Grey	Button
Tx	1
Rx	3

So this confirms problem on older hardware is not a wireing problem but most likely a short of memory problem,
I will let it run for a few days to see if there are any crashes or bugs, that I can see.

Then I will try with the RG-11.

As promised I have developed a slim version for the arduino UNO, which is free for perusal on github, the code is very simple
but will work with the sensors above (didn't try OLED) and not crash the arduino.

Feel free to look at it if you wish
github.com/procras2/OledBME

I got it to talk with indi after I figured out the firmware version number must be surrounded by ".

Now that I see how nice the wemos is, I will try to build my next station (no leaks!) with it.

Adrian
Last edit: 3 months 3 weeks ago by procras. Reason: Forgot url
3 months 3 weeks ago #66072

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

  • Posts: 173
  • Thank you received: 3
Hello
I still have my recurring problem that causes the station to make a mistake every 1 to 2 weeks.
******************************************************************************************************
afa@NAFABox:~$ sudo service indi-weatherradio status
[sudo] Mot de passe de nafa :
● indi-weatherradio.service - INDI server for weather radio
Loaded: loaded (/etc/systemd/system/indi-weatherradio.service; enabled; vendo
Active: failed (Result: exit-code) since Fri 2021-01-15 01:19:02 CET; 3 days
Process: 1270 ExecStart=/usr/bin/indiserver -v indi_weatherradio (code=exited,
Main PID: 1270 (code=exited, status=1/FAILURE)

Warning: Journal has been rotated since unit was started. Log output is incomple
lines 1-7/7 (END)
***********************************************************************************************
do you have an idea where the problem can come from?
Can an update fix the problem?

And above all, how to update without changing the different settings made from the beginning.
I ask because it's not me who installed it and I'm still a novice in linux.

Best regards
Christophe
3 months 3 weeks ago #66097

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

  • Posts: 732
  • Thank you received: 197
Salut Christophe,
it looks like starting the indiserver fails or it fails with an exception during runtime. Have you tried to start it manually? Execute the following from a terminal and post here what happens:
/usr/bin/indiserver -v indi_weatherradio

Regarding the configurations: there are several configurations:
  • For the Arduino firmware, config.h holds the configuration of the firmware loaded onto the Arduino.
  • The INDI service stores the service configuration in .indi/Weather Radio_config.xml
  • For the web page scripts, wr_config.py holds the configuration for updating the web page data
HTH
Wolfgang
TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | Moravian G2-8300 + ASI 1600mm pro | KStars/INDI on Raspberry Pi 4 with Raspbian 10
3 months 2 weeks ago #66117

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

  • Posts: 173
  • Thank you received: 3
so here's what it looks like with the command line

nafa@NAFABox:~$ /usr/bin/indiserver -v indi_weatherradio
2021-01-18T22:28:22: startup: /usr/bin/indiserver -v indi_weatherradio
2021-01-18T22:28:22: Driver indi_weatherradio: pid=3666 rfd=3 wfd=6 efd=7
2021-01-18T22:28:22: listening to port 7624 on fd 4
2021-01-18T22:28:22: Driver indi_weatherradio: snooping on GPS Simulator.GEOGRAPHIC_COORD

does it help you understand my problem?

and I always launch it manually, the program and on a dedicated arduino only for the weather.

I think it lasts about 7 days. Is there a way to make it reboot automatically every hour at a certain time?


PS: And something out of the question, since you're so good, would it be possible to get a statistic of the nights?
so that we can know which nights were good during the year.
3 months 2 weeks ago #66141

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

  • Posts: 732
  • Thank you received: 197
Not yet, since this only shows that it is working. You should log the output so that we can find the problem.
/usr/bin/indiserver -v indi_weatherradio >> /tmp/indiserver.log
I wouldn‘t recommend it, better track down the problem. I have it running for months without a problem.

I‘m not so sure what you mean. Is this more than the recording done for the weather radio web page? Take a look at my own instance here: weather.openfuture.de/
TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | Moravian G2-8300 + ASI 1600mm pro | KStars/INDI on Raspberry Pi 4 with Raspbian 10
3 months 2 weeks ago #66144

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

  • Posts: 173
  • Thank you received: 3
Hello Wolfgang

so I restarted and typed the command line you gave me to record what happens when it disconnects.

About what I meant by "a good average night's sleep."
is that if you put the 30d tab .
Because it makes a kind of average of all, so it works for temperature, humidity and pressure.
But not for clouds and SQM, it gives you values that are not very consistent (in my opinion).

So an interesting option would be to have what are the nights when there were no clouds between 2 SQM values. Like that or could know, as an example, that during "the year" there was a certain number of nights exploitable for observation.
Or we could do the same thing with how many days in the year it was sunny, keeping the days where there were less than a certain percentage of clouds in the morning and in the evening.

I don't know if you know what I mean.

See you soon.
3 months 2 weeks ago #66178

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

Time to create page: 1.656 seconds