fmartinou / teleinfo2mqtt

Publish teleinfo to mqtt topics
https://fmartinou.github.io/teleinfo2mqtt
MIT License
64 stars 17 forks source link

problème serial suite passage en 8.1.0 #34

Closed fredarro closed 1 year ago

fredarro commented 1 year ago
19:31:09.625 ERROR teleinfo2mqtt: Error: No such file or directory, cannot open /dev/ttyUSB0
    Error: Error: No such file or directory, cannot open /dev/ttyUSB0

alors que le stack est le suivant:

services:
 teleinfo2mqtt:
    image: fmartinou/teleinfo2mqtt
    container_name: teleinfo2mqtt
    devices:
      - /dev/ttyUSB1:/dev/ttyUSB1
    environment:
      - SERIAL=/dev/ttyUSB1
      - MQTT_BASE_TOPIC=teleinfo
      - MQTT_URL=${MQTT_URL}
      - MQTT_USER=${MQTT_USER}
      - MQTT_PASSWORD=${MQTT_PASSWORD}
      - EMIT_INTERVAL=30
      - TZ=${TZ} 
      - TIC_MODE=standard
      - HASS_DISCOVERY=true
      - HASS_DISCOVERY_PREFIX=homeassistant
    restart: unless-stopped

en repassant en 8.0.2 pas de problème il prends bien ttyUSB1

fmartinou commented 1 year ago

Arf, je vois le bug rien qu'en relisant le code 😔.

Je vais fixer.

En attendant le correctif, il est possible de monter le device ttyUSB1 en tant que ttyUSB0 dans le conteneur. Ça devrait fonctionner.

devices:
     - /dev/ttyUSB1:/dev/ttyUSB0
fmartinou commented 1 year ago

C'est normalement corrigé (https://github.com/fmartinou/teleinfo2mqtt/commit/8164e9efe433aebd1c6a74493b43ce2f3216b173) 🤞 Et releasé (8.1.1).