× Benvenuti sul nostro forum su Sint Wind PI!

Postate qui domande o segnalate problemi / bug che riscontrate,

file errore aggiornamento swpi_logger.php

More
9 years 3 months ago - 9 years 3 months ago #5210 by simovarese
Ciao a tutti,
ho un problema con il caricamento dati su mysql.
nel dettaglio, il log del raspy da questi risultati:

************************************************************************
* Sint Wind PI 01.22.54 *
* *
* 2012-2014 by Tonino Tarsi <This email address is being protected from spambots. You need JavaScript enabled to view it.> *
* *
* System will start in 10 seconds - Press Ctrl-C to cancel *
************************************************************************
10.....9.....8.....7.....6.....5.....4.....3.....2.....1.....
[14/02/2015-16:16:35] loading plugins
[14/02/2015-16:16:35] Starting sensor reading - Sensor type is : WH1080-RFM01
[14/02/2015-16:16:35][14/02/2015-16:16:35] Checking internet connetion ...
Config Server running on port 80
[14/02/2015-16:16:35] Starting RF listening
[14/02/2015-16:16:35] Internet ok
[14/02/2015-16:16:35] Checking internet connetion ...
[14/02/2015-16:16:35] Internet ok
sab 14 feb 2015, 16.16.55, CET
[14/02/2015-16:16:55] System time adjusted from NPT server : europe.pool.ntp.org
[14/02/2015-16:16:55] Connected with IP : XXX
[14/02/2015-16:16:55] Local IP :192.168.1.4 Public IP : XXX
[14/02/2015-16:16:55] Starting General WatchDog
sab 14 feb 2015, 16.16.55, CET
[14/02/2015-16:16:55] System time adjusted from NPT server : europe.pool.ntp.org
[14/02/2015-16:16:56] Mail sent to :xxx@gmail.com
[14/02/2015-16:17:28] First data received from RFM01 station 0A43 .. processing
[14/02/2015-16:17:28] BMP085 - Temperature: 24.5 C Pressure: 965.1
[14/02/2015-16:17:28] Calculating Meteo data and statistics
[14/02/2015-16:17:39] Webcam 1 Captured : ok : ./img/webcam1_14022015-161729.jpg
[14/02/2015-16:17:39] Processing image :./img/webcam1_14022015-161729.jpg
[14/02/2015-16:17:42] Processed image :./img/webcam1_14022015-161729.jpg
[14/02/2015-16:17:42] Checking internet connetion ...
[14/02/2015-16:17:42] Internet ok
[14/02/2015-16:17:42] Sending to server ./img/webcam1_14022015-161729.jpg
[14/02/2015-16:17:42] Logging data ...
[14/02/2015-16:17:42] Data sent to server : <!DOCTYPE html>
<html style="height:100%">
<head><title> 403 Forbidden
</title></head>
<body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;">
<div style="height:auto; min-height:100%; "> <div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;">
<h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">403</h1>
<h2 style="margin-top:20px;font-size: 30px;">Forbidden
</h2>
<p>Access to this resource on the server is denied!</p>
</div></div></body></html>

[14/02/2015-16:17:42] Logging data to Wunderground ...
[14/02/2015-16:17:43] Sent file to server : webcam1_14022015-161729.jpg
[14/02/2015-16:17:43] Deleted file : ./img/webcam1_14022015-161729.jpg
[14/02/2015-16:17:43] Log to Wunderground : success
[14/02/2015-16:17:43] Uploading data ...
[14/02/2015-16:17:43] Logging data to PWS ...
[14/02/2015-16:17:44] Log to PWS : Data Logged and posted in METAR mirror.
[14/02/2015-16:17:44] Sent file to server : meteo.txt
[14/02/2015-16:17:44] Deleted file : ./meteo.txt
[14/02/2015-16:17:44] Rereading config file ..
[14/02/2015-16:17:44] Disk space left = 1048707072
[14/02/2015-16:17:44] Sleeping 585 seconds
sab 14 feb 2015, 16.17.46, CET
[14/02/2015-16:17:46] System time adjusted from NPT server : europe.pool.ntp.org
[14/02/2015-16:17:55] Logging data to Database
[14/02/2015-16:17:55] Dir: SE - Spd: 0.0 - Gst: 0.732 - Tout: 2.6 - Tin: 24.5 - Hout: 95.0 - P: 966 - Rtot: 12.0 - RDay: 11.7 - R1h: 0.6 - R24h: 12.0 - CB: 97
[14/02/2015-16:18:16] New data received from RFM01 station 0A43 .. processing
[14/02/2015-16:18:16] BMP085 - Temperature: 24.5 C Pressure: 965.2
[14/02/2015-16:18:16] Calculating Meteo data and statistics
[14/02/2015-16:18:29] Logging data to Database
[14/02/2015-16:18:29] Dir: SE - Spd: 0.0 - Gst: 0.732 - Tout: 2.6 - Tin: 24.5 - Hout: 95.0 - P: 966 - Rtot: 12.0 - RDay: 11.7 - R1h: 0.6 - R24h: 12.0 - CB: 97

inizialmente avevo creato user e password dedicati sul database...poi, pensando ci fossero problemi, ho preferito usare gli stessi dati che wordpress utilizza per aggiornare il suo database.
aprendo il file swpi_logger.php col browser, mi dava "wrong password". Cambiando i permessi del file con filezilla (ho messo 777) ora da errore 403 - forbidden

avete qualche consiglio da darmi? grazie e buon weekend a tutti.
Simo

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270
Last edit: 9 years 3 months ago by simovarese.

Please Log in to join the conversation.

More
9 years 3 months ago #5211 by tony
Brutto errore il 403.se digiti l indirizzo del logger dal browser cosa succede?

Please Log in to join the conversation.

More
9 years 3 months ago #5212 by simovarese
ciao Tony, grazie per la risposta:
403
Forbidden

Access to this resource on the server is denied!

meteozanzibar.com/swpi/swpi_logger.php

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5213 by tony
Hai php sul server?

Please Log in to join the conversation.

More
9 years 3 months ago #5214 by simovarese
direi di sì, wordpress funziona perfettamente ( www.meteozanzibar.com )

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5215 by simovarese

simovarese wrote: direi di sì, wordpress funziona perfettamente ( www.meteozanzibar.com )


oltretutto ho usato stesso host,user,pwd,db di wordpress proprio per non aver dubbi...

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5219 by asy961
forse c'è un errore nella configurazione...

prova a postare il file swpi.cfg omettendo le password

Stazione Meteo: Raspberry PI B, Sensori Vento PCE, BME280, Camera PI, Web Cam HD, Huawei K3765, Pannello Fotovoltaico 50W - 1 Batteria 12V-40Ah

Please Log in to join the conversation.

More
9 years 3 months ago #5220 by simovarese
[General]
station_name = meteoZANZIBAR.com
config_web_server = True
set_sistem_time_from_ntp_server_at_startup = True
ntp_server = europe.pool.ntp.org
reboot_at = 00:01
shutdown_at = None
shutdown_hour_before_sunset = None
location_latitude = -6.14518
location_longitude = 39.500281
location_altitude = 10.0
wifi_reset_if_down = False
config_web_server_port = 80
cloudbase_calib = 1.0
set_time_at_boot = None
wind_speed_units = kmh
ntp_url = None

[Dongle]
usedongle = False
alwaysoninternet = False
donglectrlport = /dev/ttyUSB2
dongleaudioport = /dev/ttyUSB1
dongledataport = /dev/ttyUSB0
usedonglenet = False
operator = tim
prober_timeout = 2.0
modem_baudrate = 460800
audio_baudrate = 115200
ctrl__baudrate = 9600
dialnum = *99#
pppd_path = /usr/sbin/pppd

[Security]
smspwd = admin

[DataLogging]
logdata = True
serverfile = http://www.meteozanzibar.com/swpi/swpi_logger.php

[Upload]
upload_data = True
upload_folder = /

[Sensors]
sensor_type = WH1080-RFM01
davis_error = 0
use_wind_sensor = True
number_of_measure_for_wind_dir_average = 10
windspeed_offset = 0.0
windspeed_gain = 0.6
windmeasureinterval = 5
use_bmp085 = True
use_tmp36 = False
use_dht = False
dht_type = DHT11
number_of_measure_for_wind_trend = 30
wind_trend_limit = 10.0
number_of_measure_for_wind_average_gust_calculation = 10
sensor_temp_out = Default
sensor_temp_in = Default

[Sensor_PCE-FWS20]
set_system_time_from_weatherstation = False

[Sensor_serial]
sensor_serial_port = /dev/ttyUSB0

[RFM01]
rfm01_frequenzy = 868
rfm01_band = 340
rfm01_lna = 0
rfm01_rssi = 91
[WebCam]
webcamdevice1 = /dev/video0
webcamdevice2 = None
webcamlogo = www.meteoZANZIBAR.com - info@meteozanzibar.com
sendimagestoserver = True
webcaminterval = 600
webcamdevice1captureresolution = 1280x960
webcamdevice2captureresolution = 640x480
webcamdevice1finalresolution = 1280x960
webcamdevice2finalresolution = 640x480
captureprogram = ffmpeg
sendallimagestoserver = True
delete_images_on_sd = True

[Camera]
usecameradivice = False
cameradivicefinalresolution = 800x600
gphoto2options = ,,,,,,,,,,
gphoto2options_night = ,,,,,,,,,,
reset_usb = False
clear_all_sd_cards_at_startup = False
start_camera_number = 1
gphoto2_capture_image_and_download = False
use_camera_resetter = False
camera_resetter_normaly_on = False

[CameraPI]
use_camerapi = False
camerapi_day_settings =
camerapi_night_settings =

[ftp]
ftpserver = ftp.XXX.net
ftpserverdestfolder = /img
ftpserverlogin = meteo@XXX.net
ftpserverpassowd = XXXXXXXXX
use_thread_for_sending_to_server = True

[Radio]
use_ptt = False
radiointerval = 900
radio_verbosity = only_wind
useradio = False

[Mail]
gmail_user = XXXX@gmail.com
gmail_pwd = XXXXX
mail_to = XXXXXX@gmail.com
use_mail = True
mail_ip = True

[SMS]
send_ip_by_sms = False
number_to_send = +393330000000

[WeatherUnderground]
weatherunderground_logdata = True
weatherunderground_id = IMJINIMA2
weatherunderground_password = XXXX

[PWS]
pws_logdata = True
pws_id = ZANZIBAR1
pws_password = XXXXX

[CWOP]
cwop_logdata = False
cwop_id = EW0000
cwop_password = -1
[DNSExit]
use_dnsexit = False
dnsexit_uname = user
dnsexit_pwd = pwd
dnsexit_hname = xxxx.linkpc.net

[IPCam]
ipcaminterval = 600
ipcamcfg = None
ipcamip1 = None
ipcamus1 = None
ipcampw1 = None
ipcamsn1 = None
ipcamip2 = None
ipcamus2 = None
ipcampw2 = None
ipcamsn2 = None
ipcamzzz = 0
ipcamposn = None
ipcamposne = None
ipcampose = None
ipcamposse = None
ipcamposs = None
ipcampossw = None
ipcamposw = None
ipcamposnw = None

[LayOut]
laycolortbc = FFFFFF
laycolorttc = 0000FF
laycolorbbc = FFFFFF
laycolorbtc = 0000FF

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5223 by simovarese
asy961 è grave?
:dry:

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5224 by asy961
prova a mettere

[Upload]
upload_data = True
upload_folder = /swpi

Stazione Meteo: Raspberry PI B, Sensori Vento PCE, BME280, Camera PI, Web Cam HD, Huawei K3765, Pannello Fotovoltaico 50W - 1 Batteria 12V-40Ah

Please Log in to join the conversation.

More
9 years 3 months ago #5225 by simovarese

asy961 wrote: prova a mettere

[Upload]
upload_data = True
upload_folder = /swpi


l'ftp rimanda direttamente alla cartella /swpi e funziona perfettamente. (carica il file meteo.txt e i file webcam in /img)

ma l'aggiornamento del database non avviene tramite la riga
[DataLogging]
logdata = True
serverfile = http://www.meteozanzibar.com/swpi/swpi_logger.php
?

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5226 by asy961
il file config.php sul server web l'hai configurato??

Stazione Meteo: Raspberry PI B, Sensori Vento PCE, BME280, Camera PI, Web Cam HD, Huawei K3765, Pannello Fotovoltaico 50W - 1 Batteria 12V-40Ah

Please Log in to join the conversation.

More
9 years 3 months ago #5227 by simovarese
si certo.
configurato con gli stessi parametri che ha il file wp-config.php di wordpress (user,pwd,nomedatabase,host).

#mistero

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago - 9 years 3 months ago #5228 by asy961
beh ricontrolla tutte le impostazioni di SWPI e quelle del server web e Mysql, anche la tabella in mysql che sia creata giusta....se il file meteo.txt e le foto vengono inviate.......


scusa dove è ospitato il sito?? chi è il tuo provider??

Stazione Meteo: Raspberry PI B, Sensori Vento PCE, BME280, Camera PI, Web Cam HD, Huawei K3765, Pannello Fotovoltaico 50W - 1 Batteria 12V-40Ah
Last edit: 9 years 3 months ago by asy961.

Please Log in to join the conversation.

More
9 years 3 months ago #5237 by asy961

simovarese wrote: si certo.
configurato con gli stessi parametri che ha il file wp-config.php di wordpress (user,pwd,nomedatabase,host).

#mistero



è configurato con questi parametri????


$server = "localhost"; ***
$user = "utenteFTP";
$pwd = "passwordFTP";
$db = "nomeDB_Mysql";
$swpipwd = "passwordPI";


*** a discrezione del provider che ospita il db potrebbe essere inserito un ip oppure un indirizzo

Stazione Meteo: Raspberry PI B, Sensori Vento PCE, BME280, Camera PI, Web Cam HD, Huawei K3765, Pannello Fotovoltaico 50W - 1 Batteria 12V-40Ah

Please Log in to join the conversation.

More
9 years 3 months ago - 9 years 3 months ago #5239 by simovarese

asy961 wrote:

simovarese wrote: si certo.
configurato con gli stessi parametri che ha il file wp-config.php di wordpress (user,pwd,nomedatabase,host).

#mistero



è configurato con questi parametri????


$server = "localhost"; ***
$user = "utenteFTP";
$pwd = "passwordFTP";
$db = "nomeDB_Mysql";
$swpipwd = "passwordPI";


*** a discrezione del provider che ospita il db potrebbe essere inserito un ip oppure un indirizzo


Ehm...no.

$user = "utente_DB"
$pwd = "Pwd_DB"

Ora provo con utente e Pwd dell'ftp...e ti dico!

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270
Last edit: 9 years 3 months ago by simovarese.

Please Log in to join the conversation.

More
9 years 3 months ago #5240 by simovarese
>>>AGGIORNAMENTO<<<
ho cancellato e ri-copiato i file "server"...ci avevo pastrugnato troppo.

Ho provato con user e pwd dell'ftp e, come immaginavo, non funziona.
In compenso ho scoperto che:

il file config.php è correttamente configurato in quanto i vari file php (tipo smartphone.php) se metto dati sbagliati nel config.php mi indicano

Could not connect: Access denied for user 'root'@'localhost' (using password: NO)

mentre se li metto giusti mi si aprono correttamente indicandomi 0 su ogni dato (ovvio, il db non è compilato).

resta dunque il dubbio che sia il file swpi_logger.php che non riesce a scrivere sul db...oppure che non riceve i dati dalla stazione meteo.

non so se è normale...ma aprendo da browser il file swpi_logger.php mi da

Wrong password

.

ciao e grazie a tutti per l'assistenza.
Simo

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5241 by asy961
controlla che la password del DB e SWPI sul raspberry siano giuste

Stazione Meteo: Raspberry PI B, Sensori Vento PCE, BME280, Camera PI, Web Cam HD, Huawei K3765, Pannello Fotovoltaico 50W - 1 Batteria 12V-40Ah

Please Log in to join the conversation.

More
9 years 3 months ago #5242 by simovarese

asy961 wrote: controlla che la password del DB e SWPI sul raspberry siano giuste

scusa asy961 ma dove trovo le password del DB sul raspberry?
nel file swpi.cfg non c'è nulla che riguarda il DB.

S.

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago - 9 years 3 months ago #5243 by asy961
intendevo dire che la password sul raspberry in swpi.cfg

[Security]
smspwd = admin

deve essere inserita in

$swpipwd = "passwordPI";

nel file config.php sul server web

eppoi di controllare che i dati di accesso al DB Mysql siano giusti.

inoltre potresti avere problemi di permessi di scrittura sul DB da parte del provider (che non hai ancora detto chi è) es. aruba

Stazione Meteo: Raspberry PI B, Sensori Vento PCE, BME280, Camera PI, Web Cam HD, Huawei K3765, Pannello Fotovoltaico 50W - 1 Batteria 12V-40Ah
Last edit: 9 years 3 months ago by asy961.

Please Log in to join the conversation.

More
9 years 3 months ago #5244 by simovarese

asy961 wrote: intendevo dire che la password sul raspberry in swpi.cfg

[Security]
smspwd = admin

deve essere inserita in

$swpipwd = "passwordPI";

nel file config.php sul server web

eppoi di controllare che i dati di accesso al DB Mysql siano giusti.

inoltre potresti avere problemi di permessi di scrittura sul DB da parte del provider (che non hai ancora detto chi è) es. aruba


password corretta in entrambi i file.

il mantainer è netsons.com (ho un server multidominio che ospita 5 siti web, tutti su wordpress). Il DB non può essere raggiunto dall'esterno, ma mi sembra di capire che l'aggiornamento venga fatto con un POST http su swpi_logger.php (che poi provvede dal server ad inserire i dati nel database): non è così?

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago - 9 years 3 months ago #5245 by asy961
si...dovrebbe essere cosi :( :(
a tutti funziona cosi.....se non ti funziona porbabilmente non è raggiungibile nemmeno da swpi_logger.php :( :( :(

(consiglio di aprire uno spazio web su altervista che è gratuito e provare li il tutto....li siamo sicuri che funziona!!)

Stazione Meteo: Raspberry PI B, Sensori Vento PCE, BME280, Camera PI, Web Cam HD, Huawei K3765, Pannello Fotovoltaico 50W - 1 Batteria 12V-40Ah
Last edit: 9 years 3 months ago by asy961.

Please Log in to join the conversation.

More
9 years 3 months ago #5254 by simovarese
ciao asi961 ho attivato un altro database su un dominio diverso e tutto funziona egregiamente! ora indagherò con netsons sul perchè non funzioni da loro, visto che le procedure che ho seguito sono le stesse identiche!

grazie per l'idea! a presto!
Simo

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5255 by roberto2011
prova ad impostare i diritti del file a 667 o 755 tramite filezilla

Sensori Davis +BME280 + Raspberry b+ webCam serrasanta.fleanet.it (Eremo di Serrasanta - Gualdo Tadino - 1.340 m s.l.m.)

Please Log in to join the conversation.

More
9 years 3 months ago #5257 by simovarese

roberto2011 wrote: prova ad impostare i diritti del file a 667 o 755 tramite filezilla


ciao Roberto, tutti i file e cartelle? o solo config.php e swpi_logger.php?
avevo provato con 777 ma non andava comunque...
grazie
Simo

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5258 by roberto2011
solo il file swpi_logger.php, ma se hai già provato con 777 ignora il mio consiglio.

cmq al link meteozanzibar.com/swpi/swpi_logger.php
io ricevo "Wrong password" e non 403

Sensori Davis +BME280 + Raspberry b+ webCam serrasanta.fleanet.it (Eremo di Serrasanta - Gualdo Tadino - 1.340 m s.l.m.)

Please Log in to join the conversation.

More
9 years 3 months ago #5259 by simovarese

roberto2011 wrote: cmq al link meteozanzibar.com/swpi/swpi_logger.php io ricevo "Wrong password" e non 403

ti stavo giusto scrivendo che ci avevo provato: mettendo 777 mi dava errore 403, mentre con i suoi valori standard (644) da wrong password.
Ora comunque provo con 667 o 755...vediamo come va.
Grazie
Simo

wh1080 - raspberry pi model B - BMP085 - RX RFM01 - webcam logitech C270

Please Log in to join the conversation.

More
9 years 3 months ago #5260 by roberto2011
"Wrong password" è giusto !!!
controlla swpi se continua a dare errore !

Sensori Davis +BME280 + Raspberry b+ webCam serrasanta.fleanet.it (Eremo di Serrasanta - Gualdo Tadino - 1.340 m s.l.m.)

Please Log in to join the conversation.

Time to create page: 1.123 seconds