Giter VIP home page Giter VIP logo

mchobby / la-maison-pythonic Goto Github PK

View Code? Open in Web Editor NEW
19.0 7.0 13.0 13.55 MB

Projet didactique du livre "Python, Raspberry-Pi et Flask" avec ESP8266 sous MicroPython

Home Page: https://shop.mchobby.be/fr/doc/1423-python-raspberry-pi-et-flask-capturez-des-donnees-telemetriques-et-realisez-des-tableaux-de-board-web-3232100014237.html

Python 50.46% Shell 2.42% CSS 0.30% HTML 15.09% JavaScript 31.72%
micropython python flask raspberrypi la-maison-pythonic esp8266 esp8266mqtt raspberry-pi-3 raspberry feather

la-maison-pythonic's People

Contributors

mchobby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

la-maison-pythonic's Issues

pourquoi les variables global à tout le script sont redéfinies global dans les functions ?

par exemple la variable last_chaud_state_time est taguée global ici : https://github.com/mchobby/la-maison-pythonic/blob/master/esp8266/chaufferie/main.py#L213

alors qu'elle est déjà définie dans le scope global à la ligne 44 https://github.com/mchobby/la-maison-pythonic/blob/master/esp8266/chaufferie/main.py#L44

la ligne 213 est donc superflue il me semble
dans tous les cas ce n'est pas bloquant, python est suffisamment souple, mais ça rend le code plus confu je trouve

push-to-db/setup.py ne termine pas

bonjour :-)

j'ai un doute sur la ligne suivante :
https://github.com/mchobby/la-maison-pythonic/blob/master/python/push-to-db/setup.sh#L32

en effet lorsqu'on exécute le script depuis une connexion SSH, cette ligne lance une nouvelle session dans le shell courant (ce que fait la commande su -l ${USER})
j'ai alors une invite de commande qui se trouve dans le ${HOME}.
Je peux en sortir en tapant exit mais alors la fin du script n'est pas exécutée car la commande exec avec laquelle est démarrée cette nouvelle session quitte la session dans laquelle s'exécute le script.

Je ne comprends donc pas l'utilité de cette ligne, d'autant qu'elle empêche le script de se terminer normalement, qu'elle ne fait pas ce que le commentaire suggère et que si je la commente tout se passe bien :-)

Probleme gestion des exeptions Asyncio sous micropython firmware 1.13

Bonjour,

En V1.13 du firmware micropython le module Asyncio semble avoir été modifié (comme dans les dernières versions de python).

La gestion des erreurs comme décrit page 222 et 223 ne fonctionne plus correctement.

En cas de problème la tâche plante et n'est plus redirigé vers la fonction led_error.

Je n'ai pas trouvé comment corriger correctement ce problème.

D'avance Merci pour votre aide,

Cordialement,

JJ

erreur schéma cabane

Bonjour,
dans le schéma esp8266/cabane/schema.png, le bus SCL du Feather est connecté à la pin SDO du BMP280 au lieu de la pin SCK.

Schéma corrigé joint.
schema

Démarrage de push-to-db avec systemd provoque "ImportError: No module named paho.mqtt.client"

Fonctionne parfaitement en ligne de commande avec
/usr/bin/python /home/pi/la-maison-pythonic/python/push-to-db/push-to-db.py
mais le démarrage dans systemd montre l'erreur suivante

pi@pythonic:~ $ sudo systemctl status push-to-db.service
● push-to-db.service - MQTT database storage service for la-maison-pythonic project
   Loaded: loaded (/lib/systemd/system/push-to-db.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-11-22 10:06:17 CET; 1s ago
  Process: 772 ExecStart=/usr/bin/python /home/pi/la-maison-pythonic/python/push-to-db/push-to-db.py (code=exited, status=1/FAILURE)
 Main PID: 772 (code=exited, status=1/FAILURE)

nov 22 10:06:17 pythonic systemd[1]: Started MQTT database storage service for la-maison-pythonic project.
nov 22 10:06:17 pythonic python[772]: Traceback (most recent call last):
nov 22 10:06:17 pythonic python[772]:   File "/home/pi/la-maison-pythonic/python/push-to-db/push-to-db.py", line 12, in <module>
nov 22 10:06:17 pythonic python[772]:     import paho.mqtt.client as mqtt_client
nov 22 10:06:17 pythonic python[772]: ImportError: No module named paho.mqtt.client
nov 22 10:06:17 pythonic systemd[1]: push-to-db.service: Main process exited, code=exited, status=1/FAILURE
nov 22 10:06:17 pythonic systemd[1]: push-to-db.service: Unit entered failed state.
nov 22 10:06:17 pythonic systemd[1]: push-to-db.service: Failed with result 'exit-code'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.