Community Forum
    • Blog
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. p-mathis
    3. Posts
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 0

    Posts

    Recent
    • RE: Plusieurs modules TI

      @frkb Bonjour,
      Deux adaptateurs Micro Teleinfo USB (https://github.com/hallard/uTeleinfo) ???
      Puis récupérer les données avec un code du genre :

      import serial
      import threading
      
      def lire_compteur(port, nom):
          try:
              ser = serial.Serial(
                  port=port,
                  baudrate=9600,  
                  parity=serial.PARITY_EVEN,
                  stopbits=serial.STOPBITS_ONE,
                  bytesize=serial.SEVENBITS,
                  timeout=1
              )
              
              while True:
                  ligne = ser.readline().decode('ascii', errors='ignore').strip()
                  if ligne:
                      print(f"{nom}: {ligne}")
                      
          except Exception as e:
              print(f"Erreur {nom}: {e}")
      
      # Lancer 3 threads, un par compteur
      thread1 = threading.Thread(target=lire_compteur, args=('/dev/ttyAMA0', 'Linky1'))
      thread2 = threading.Thread(target=lire_compteur, args=('/dev/ttyUSB0', 'Linky2'))
      thread3 = threading.Thread(target=lire_compteur, args=('/dev/ttyUSB1', 'Linky3'))
      
      thread1.start()
      thread2.start()
      thread3.start()
      

      À voir... sachant que je n'y connais rien en électronique.
      Bonne chance...

      posted in Téléinfo
      P
      p-mathis
    • Afficher les données du Linky sur une page web

      Bonjour,
      Un tutoriel afin de bénéficier de la lecture des informations fournies par le PiTinfo sur une page web, en utilisant une Raspberry :
      https://linky-tuto.netlify.app/
      Bonnes fêtes de fin d'année à toutes et à tous.

      posted in PiTInfo teleinfo raspberry linky
      P
      p-mathis