Aller au contenu

Sakkhho

Membres confirmés
  • Compteur de contenus

    3 699
  • Inscription

  • Dernière visite

  • Jours gagnés

    17

Tout ce qui a été posté par Sakkhho

  1. merci c'est mieux l'outil de graph refonctionne et sur la donnée "eau" je reste en PLEASE WAIT. Pas assez de données encore ? il y a quand meme 1 jour de décalage, car j'ai 32 lignes de conso dans l'excel que je récupère de veolia. tu peux me dire comment supprimer la ligne de la crontab ? et ou comment l'editer ? pour la variable dans la HC2 j'ai mis à la fin du .sh les lignes (avec la bonne ip et le bon login password) mais j'obtiens ca curl: (6) Could not resolve host: "ConsoEau", curl: (6) Could not resolve host: "value" curl: (3) [globbing] unmatched close brace/bracket in column 6 {"name":"ConsoEau","value":"0","readOnly":false,"isEnum":false,"created":1433573596,"modified":1433573596} merci en tout cas pour ce tuto, c'est vraiment cool
  2. J'ai tout refait en mettant en config sudo au lieu de local::lib et ca semble bon. Sam 6 jui 2015 08:42:53 CEST % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 37476 0 37476 0 0 38889 0 --:--:-- --:--:-- --:--:-- 38875 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 75 0 0 100 75 0 194 --:--:-- --:--:-- --:--:-- 194 0 0 0 17486 0 0 18754 0 --:--:-- --:--:-- --:--:-- 143k % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 28506 0 28506 0 0 10550 0 --:--:-- 0:00:02 --:--:-- 10549 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 36596 0 36596 0 0 25063 0 --:--:-- 0:00:01 --:--:-- 25065 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 6656 100 6656 0 0 18219 0 --:--:-- --:--:-- --:--:-- 18235 Now reading "conso-20150606.xls" as CP850. The spreadsheet has been converted to UTF-8 and saved as "conso.xls.csv". {"success":true,"rowcount":31} pour le get_data.php, j'ai un doute sur comment modifier le fichier j'ai fait ca, c'est ok? require 'config.inc.php'; try { $bdd = new PDO('mysql:host='.$server.';dbname='.$database, $login, $password); if ( isset($_GET['query']) && $_GET['query']=='dataserie' ) { if (substr($_GET['type'], -4) == '_day') { $sql = $bdd->prepare('SELECT UNIX_TIMESTAMP(date)*1000 AS time, avg_value FROM domotique_'.$_GET['type'].' WHERE device_id = :device'); $sql->execute(array( 'device' => $_GET['device']) if ( $_GET['type'] == 'water_day' ) $sql = $bdd->prepare('SELECT UNIX_TIMESTAMP(date)*1000 AS time, value FROM domotique_'.$_GET['type'].' WHERE device_id = :device ORDER BY time'); else $sql = $bdd->prepare('SELECT UNIX_TIMESTAMP(date)*1000 AS time, avg_value FROM domotique_'.$_GET['type'].' WHERE device_id = :device ORDER BY time'); ); } else { $sql = $bdd->prepare('SELECT UNIX_TIMESTAMP(time)*1000 AS time, value FROM domotique_'.$_GET['type'].' WHERE device_id = :device AND time >= DATE_SUB(curdate(), INTERVAL :interval DAY)'); $sql->execute(array( 'device' => $_GET['device'], 'interval' => $interval) ); } $datas = $sql->fetchAll(PDO::FETCH_NUM); echo $_GET['callback'] . '(' . json_encode($datas, JSON_NUMERIC_CHECK) . ');'; } } catch(Exception $e) { die('Erreur : '.$e->getMessage()); } ?> EDIT --> surement pas car l'outil de graph est KO EDIT2 --> en fait l'outil est KO meme en remettant le get data d'origine - faut que je regarde le reste Pour la crontab une fois exexcuté ca me donne : iMac-de-Sakkhho:~ Sakkhho$ crontab -e crontab: no crontab for Sakkkhho - using an empty one crontab: installing new crontab je pense que c'est bon. A quelle heure ca va se lancer ? il y a un moyen de regarder si c'est bon ? J'ai aussi verifié la base sql et c'est top j'ai bien les valeurs il me manque 1 jour par contre, l'extract veolia me donne jusqu'au 4 juin, dans la base je m'arrete au 3 juin
  3. pourtant cpan[15]> install Locale::Recode Locale::Recode is up to date (undef). c'est bien installé mais si je fais un make test c'est pas très beau iMac-de-Sakkhho:xls2csv-1.07 Sakkhho$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/xls2csv.t .. 1/4 # Failed test 'Did Local::Recode load ok?' # at t/xls2csv.t line 11. # Failed test 'Did Spreadsheet::ParseExcel load ok?' # at t/xls2csv.t line 14. # Failed test 'Did Spreadsheet::ParseExcel::FmtUnicode load ok?' # at t/xls2csv.t line 17. # Failed test 'Did Text::CSV_XS load ok?' # at t/xls2csv.t line 20. # Looks like you failed 4 tests of 4. t/xls2csv.t .. Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/4 subtests Test Summary Report ------------------- t/xls2csv.t (Wstat: 1024 Tests: 4 Failed: 4) Failed tests: 1-4 Non-zero exit status: 4 Files=1, Tests=4, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.02 cusr 0.00 csys = 0.04 CPU) Result: FAIL Failed 1/1 test programs. 4/4 subtests failed. make: *** [test_dynamic] Error 4
  4. mieux ca donne; Installing /usr/local/share/man/man1/xls2csv.1 Installing /usr/local/bin/xls2csv Appending installation info to /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level/perllocal.pod avant j'ai fait un - je sais pas si ca a aidé sudo mkdir /usr/local/bin par contre le résultat est pas terrible ... iMac-de-Sakkhho:xls2csv-1.07 Sakkhho$ /usr/local/bin/xls2csv -h Can't locate Locale/Recode.pm in @INC (you may need to install the Locale::Recode module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/local/bin/xls2csv line 9. BEGIN failed--compilation aborted at /usr/local/bin/xls2csv line 9.
  5. Oue. C est l édit taptalk qui a modifié le post. Je corrige dans 10mn
  6. Ça avance :-) petit problème ensuite j'ai téléchargé et decompressé l'archive, ensuite c'est bon, sauf pour le 'make install' qui me renvoie une erreur iMac-de-Sakkhho:xls2csv-1.07 Sakkhho$ ls -l total 40 -rw-r--r--@ 1 Sakkhho staff 1227 22 jan 2012 Changes -rw-r--r--@ 1 Sakkhho staff 163 22 jan 2012 MANIFEST -rw-r--r--@ 1 Sakkhho staff 710 22 jan 2012 META.yml -rw-r--r--@ 1 Sakkhho staff 710 22 jan 2012 Makefile.PL -rw-r--r--@ 1 Sakkhho staff 536 22 jan 2012 README drwxr-xr-x@ 3 Sakkhho staff 102 22 jan 2012 script drwxr-xr-x@ 3 Sakkhho staff 102 22 jan 2012 t iMac-de-Sakkhho:xls2csv-1.07 Sakkhho$ perl Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite Locale::Recode 0 not found. Warning: prerequisite Spreadsheet::ParseExcel 0 not found. Warning: prerequisite Spreadsheet::ParseExcel::FmtUnicode 0 not found. Warning: prerequisite Text::CSV_XS 0 not found. Warning: prerequisite Unicode::Map 0 not found. Writing Makefile for xls2csv Writing MYMETA.yml and MYMETA.json iMac-de-Sakkhho:xls2csv-1.07 Sakkhho$ make cp script/xls2csv blib/script/xls2csv /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/xls2csv Manifying blib/man1/xls2csv.1 iMac-de-Sakkhho:xls2csv-1.07 Sakkhho$ make install !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ERROR: Can't create '/usr/local/bin' Do not have write permissions on '/usr/local/bin' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! at -e line 1. make: *** [pure_site_install] Error 13
  7. j'avais tenté depuis le shell mais command not found je regarde mieux ce soir
  8. quand je configure PERL j'ai What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') j'ai mis local::lib c'est bon ? bon ca à l'air mieux après avoir reconfiguré avec o conf init et relancé tous les installs (2 fois pour avoir le message ci dessous) cpan[12]> install Spreadsheet::ParseExcel::FmtUnicode Spreadsheet::ParseExcel::FmtUnicode is up to date (0.65). cpan[13]> install Text::CSV_XS Text::CSV_XS is up to date (1.18). cpan[14]> install YAML YAML is up to date (1.15). cpan[15]> install Locale::Recode Locale::Recode is up to date (undef). cpan[16]> install Unicode::Map Unicode::Map is up to date (0.112). cpan[17]> install Spreadsheet::ParseExcel Spreadsheet::ParseExcel is up to date (0.65). par contre je bloque avec le wget maintenant cpan[20]> wget http://search.cpan.org/CPAN/authors/id/K/KE/KEN/xls2csv-1.07.tar.gz Catching error: "Can't locate object method \"wget\" via package \"CPAN::WAIT\" at /System/Library/Perl/5.18/CPAN/Shell.pm line 127, <FIN> line 20.\cJ" at /System/Library/Perl/5.18/CPAN.pm line 392, <FIN> line 20. CPAN::shell() called at -e line 1
  9. j'ai tenté mais entre les 15000 lignes qui s'affiche je vois souvent des erreurs.
  10. le cd /root/veolia root c'est la racine (c: en gros) et après le repertoire que tu as crée donc je peux mettre le chemin que je veux ici ? bon je mets veolia.sh dans mon repertoire et dans le terminal je fais cd /Users/Sakkhho/Desktop/Maison/Veolia ensuite j'ai fais chmod u+x veolia.sh par contre pour installer GCC sur MAC YOSEMITE, je trouve pas. ... EDIT : ha si, en tapant GCC tout betement, il me propose d'installer qq chose... je suis quand meme dans le brouillard .... épais :-) iMac-de-Sakkhho:~ Sakkhho$ gcc --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix ensuite PERL j'obtiens ca cpan shell -- CPAN exploration and modules installation (v2.00) Enter 'h' for help. cpan[1]> o conf commit commit: wrote '/Users/Sakkhho/.cpan/CPAN/MyConfig.pm' cpan[2]> q Terminal does not support GetHistory. Lockfile removed. *** Remember to add these environment variables to your shell config and restart your shell before running cpan again *** PERL_MB_OPT="--install_base \"/Users/Sakkhho/perl5\""; export PERL_MB_OPT; PERL_MM_OPT="INSTALL_BASE=/Users/SAkkhho/perl5"; export PERL_MM_OPT; par contre l'installation des packages PERL me donne pas mal d'erreur ... je ne sais pas pourquoi souvent j'ai ca ERROR: Can't create '/Library/Perl/5.18/CPAN' mkdir /Library/Perl/5.18/CPAN: Permission denied at /System/Library/Perl/5.18/ExtUtils/Install.pm line 469. ERROR: Can't create '/Library/Perl/5.18' Do not have write permissions on '/Library/Perl/5.18'
  11. sur mon MAC la commande perl -v donne This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for more detail) Copyright 1987-2013, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. c'est deja ca
  12. Ca a l air oui ... :-)
  13. Merci pour le tuto. Je regarde en détail ce week-end probablement Étant sous Mac faut que je regarde la 1ère étape ;-) par defaut, Shell Bash est present sous mac non ?
  14. finalement c'est version si on a pas de main loop moisie tout va bien... donc ce weekend je vais mettre probablement à jour
  15. Encore des box plantées... J avais presque envie de le faire l update car ça semblait être redevenue stable. Mais pas envie de planter le tout.
  16. Here we go :-) Et bon courage...
  17. Sakkhho

    Support Gea

    c'est corrigé, merci
  18. pas faux, (il publie avec 2 jours, car j'ai le 31/05 comme dernier relevé.) je verrai les 2, dans la base SQL avec ton scripts Graph que j'utilise. et dans un VG dans la HC2 pour avoir un suivi à 2 jours.
  19. cool, merci l'info dans la HC2 c'est pour avoir tout à un meme endroit et être alerter si problème - avec un push ou le plugin freeSMS.
  20. Sakkhho

    Support Gea

    si si c'est tout bon :-) merci pepite par contre pour toutes mes lignes GEA avec les WP, j'avais des "sensor", c'est + propre de tout mettre en Power ? ca marche de la meme facon ?
  21. Sakkhho

    Support Gea

    rooo le boulet que je suis
  22. Lazer, j'avais mis ce sujet de coté mais j'aimerai bien récupérer cette info VEOLIA automatiquement et pourquoi pas ensuite afficher l'info dans mon HC2 ? est ce que tu peux m'aider ?
  23. Sakkhho

    Support Gea

    j'ai bien mis le "4 value" oui 4 étant l'ID
  24. Sakkhho

    Support Gea

    j'ai fait un test ce matin mais pas mieux GEA.add({{"Sensor-", id["WP_TELE"], 50},{"Sensor+", id["WP_TELE"], 10},Present}, -1, "",{{"Time", "09:00", "10:00"},{"turnOn",id["ECL_CHAMBRE_PARENTS"]}, {"Value", id["ECL_CHAMBRE_PARENTS"], 20}, {"turnOn",id["ECL_SALON"]}}) je continue de tester.
×
×
  • Créer...