×

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: 294
  • Thank you received: 54
BTW, I hadn't played with the "/usr/share/weatherradio/bin/weatherradio.py" file before I saw the indent issue.
The following user(s) said Thank You: Adrian
3 years 4 months ago #63259

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

  • Posts: 1185
  • Thank you received: 370
Gilles, you are absolutely right, that's the reason why serial devices do not connect!

I started a new branch that should fix the problem: weatherradio V1.9

Wolfgang
The following user(s) said Thank You: Adrian, Gilles Gagnon
3 years 4 months ago #63263

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

  • Posts: 89
  • Thank you received: 16
Super, it works great now.

Wlell done Gilles and Wolfgang.

Bloody indentation! I feel so stupid now I didn't spot it.
3 years 4 months ago #63296

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

  • Posts: 108
  • Thank you received: 4
Hi Wolfgang,

I have done it. It works fine, the sensor data appear in the indi-driver. Thanks for the good job.
As I've seen in the documentation you also incorporated a DHT temp and hum sensor. I did the same but the data are not showing up. The DHT11 works fine with separate firmware.
I tried to understand weatherradio.ino but couldn't locate the place to change or adapt. Can you help me on that?

Thank you

Gunter
3 years 4 months ago #63330

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

  • Posts: 1185
  • Thank you received: 370
Hi Gunter,
please take a look into the Firmware Configuration section of the Readme .

I assume you are familiar with the Arduino IDE. When you open the weatherradio.ino firmware, there are several header files included. All configurations should be placed in config.h:
  1. Enable DHT sensor by removing the comments from
    //#define USE_DHT_SENSOR
  2. Set the appropriate digital PIN of your Arduino where the DHT sensor is attached to and select the DHT type:
    // DHT sensor family
    #define DHTPIN 3          // Digital pin connected to the DHT sensor
    //#define DHTTYPE DHT11   // DHT 11               - Uncomment whatever type you're using!
    #define DHTTYPE DHT22     // DHT 22  (AM2302), AM2321 - Uncomment whatever type you're using!
3 years 4 months ago #63333

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

  • Posts: 108
  • Thank you received: 4
Hi Wolfgang,

thank you a lot. I have overseen the comments in line (#define USE_DHT_SENSOR)
Now it is showing up but no data and with "DHT init: false". Pin is right, typ selection too. I have a model with a resistor on the little board. ?
But anyway, thank you.
Another issue I do have with the add-on and the module activation in apache2. sudo a2enmod weatherradio fails all the time.
"ERROR: Module weatherradio does not exist!" How does a mod looks like? I do have weatherradio.conf in the right place.

best regards

Gunter
3 years 4 months ago #63345

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

  • Posts: 1185
  • Thank you received: 370
Could you post the section of your firmware that recognizes the DHT sensor? In the weather radio header file it looks like this:
#include "DHT.h"
DHT dht(DHTPIN, DHTTYPE);

DHTPIN and DHTTYPE are definitions from config.h
Hm, seems like it is not in the right place. Did you really place it under /etc/apache2/conf-available ?

Wolfgang
3 years 4 months ago #63348

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

  • Posts: 108
  • Thank you received: 4
Sorry, PIN was wrong. Now DHT 11 works fine.
{
"BME280": {
"init": true,
"Temp": 23.39,
"Pres": 1013.406,
"Hum": 33.58496
},
"DHT": {
"init": true,
"Temp": 22.2,
"Hum": 34
},
"MLX90614": {
"init": true,
"T amb": 22.77001,
"T obj": 21.97
},
"TSL2591": {
"init": true,
"Lux": 563.1393,
"Visible": 5008,
"IR": 851,
"Gain": 16,
"Timing": 0
}
}
3 years 4 months ago #63350

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

  • Posts: 108
  • Thank you received: 4
pi@allsky:/etc/apache2/conf-available $ ll
insgesamt 40
drwxr-xr-x 2 root root 4096 Nov 24 17:33 .
drwxr-xr-x 8 root root 4096 Nov 24 17:40 ..
-rw-r--r-- 1 root root 315 Apr 2 2019 charset.conf
-rw-r--r-- 1 root root 127 Jul 29 2013 javascript-common.conf
-rw-r--r-- 1 root root 3224 Apr 2 2019 localized-error-pages.conf
-rw-r--r-- 1 root root 189 Apr 2 2019 other-vhosts-access-log.conf
-rw-r--r-- 1 root root 1139 Feb 16 2020 php7.3-cgi.conf
-rw-r--r-- 1 root root 2174 Apr 2 2019 security.conf
-rw-r--r-- 1 root root 455 Apr 2 2019 serve-cgi-bin.conf
-rw-r--r-- 1 root root 215 Nov 24 17:31 weatherradio.conf
3 years 4 months ago #63351

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

  • Posts: 108
  • Thank you received: 4
pi@allsky:/etc/apache2/conf-available $ cat weatherradio.conf
Alias /weatherradio /usr/share/weatherradio/html

<Directory "/usr/share/weatherradio/html">
Options Indexes FollowSymlinks
AllowOverride None
Require all granted
AddDefaultCharset off
</Directory>
3 years 4 months ago #63352

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

  • Posts: 1185
  • Thank you received: 370
Hm, strange. What happens if you place a symbolic link into /etc/apache2/conf-enabled and restart apache:
cd /etc/apache2/conf-enabled/
ln -s ../conf-available/weatherradio.conf .
sudo systemctl restart apache2.service
3 years 4 months ago #63353

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

  • Posts: 294
  • Thank you received: 54
Regarding the "ERROR: Module weatherradio does not exist!" error, I had the same problem but, since the file has a ".conf" extension, I used the command "sudo a2enconf weatherradio" and things got working.

Hope this helps.
The following user(s) said Thank You: Wolfgang Reissenberger
3 years 4 months ago #63356

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

Time to create page: 0.441 seconds