# Afficher horaires de bus

**URL:** <https://forum.hacf.fr/t/afficher-horaires-de-bus/22643>\
**Category:** Entraide Home Assistant\
**Created:** [Avril 7, 2023, 6:08 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643 "2023-04-07T06:08:28Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 9, 2023, 10:14 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/21 "2023-04-09T10:14:10Z")

</div>

Plusieurs options... je ne peu pas dire laquelle est meilleur...  
Moi, j'ai deux stops pour un bus: un aller et un retour et j'utilse l'horaire (gtfs) et temps-reel en même temps car (encore)..qualité pauvre, voir ici pour aujourd'hui.

 ![image](https://forum.hacf.fr/uploads/default/original/3X/3/3/33f7feeb15242ff1b66fb19e88927e6b01a65009.png)

```auto
type: entities
entities:
  - entity: sensor.653_aller_mouans
    type: custom:multiple-entity-row
    state_header: RealTime
    name: Mouans > Sophia 653
    secondary_info: last-changed
    entities:
      - entity: sensor.ligne_653a_mouans_corrected
        name: List
        format: time
  - entity: sensor.653_retour_mouans
    type: custom:multiple-entity-row
    name: Sophia > Mouans 653
    state_header: RealTime
    secondary_info: last-changed
    entities:
      - entity: sensor.ligne_653r_sophia_corrected
        name: List
```

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 9, 2023, 10:35 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/22 "2023-04-09T10:35:26Z")

</div>

Avec ‹&nbsp;mes&nbsp;› sensors tu pourrait aussi avoir tout les trois temps de départs dans le ‹&nbsp;state&nbsp;› p.e. «&nbsp;07:10 / 07:30 / 07:50&nbsp;»

---

<div class="post-metadata">

**Author:** ![Gizmoz69](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gizmoz69/32/22552_2.png) [@Gizmoz69](https://forum.hacf.fr/u/Gizmoz69)\
**Post date:** [Avril 9, 2023, 1:52 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/23 "2023-04-09T13:52:33Z")

</div>

Je pense que le sensor ne génère rien...

 ![Capture d'écran 2023-04-09 155155](https://forum.hacf.fr/uploads/default/original/3X/e/f/ef5e7ab51a2d63f9e1b84d85a1d6ea3953a4abee.png)

et voici le contenu du .json

 ![Capture d'écran 2023-04-09 160046](https://forum.hacf.fr/uploads/default/original/3X/4/3/435fd7e73066c79760be9ec1c90e47d82da7155a.png)

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 9, 2023, 2:44 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/24 "2023-04-09T14:44:20Z")

</div>

Et la deuxième, le REST sensor? C’est le rest qui collecte les données du fichier

---

<div class="post-metadata">

**Author:** ![Gizmoz69](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gizmoz69/32/22552_2.png) [@Gizmoz69](https://forum.hacf.fr/u/Gizmoz69)\
**Post date:** [Avril 9, 2023, 5:33 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/25 "2023-04-09T17:33:32Z")

</div>

Il n’y a pas de REST sensor, il doit y avoir un problème quelque part !

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 9, 2023, 5:58 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/26 "2023-04-09T17:58:53Z")

</div>

Chez moi ça marche nickel, montre moi ton code et qu est que tu voix dans les logs?

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 9, 2023, 6:01 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/27 "2023-04-09T18:01:18Z")

</div>

Dans configuration.yaml ajoute le debig pour rest, p.e.:

```auto
logger:
  default: warning
  logs:
    homeassistant.components.rest: debug

```

---

<div class="post-metadata">

**Author:** ![Gizmoz69](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gizmoz69/32/22552_2.png) [@Gizmoz69](https://forum.hacf.fr/u/Gizmoz69)\
**Post date:** [Avril 9, 2023, 6:09 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/28 "2023-04-09T18:09:45Z")

</div>

Voici ma config :

```auto
      sensor:
  - platform: command_line
    name: collect_lyon_realtime
    scan_interval: 300
    command: > 
        curl "https://download.data.grandlyon.com/ws/rdata/tcl_sytral.tclpassagearret/all.json?maxfeatures=-1" --user "auredu26@gmail.com:PASSWORD" | jq '[.values[] | select(.ligne=="C18A") | select(.id==2384) ]| sort_by(.heurepassage) | reverse'
        > www/lyon_c18A_2384.json  

  - platform: rest
    name: bus_c18a_2384
    scan_interval: 180
    resource: "http://192.168.1.69:8123/local/www/lyon_c18A_2384.json"
    value_template: >
         {% if value_json is defined %}
            {% set y = value_json | count %}
            {% set ns = namespace(val="--:--") %}
            {% for x in range(0,y) %} 
                {% if value_json[x]["ligne"] == "C18A" and value_json[x]["id"] == 2384 %}
                    {% set ns.val = as_local(as_datetime(value_json[x]["heurepassage"])).strftime("%H:%M") %}
                {% endif %}
            {% endfor %}
            {{ns.val}} 
          {% else %}
           --:--
          {% endif %}
                

```

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 9, 2023, 6:19 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/29 "2023-04-09T18:19:04Z")

</div>

A part du nom qui n’est pas pareil que la haut ('Tielechargement\_Horaire\_TCL"), ça semble bon  
T’as pas un sensor ‹&nbsp;bus…&nbsp;› ?  
Et tes logs?

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 9, 2023, 6:21 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/30 "2023-04-09T18:21:25Z")

</div>

> [@Gizmoz69](#):
>
> `69:8123/local/www/lyon_c`

c’est QUE local…pas local/www…il faut bien copier 🙂

---

<div class="post-metadata">

**Author:** ![Gizmoz69](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gizmoz69/32/22552_2.png) [@Gizmoz69](https://forum.hacf.fr/u/Gizmoz69)\
**Post date:** [Avril 9, 2023, 6:55 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/31 "2023-04-09T18:55:10Z")

</div>

Logger: aiohttp.server  
Source: /usr/local/lib/python3.10/site-packages/aiohttp/web\_protocol.py:403  
First occurred: 20:51:19 (2 occurrences)  
Last logged: 20:51:53

Unhandled exception  
Traceback (most recent call last):  
File «&nbsp;/usr/local/lib/python3.10/asyncio/base\_events.py&nbsp;», line 1205, in \_sendfile\_fallback  
read = await self.run\_in\_executor(None, file.readinto, view)  
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File «&nbsp;/usr/local/lib/python3.10/site-packages/aiohttp/web\_protocol.py&nbsp;», line 512, in start  
resp, reset = await task  
File «&nbsp;/usr/local/lib/python3.10/site-packages/aiohttp/web\_protocol.py&nbsp;», line 458, in \_handle\_request  
reset = await self.finish\_response(request, resp, start\_time)  
File «&nbsp;/usr/local/lib/python3.10/site-packages/aiohttp/web\_protocol.py&nbsp;», line 611, in finish\_response  
await prepare\_meth(request)  
File «&nbsp;/usr/local/lib/python3.10/site-packages/aiohttp/web\_fileresponse.py&nbsp;», line 286, in prepare  
return await self.\_sendfile(request, fobj, offset, count)  
File «&nbsp;/usr/local/lib/python3.10/site-packages/aiohttp/web\_fileresponse.py&nbsp;», line 99, in \_sendfile  
await loop.sendfile(transport, fobj, offset, count)  
File «&nbsp;/usr/local/lib/python3.10/asyncio/base\_events.py&nbsp;», line 1184, in sendfile  
return await self.\_sendfile\_fallback(transport, file,  
File «&nbsp;/usr/local/lib/python3.10/asyncio/base\_events.py&nbsp;», line 1214, in \_sendfile\_fallback  
await proto.restore()  
File «&nbsp;/usr/local/lib/python3.10/asyncio/base\_events.py&nbsp;», line 268, in restore  
self.\_transport.resume\_reading()  
File «&nbsp;/usr/local/lib/python3.10/asyncio/sslproto.py&nbsp;», line 343, in resume\_reading  
self.\_ssl\_protocol.\_transport.resume\_reading()  
AttributeError: ‹&nbsp;NoneType&nbsp;› object has no attribute ‹&nbsp;resume\_reading&nbsp;›

---

<div class="post-metadata">

**Author:** ![Gizmoz69](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gizmoz69/32/22552_2.png) [@Gizmoz69](https://forum.hacf.fr/u/Gizmoz69)\
**Post date:** [Avril 9, 2023, 6:56 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/32 "2023-04-09T18:56:07Z")

</div>

# Home Assistant Core

Updating vesync switch took longer than the scheduled update interval 0:00:30

20:52:10 – (AVERTISSEMENT) Commutateur

Setup of climate platform daikin is taking over 10 seconds.

20:51:58 – (AVERTISSEMENT) Thermostat

Unhandled exception

20:51:53 – (ERREUR) /usr/local/lib/python3.10/site-packages/aiohttp/web\_protocol.py - message survenu pour la première fois à 20:51:19 et apparu 2 fois.

[https://homeassistant.local:8123/lovelace/0:0:0](https://homeassistant.local:8123/lovelace/0:0:0) Uncaught

20:51:53 – (ERREUR) components/system\_log/ **init**.py - message survenu pour la première fois à 20:51:20 et apparu 2 fois.

Error doing job: Task exception was never retrieved

20:51:52 – (ERREUR) Versatile Thermostat configuration (intégration personnalisée) - message survenu pour la première fois à 20:50:35 et apparu 11 fois.

VersatileThermostat-Salon VersaTherm-climate.salon - Cannot find the underlying climate entity: climate.salon. Thermostat will not be operational

20:51:52 – (ERREUR) Versatile Thermostat configuration (intégration personnalisée) - message survenu pour la première fois à 20:50:35 et apparu 11 fois.

Error from stream worker: Stream ended; no additional packets

20:51:21 – (ERREUR) Stream

Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for samsungtv\_tizen doing blocking calls at custom\_components/samsungtv\_tizen/websockets.py, line 115: time.sleep(self.key\_press\_delay)

20:51:14 – (AVERTISSEMENT) util/async\_.py

Found camera with serial K49110220 without configuration. Please go to integration to complete setup

20:51:04 – (AVERTISSEMENT) EZVIZ

Platform samsungtv does not generate unique IDs. ID 92ff2dd3-fb76-4942-95c1-9df2af947acc already exists - ignoring media\_player.tv\_q6\_series

20:50:54 – (ERREUR) Lecteur multimédia

Setup of media\_player platform samsungtv is taking over 10 seconds.

20:50:39 – (AVERTISSEMENT) Lecteur multimédia - message survenu pour la première fois à 20:50:39 et apparu 2 fois.

Sensor sensor.sm\_t580\_high\_accuracy\_update\_interval has device class None, state class None and unit seconds thus indicating it has a numeric value; however, it has the non-numeric value: (\<class ‹&nbsp;str&nbsp;›\>); Please update your configuration if your entity is manually configured, otherwise create a bug report at [GitHub · Where software is built](https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mobile_app%22)

20:50:36 – (AVERTISSEMENT) Capteur

Uncaught thread exception

20:50:33 – (ERREUR) /usr/src/homeassistant/homeassistant/bootstrap.py

error while get mqtt config

20:50:33 – (ERREUR) /usr/local/lib/python3.10/site-packages/tuya\_iot/openmq.py

Config entry ‹&nbsp;Vase&nbsp;› for twinkly integration not ready yet; Retrying in background

20:50:33 – (AVERTISSEMENT) config\_entries.py - message survenu pour la première fois à 20:50:27 et apparu 6 fois.

- no entity to listen. Try later

20:50:22 – (AVERTISSEMENT) Versatile Thermostat configuration (intégration personnalisée) - message survenu pour la première fois à 20:50:20 et apparu 20 fois.

Setup of sensor platform command\_line is taking over 10 seconds.

20:50:20 – (AVERTISSEMENT) Capteur

- no entity to listen. Try later

20:50:20 – (AVERTISSEMENT) Versatile Thermostat configuration (intégration personnalisée) - message survenu pour la première fois à 20:50:12 et apparu 12 fois.

Platform rest not ready yet: Server disconnected without sending a response.; Retrying in background in 30 seconds

20:50:10 – (AVERTISSEMENT) Capteur

The ‹&nbsp;base\_url&nbsp;› option near /config/configuration.yaml:47 is deprecated, please remove it from your configuration

20:49:52 – (AVERTISSEMENT) HTTP

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 9, 2023, 6:59 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/33 "2023-04-09T18:59:53Z")

</div>

Ces logs n’ont rien a faire avec ton rest… t’as modifié comme j’ai écrit dessus?

---

<div class="post-metadata">

**Author:** ![Gizmoz69](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gizmoz69/32/22552_2.png) [@Gizmoz69](https://forum.hacf.fr/u/Gizmoz69)\
**Post date:** [Avril 9, 2023, 7:03 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/34 "2023-04-09T19:03:45Z")

</div>

Il n’y a que cela, et oui j’ai enlever le WWW dans le chemin d’accés

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 9, 2023, 7:12 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/35 "2023-04-09T19:12:24Z")

</div>

Ajoute le debug dans le logger (dessus) et reboot…ou demain quand je suis de retour

---

<div class="post-metadata">

**Author:** ![Gizmoz69](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gizmoz69/32/22552_2.png) [@Gizmoz69](https://forum.hacf.fr/u/Gizmoz69)\
**Post date:** [Avril 9, 2023, 7:17 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/36 "2023-04-09T19:17:52Z")

</div>

malheureusement je n’arrive pas intégrer cela a la fin cela bloque le redémarrage

```auto

logger:
  default: warning
  logs:
    homeassistant.components.rest: debug

```

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 10, 2023, 4:12 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/37 "2023-04-10T04:12:21Z")

</div>

T'as déjà une secton avec 'logger'?

EDIT: de ton browser, tu voix le contenue du fichier quand tu utilise:

```auto
http://192.168.1.69:8123/local/lyon_c18A_2384.json

```

 ![image](https://forum.hacf.fr/uploads/default/original/3X/4/4/44e33e8a8745d36dd3a214de960e5130d70e08da.png)

---

<div class="post-metadata">

**Author:** ![Gizmoz69](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gizmoz69/32/22552_2.png) [@Gizmoz69](https://forum.hacf.fr/u/Gizmoz69)\
**Post date:** [Avril 10, 2023, 5:28 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/38 "2023-04-10T05:28:15Z")

</div>

Oui il y a deja un logger, pour une intégration de la carte de l’aspirateur robot.  
L’acces via le navigateur fonctionne oui

---

<div class="post-metadata">

**Author:** ![vingerha](https://forum.hacf.fr/user_avatar/forum.hacf.fr/vingerha/32/30749_2.png) [@vingerha](https://forum.hacf.fr/u/vingerha)\
**Post date:** [Avril 10, 2023, 5:34 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/39 "2023-04-10T05:34:09Z")

</div>

Donc, ajoute le  
homeassistant.components.rest: debug  
et reboot

---

<div class="post-metadata">

**Author:** ![Gizmoz69](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gizmoz69/32/22552_2.png) [@Gizmoz69](https://forum.hacf.fr/u/Gizmoz69)\
**Post date:** [Avril 10, 2023, 6:15 UTC](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643/40 "2023-04-10T06:15:05Z")

</div>

C’est fait et rien… 2eme sensor tjr introuvable

[Page précédente](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643.md?page=1)

[Page suivante](https://forum.hacf.fr/t/afficher-horaires-de-bus/22643.md?page=3)
