Page 2 sur 3
Re: Weather underground (météo)
Publié : 01 mars 2016, 21:01
par vil1driver
alors le ping c'est mauvais signe.. ça sent le rasp qui n'accède plus au net..
pour les logs c'est ici
oui c'est probablement normal que tu n'ai pas UV et visibilité, beaucoup de station sur weatherUndergrounds sont faites par des particuliers..
Re: Weather underground (météo)
Publié : 01 mars 2016, 21:33
par lebdx33
mais un truc me chiffone.
Si j'ai un problème d'internet sur mon raspberry ca veut dire que je ne peux pas accéder dessus par le biais de putty, par mon téléphone (accés à distance) et par mon pc en tapant l'adresse ip fixe du raspberry+ port 8080.
Hors là je peux faire tout ça sans problème
c'est louche
voilà le log que j'ai pu récupérer
2016-03-01 21:05:00.622 LUA: (PING) ping success Tél Flavian
2016-03-01 21:05:00.626 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:05:15.572 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:06:00.520 LUA: (PING) ping success Tél Flavian
2016-03-01 21:06:00.524 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:06:08.593 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:07:00.423 LUA: (PING) ping success Tél Flavian
2016-03-01 21:07:00.427 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:07:01.572 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:07:54.574 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:08:00.941 LUA: (PING) ping success Tél Flavian
2016-03-01 21:08:00.947 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:08:47.576 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:09:00.848 LUA: (PING) ping success Tél Flavian
2016-03-01 21:09:00.852 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:09:40.595 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:10:00.750 LUA: (PING) ping success Tél Flavian
2016-03-01 21:10:00.753 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:10:33.595 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:11:00.660 LUA: (PING) ping success Tél Flavian
2016-03-01 21:11:00.664 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:11:16.478 Error: WUnderground: Error: No cities match your search query
2016-03-01 21:11:26.594 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:12:00.560 LUA: (PING) ping success Tél Flavian
2016-03-01 21:12:00.565 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:12:19.570 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:13:00.470 LUA: (PING) ping success Tél Flavian
2016-03-01 21:13:00.475 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:13:12.594 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:14:00.990 LUA: (PING) ping success Tél Flavian
2016-03-01 21:14:00.996 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:14:05.577 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:14:58.576 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:15:00.583 LUA: (PING) ping success Tél Flavian
2016-03-01 21:15:00.589 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:15:51.594 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:16:00.488 LUA: (PING) ping success Tél Flavian
2016-03-01 21:16:00.493 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:16:44.594 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:17:00.395 LUA: (PING) ping success Tél Flavian
2016-03-01 21:17:00.401 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:17:37.596 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:18:00.670 LUA: (PING) ping success Tél Flavian
2016-03-01 21:18:00.676 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:18:30.595 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:19:00.513 LUA: (PING) ping success Tél Flavian
2016-03-01 21:19:00.519 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:19:23.594 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:20:00.414 LUA: (PING) ping success Tél Flavian
2016-03-01 21:20:00.452 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:20:16.588 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:21:00.961 LUA: (PING) ping success Tél Flavian
2016-03-01 21:21:00.966 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:21:09.842 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:21:17.016 Error: WUnderground: Error: No cities match your search query
2016-03-01 21:22:00.586 LUA: (PING) ping success Tél Flavian
2016-03-01 21:22:00.591 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:22:02.595 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:22:55.595 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:23:00.440 LUA: (PING) ping success Tél Flavian
2016-03-01 21:23:00.445 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:23:48.595 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:24:00.959 LUA: (PING) ping success Tél Flavian
2016-03-01 21:24:00.964 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:24:41.595 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:25:00.861 LUA: (PING) ping success Tél Flavian
2016-03-01 21:25:00.864 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:25:34.595 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:26:00.524 LUA: (PING) ping success Tél Flavian
2016-03-01 21:26:00.528 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:26:27.586 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:27:00.366 LUA: (PING) ping success Tél Flavian
2016-03-01 21:27:00.370 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:27:20.580 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:27:58.871 (Z Stick Wave) Lighting 2 (Alarm Type)
2016-03-01 21:27:58.880 OpenZWave: Alarm Level: Secure
2016-03-01 21:27:58.880 (Z Stick Wave) Lighting 2 (Alarm Level)
2016-03-01 21:27:58.888 (Z Stick Wave) Lighting 2 (Burglar)
2016-03-01 21:27:58.895 (Z Stick Wave) Lux (Luminosité chambre)
2016-03-01 21:27:58.898 (Z Stick Wave) Temp (Température chambre)
2016-03-01 21:28:00.640 LUA: (PING) ping success Tél Flavian
2016-03-01 21:28:00.643 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:28:13.596 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:29:00.256 LUA: (PING) ping success Tél Flavian
2016-03-01 21:29:00.260 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:29:06.596 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:29:59.870 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:30:00.300 LUA: (PING) ping success Tél Flavian
2016-03-01 21:30:00.304 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:30:52.596 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:31:00.904 LUA: (PING) ping success Tél Flavian
2016-03-01 21:31:00.908 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:31:17.940 Error: WUnderground: Error: No cities match your search query
2016-03-01 21:31:45.597 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:32:00.570 LUA: (PING) ping success Tél Flavian
2016-03-01 21:32:00.574 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:32:38.597 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:33:00.411 LUA: (PING) ping success Tél Flavian
2016-03-01 21:33:00.416 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:33:31.597 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
2016-03-01 21:34:00.682 LUA: (PING) ping success Tél Flavian
2016-03-01 21:34:00.687 Error: EventSystem: Lua script error (Blockly), Name: matin_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
2016-03-01 21:34:24.597 (RFXCOM) Temp + Humidity + Baro (Sonde extérieure)
Re: Weather underground (météo)
Publié : 01 mars 2016, 21:42
par vil1driver
en fait si,
tu peux très bien avoir accès au pi et lui même accès à ton réseau, il peut pinguer ton tel pour savoir s'il est présent..
et ne pas parvenir à résoudre un nom de domaine, d'où le unknow host
www.google.fr.
as tu tenté de le configurer en ip statique dernièrement ?
Re: Weather underground (météo)
Publié : 01 mars 2016, 21:45
par lebdx33
ben depuis que je l'ai il est en ip statique
voilà ce que j'avais rentré :
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.35
netmask 255.255.255.0
gateway 192.168.1.1
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Re: Weather underground (météo)
Publié : 02 mars 2016, 08:26
par rimram31
Bonjour,
@lebdx33, ne confond pas réseau local, le fait que chez toi en 192.168.1.x "tout marche", l'accès de l'extérieur a ton réseau local, l'accès depuis ton raspberry a l'extérieur/a internet et ce que je pense être ton problème le DNS (qui tranforme un nom,
par ex. en IP "chiffre").
Si tu arrives a pinguer 192.168.1.1 (ta gateway), tu accèdes bien a ton réseau local, a pinguer une machine externe, un DNS google par ex. ping 8.8.8.8, tu accèdes bien a l'extérieur par contre si tu ne parviens pas a pinguer
c'est que tu n'as pas de DNS.
Edite le fichier /etc/resolv.conf en y mettant par ex. nameserver 8.8.8.8 (et/ou 192.168.1.1 si ta box sert de DNS
http://www.skanc.com/?p=245 Normalement ça marche sans rien faire (teste avec
) , au pire reboote ton pi.
Euh ... question subsidiaire l'editeur du forum me met systématiquement http:// devant
www.google.fr ... la raison pour laquelle j'ai encadré.
Re: Weather underground (météo)
Publié : 03 mars 2016, 20:44
par lebdx33
Bonjour,
J'i finalement fait un reset complet de mon rasp et j'ai bien l'impression que maintenant j'ai internet. Par contre, j'ai voulu mettre weather underground mais quand je regarde mes dispositifs y a rien qui apparait
est-ce normal ???
Re: Weather underground (météo)
Publié : 07 mars 2016, 08:44
par rimram31
lebdx33 a écrit :...j'ai bien l'impression que maintenant j'ai internet...
C'est mieux d'avoir une certitude

quand tu ouvres un terminal en ligne de commande que donne
Code : Tout sélectionner
sudo ping 8.8.8.8
sudo ping www.google.com
sudo ping api.wunderground.com
?
Si ça répond ... bytes from ... sur le premier tu as internet, pour les autres aussi tu as en plus un DNS qui fonctionne donc correctement configuré weatherUnderground devrait marcher.
Pour une nouvelle installation, en tout cas un premier lancement de weather underground, normal que tu n'ai rien si ça ne marche pas. Si tout est ok, au premier appel weather underground créé les dispositifs selon la station meteo, dispositifs que tu vas ensuite ajouter. Si le 1er appel ne marche pas, les dispositifs ne sont pas créés.
Re: Weather underground (météo)
Publié : 03 juin 2016, 00:38
par lipon67
Bonsoir à tous,
Le connecteur natif de Domoticz concernant WUnderground posait problème car je suis connecté à internet via un proxy. wget et curl fonctionnent parfaitement en console mais via domoticz, pas possible. Je me suis du coup rabattu sur JSON et voici ma prose :
Mon .sh permet la mise à jour de Dummy : sensors virtuels :
- Température/Humidité/Baromètre
- Vent
- Pluie
La personnalisation a lieu dans les premières lignes du fichier, le reste se fait tout seul au lancement du script.
Pour être efficace, il y a lieu de créer /home/pi/domoticz/scripts/WUndergroud.sh et de créer un cron à l'allure suivante :
crontab -e
Code : Tout sélectionner
*/15 * * * * /home/pi/domoticz/scripts/WUnderground.sh >/dev/null
Le
>/dev/null en fin de ligne permettant de renvoyer les affichages à la poubelle.
L'execution manuelle du .sh permet l'affichage d'un résultat, sympa pour le débugage.
Pensez à ajouter la ligne "
nameserver 208.67.222.222" dans votre
/etc/resolv.conf, ça peut aider pour la résolution DNS sur votre Pi.
/home/pi/domoticz/scripts/WUnderground.sh
Code : Tout sélectionner
#!/bin/bash
#Rapatriement des valeurs depuis api.wunderground.com
#Définition des paramètres de base
apikey=
pwsid=pws:ILEDEFRA196 #trouver le votre sur https://www.wunderground.com/
# A adapter selon que vous ayez paramétré une authentification
IPDomoticz=192.168.x.y:8080
#IPDomoticz=username:password@192.168.x.y:8080
# Déclaration des idx des devices créés
idxTempHumBar=1
idxVent=2
idxPluie=3
########################## NE RIEN MODIFIER EN DESSOUS DE CETTE LIGNE ###############################
#Récupération des données et isolement des variables temp/relative_hum/pressure_mb
capture=`curl -s http://api.wunderground.com/api/$apikey/conditions/q/$pwsid.json? | grep -E 'temp_c|relative_humidity|wind_dir|wind_degrees|wind_kph|wind_gust_kph|pressure_mb|feelslike_c|precip_1hr_metric|precip_today_metric' | cut -d ':' -f 2 | tr -d '"' | tr -d ','`
#Décomposition des éléments
TEMP=`echo $capture | cut -d ' ' -f 1`
HUM=`echo $capture | cut -d ' ' -f 2 | cut -d '%' -f 1`
WD=`echo $capture | cut -d ' ' -f 3`
WB=`echo $capture | cut -d ' ' -f 4`
WS=`echo $capture | cut -d ' ' -f 5`
WG=`echo $capture | cut -d ' ' -f 6`
BAR=`echo $capture | cut -d ' ' -f 7`
TEMP_R=`echo $capture | cut -d ' ' -f 8`
PLUIE_1H=`echo $capture | cut -d ' ' -f 9`
PLUIE_TOTAL=`echo $capture | cut -d ' ' -f 10`
echo "La température est de : "$TEMP" °C"
echo "L'humidité relative est de : "$HUM" %"
echo "La pression atmosphérique est de : "$BAR" hPa"
echo "Le vent vient de "$WD" à une vitesse moyenne de "$WS" km/h avec des rafales à "$WG" km/h"
echo "La température ressentie est de : "$TEMP_R" °C"
#Humidité relative : indicatif de confort (pourcentage)
# 00-040 : sec
# 40-065 : confortable
# 65-100 : humide
if [ "$HUM" -lt 40 ]; then
HUM_STAT="2"
elif [ "$HUM" -lt 65 ]; then
HUM_STAT="1"
else HUM_STAT="3"
fi
# Affichage du résultat
echo $HUM_STAT
#Pression atmosphérique : tendance météorologique
# <1000 hPa : Pluie "4"
# 1000-1010 hPa : Nuageux "3"
# 1010-1010 hPa : Partiellement nuageux "2"
# >1020 hPa : Ensoleillé "1"
if [ "$BAR" -lt 1000 ]; then
HUM_STAT="4"
elif [ "$BAR" -lt 1010 ]; then
BAR_STAT="3"
elif [ "$BAR" -lt 1020 ]; then
BAR_STAT="2"
else BAR_STAT="1"
fi
# Affichage du résultat
echo $BAR_STAT
#Mise à jour du capteur TempHumBar
curl -s "http://"$IPDomoticz"/json.htm?type=command¶m=udevice&idx="$idxTempHumBar"&nvalue=0&svalue="$TEMP";"$HUM";"$HUM_STAT";"$BAR";"$BAR_STAT
#Mise à jour du capteur Vent
curl -s "http://"$IPDomoticz"/json.htm?type=command¶m=udevice&idx="$idxVent"&nvalue=0&svalue="$WB";"$WD";"$WS";"$WG";"$TEMP";"$TEMP_R
#Mise à jour du capteur Pluie
curl -s "http://"$IPDomoticz"/json.htm?type=command¶m=udevice&idx="$idxPluie"&nvalue=0&svalue="$PLUIE_1H";"$PLUIE_TOTAL
Re: Weather underground (météo)
Publié : 25 juin 2016, 23:10
par Chris54220
je viens possez ici car j'ai un petit soucis
j'allez chercher la météo par le matériel Weather underground de Domoticz tout allez super bien jusquand aujourd'hui 22h22
ca me fait un Erreur
2016-06-25 22:53:45.013 Error: WUnderground: Invalid data received!
est meme mes scripts pour la prevision de la pluie ne fonctione plus
Re: Weather underground (météo)
Publié : 25 juin 2016, 23:28
par Neutrino
Je confirme, l'API doit être dans les choux
