×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Weather radio don't want connect

  • 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.

  • Posts: 108
  • Thank you received: 4
I did it already but no effect:
looks like this:
wxr-xr-x 2 root root 4096 Nov 24 17:43 .
drwxr-xr-x 8 root root 4096 Nov 24 19:27 ..
lrwxrwxrwx 1 root root 30 Mär 12 2020 charset.conf -> ../conf-available/charset.conf
lrwxrwxrwx 1 root root 44 Mär 12 2020 localized-error-pages.conf -> ../conf-available/localized-error-pages.conf
lrwxrwxrwx 1 root root 46 Mär 12 2020 other-vhosts-access-log.conf -> ../conf-available/other-vhosts-access-log.conf
lrwxrwxrwx 1 root root 31 Mär 12 2020 security.conf -> ../conf-available/security.conf
lrwxrwxrwx 1 root root 36 Mär 12 2020 serve-cgi-bin.conf -> ../conf-available/serve-cgi-bin.conf
lrwxrwxrwx 1 root root 35 Nov 24 17:43 weatherradio.conf -> ../conf-available/weatherradio.conf

now the restart apache service:

no error, but access to the webpage.

pi@allsky:/etc/apache2/conf-enabled $ sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-11-24 19:30:20 CET; 2min 24s ago
Docs: httpd.apache.org/docs/2.4/
Process: 5221 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 5225 (apache2)
Tasks: 55 (limit: 4915)
CGroup: /system.slice/apache2.service
├─5225 /usr/sbin/apache2 -k start
├─5226 /usr/sbin/apache2 -k start
└─5227 /usr/sbin/apache2 -k start

Nov 24 19:30:20 allsky systemd[1]: Starting The Apache HTTP Server...
Nov 24 19:30:20 allsky apachectl[5221]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1.
Nov 24 19:30:20 allsky systemd[1]: Started The Apache HTTP Server.

mods-enabled:

pi@allsky:/etc/apache2/mods-enabled $ ll
insgesamt 8
drwxr-xr-x 2 root root 4096 Mär 12 2020 .
drwxr-xr-x 8 root root 4096 Nov 24 19:27 ..
lrwxrwxrwx 1 root root 36 Mär 12 2020 access_compat.load -> ../mods-available/access_compat.load
lrwxrwxrwx 1 root root 28 Mär 12 2020 alias.conf -> ../mods-available/alias.conf
lrwxrwxrwx 1 root root 28 Mär 12 2020 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root 33 Mär 12 2020 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root 33 Mär 12 2020 authn_core.load -> ../mods-available/authn_core.load
lrwxrwxrwx 1 root root 33 Mär 12 2020 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root 33 Mär 12 2020 authz_core.load -> ../mods-available/authz_core.load
lrwxrwxrwx 1 root root 33 Mär 12 2020 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root 33 Mär 12 2020 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root 32 Mär 12 2020 autoindex.conf -> ../mods-available/autoindex.conf
lrwxrwxrwx 1 root root 32 Mär 12 2020 autoindex.load -> ../mods-available/autoindex.load
lrwxrwxrwx 1 root root 30 Mär 12 2020 deflate.conf -> ../mods-available/deflate.conf
lrwxrwxrwx 1 root root 30 Mär 12 2020 deflate.load -> ../mods-available/deflate.load
lrwxrwxrwx 1 root root 26 Mär 12 2020 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root 26 Mär 12 2020 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root 26 Mär 12 2020 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root 29 Mär 12 2020 filter.load -> ../mods-available/filter.load
lrwxrwxrwx 1 root root 27 Mär 12 2020 mime.conf -> ../mods-available/mime.conf
lrwxrwxrwx 1 root root 27 Mär 12 2020 mime.load -> ../mods-available/mime.load
lrwxrwxrwx 1 root root 32 Mär 12 2020 mpm_event.conf -> ../mods-available/mpm_event.conf
lrwxrwxrwx 1 root root 32 Mär 12 2020 mpm_event.load -> ../mods-available/mpm_event.load
lrwxrwxrwx 1 root root 34 Mär 12 2020 negotiation.conf -> ../mods-available/negotiation.conf
lrwxrwxrwx 1 root root 34 Mär 12 2020 negotiation.load -> ../mods-available/negotiation.load
lrwxrwxrwx 1 root root 33 Mär 12 2020 reqtimeout.conf -> ../mods-available/reqtimeout.conf
lrwxrwxrwx 1 root root 33 Mär 12 2020 reqtimeout.load -> ../mods-available/reqtimeout.load
lrwxrwxrwx 1 root root 31 Mär 12 2020 setenvif.conf -> ../mods-available/setenvif.conf
lrwxrwxrwx 1 root root 31 Mär 12 2020 setenvif.load -> ../mods-available/setenvif.load
lrwxrwxrwx 1 root root 29 Mär 12 2020 status.conf -> ../mods-available/status.conf
lrwxrwxrwx 1 root root 29 Mär 12 2020 status.load -> ../mods-available/status.load
3 years 4 months ago #63360

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

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

what you write is exactly what the docs are saying, but this doesn’t work. Do you mean eventually I should use:

Sudo a2enmod Weatherradio.conf ?
3 years 4 months ago #63362

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

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

sudo a2enconf weatherradio
Conf weatherradio already enabled
3 years 4 months ago #63363

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

  • Posts: 108
  • Thank you received: 4
done, I had to delete the manual symlink and did the a2enconf ..

sudo rm weatherradio.conf
pi@allsky:/etc/apache2/conf-enabled $ sudo a2enconf weatherradio
Enabling conf weatherradio.
To activate the new configuration, you need to run:
systemctl reload apache2
pi@allsky:/etc/apache2/conf-enabled $ systemctl reload apache2
3 years 4 months ago #63364

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

Time to create page: 0.686 seconds