Skip to content

Data is always retrieved up to the application start date instead of up to now #64

Open
@dimitri-frank

Description

@dimitri-frank

Bonjour,

j'ai l’impression qu’après un reset je n'arrive plus a obtenir de valeurs dans le tableau énergie. J'ai vérifié qu'avez Gazpar2mqtt des valeurs plus récentes existaient bien.
Exemple ici Mqtt dont le relevé s'arrête au 28/02

Image

Ici le dashboard (qui s'arrete au 22/02 lors du dernier reset).

Image

Plus bas le journal de la dernière connection (8h04) que j'avoue avoir du mal à comprendre s'il y a un sujet ou pas..
Merci de votre aide !

2025-03-03 00:04:12,462 INFO [gazpar2haws.bridge] Waiting 480 minutes before next scan...
2025-03-03 08:04:39,525 DEBUG [gazpar2haws.haws] Connecting to Home Assistant at supervisor:80
2025-03-03 08:04:39,545 DEBUG [websockets.client] = connection is CONNECTING
2025-03-03 08:04:39,546 DEBUG [websockets.client] > GET /core/websocket HTTP/1.1
2025-03-03 08:04:39,547 DEBUG [websockets.client] > Host: supervisor
2025-03-03 08:04:39,547 DEBUG [websockets.client] > Upgrade: websocket
2025-03-03 08:04:39,547 DEBUG [websockets.client] > Connection: Upgrade
2025-03-03 08:04:39,547 DEBUG [websockets.client] > Sec-WebSocket-Key: h8O0naZq/ekX1m2tILBPMA==
2025-03-03 08:04:39,548 DEBUG [websockets.client] > Sec-WebSocket-Version: 13
2025-03-03 08:04:39,548 DEBUG [websockets.client] > Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
2025-03-03 08:04:39,548 DEBUG [websockets.client] > Authorization: Bearer c027c677dd.......fd9f9476e5ba239567
2025-03-03 08:04:39,548 DEBUG [websockets.client] > User-Agent: Python/3.12 websockets/15.0
2025-03-03 08:04:39,554 DEBUG [websockets.client] < HTTP/1.1 101 Switching Protocols
2025-03-03 08:04:39,555 DEBUG [websockets.client] < Upgrade: websocket
2025-03-03 08:04:39,556 DEBUG [websockets.client] < Connection: upgrade
2025-03-03 08:04:39,556 DEBUG [websockets.client] < Sec-WebSocket-Accept: 1DaVU8zf4h5a/vo9MUsyPmC52Xo=
2025-03-03 08:04:39,556 DEBUG [websockets.client] < Sec-WebSocket-Extensions: permessage-deflate
2025-03-03 08:04:39,557 DEBUG [websockets.client] < Date: Mon, 03 Mar 2025 07:04:39 GMT
2025-03-03 08:04:39,558 DEBUG [websockets.client] < Server: Python/3.13 aiohttp/3.11.13
2025-03-03 08:04:39,559 DEBUG [websockets.client] = connection is OPEN
2025-03-03 08:04:39,560 DEBUG [websockets.client] < TEXT '{"type":"auth_required","ha_version":"2025.2.5"}' [48 bytes]
2025-03-03 08:04:39,561 DEBUG [websockets.client] > TEXT '{"type": "auth", "access_token": "c027c677ddfdb...9d5fd9f9476e5ba239567"}' [148 bytes]
2025-03-03 08:04:39,569 DEBUG [websockets.client] < TEXT '{"type":"auth_ok","ha_version":"2025.2.5"}' [42 bytes]
2025-03-03 08:04:39,569 DEBUG [gazpar2haws.haws] Connected to Home Assistant
2025-03-03 08:04:39,569 INFO [gazpar2haws.bridge] Publishing Gazpar data to Home Assistant WS...
2025-03-03 08:04:39,570 INFO [gazpar2haws.bridge] Publishing data for device 'gazpar2haws'...
2025-03-03 08:04:39,570 DEBUG [gazpar2haws.haws] Checking if sensor.gazpar2haws_volume exists...
2025-03-03 08:04:39,570 DEBUG [gazpar2haws.haws] Listing statistics IDs...
2025-03-03 08:04:39,570 DEBUG [gazpar2haws.haws] Sending a message...
2025-03-03 08:04:39,570 DEBUG [websockets.client] > TEXT '{"type": "recorder/list_statistic_ids", "statis...ype": "sum", "id": 145}' [75 bytes]
2025-03-03 08:04:39,579 DEBUG [websockets.client] < TEXT '{"id":145,"type":"result","success":true,"resul...unit_class":"energy"}]}' [4922 bytes]
2025-03-03 08:04:39,580 DEBUG [gazpar2haws.haws] Received response
2025-03-03 08:04:39,580 DEBUG [gazpar2haws.haws] Listed statistics IDs: 23 ids
2025-03-03 08:04:39,580 DEBUG [gazpar2haws.haws] sensor.gazpar2haws_volume exists: True
2025-03-03 08:04:39,581 DEBUG [gazpar2haws.haws] Getting last statistic for sensor.gazpar2haws_volume...
2025-03-03 08:04:39,581 DEBUG [gazpar2haws.haws] Getting ['sensor.gazpar2haws_volume'] statistics during period from 2023-03-06 00:00:00+01:00 to 2025-02-23 00:00:00+01:00...
2025-03-03 08:04:39,581 DEBUG [gazpar2haws.haws] Sending a message...
2025-03-03 08:04:39,582 DEBUG [websockets.client] > TEXT '{"type": "recorder/statistics_during_period", "...iod": "day", "id": 146}' [205 bytes]
2025-03-03 08:04:39,765 DEBUG [websockets.client] < TEXT '{"id":146,"type":"result","success":true,"resul...:2.4600000000000364}]}}' [98251 bytes]
2025-03-03 08:04:39,772 DEBUG [gazpar2haws.haws] Received response
2025-03-03 08:04:39,772 DEBUG [gazpar2haws.haws] Received ['sensor.gazpar2haws_volume'] statistics during period from 2023-03-06 00:00:00+01:00 to 2025-02-23 00:00:00+01:00
2025-03-03 08:04:39,773 DEBUG [gazpar2haws.haws] Last statistic for sensor.gazpar2haws_volume: {'start': 1740178800000, 'end': 1740265200000, 'last_reset': None, 'state': 2067.1699999999983, 'sum': 2067.1699999999983, 'change': 2.4600000000000364}
2025-03-03 08:04:39,774 DEBUG [gazpar2haws.gazpar] Entity 'sensor.gazpar2haws_volume' => Last date: 2025-02-22, last value: 2067.1699999999983
2025-03-03 08:04:39,774 DEBUG [gazpar2haws.haws] Checking if sensor.gazpar2haws_energy exists...
2025-03-03 08:04:39,775 DEBUG [gazpar2haws.haws] Listing statistics IDs...
2025-03-03 08:04:39,775 DEBUG [gazpar2haws.haws] Sending a message...
2025-03-03 08:04:39,775 DEBUG [websockets.client] > TEXT '{"type": "recorder/list_statistic_ids", "statis...ype": "sum", "id": 147}' [75 bytes]
2025-03-03 08:04:39,782 DEBUG [websockets.client] < TEXT '{"id":147,"type":"result","success":true,"resul...unit_class":"energy"}]}' [4922 bytes]
2025-03-03 08:04:39,783 DEBUG [gazpar2haws.haws] Received response
2025-03-03 08:04:39,783 DEBUG [gazpar2haws.haws] Listed statistics IDs: 23 ids
2025-03-03 08:04:39,784 DEBUG [gazpar2haws.haws] sensor.gazpar2haws_energy exists: True
2025-03-03 08:04:39,784 DEBUG [gazpar2haws.haws] Getting last statistic for sensor.gazpar2haws_energy...
2025-03-03 08:04:39,785 DEBUG [gazpar2haws.haws] Getting ['sensor.gazpar2haws_energy'] statistics during period from 2023-03-06 00:00:00+01:00 to 2025-02-23 00:00:00+01:00...
2025-03-03 08:04:39,785 DEBUG [gazpar2haws.haws] Sending a message...
2025-03-03 08:04:39,786 DEBUG [websockets.client] > TEXT '{"type": "recorder/statistics_during_period", "...iod": "day", "id": 148}' [205 bytes]
2025-03-03 08:04:39,952 DEBUG [websockets.client] < TEXT '{"id":148,"type":"result","success":true,"resul...:27.650000000001455}]}}' [97953 bytes]
2025-03-03 08:04:39,959 DEBUG [gazpar2haws.haws] Received response
2025-03-03 08:04:39,959 DEBUG [gazpar2haws.haws] Received ['sensor.gazpar2haws_energy'] statistics during period from 2023-03-06 00:00:00+01:00 to 2025-02-23 00:00:00+01:00
2025-03-03 08:04:39,959 DEBUG [gazpar2haws.haws] Last statistic for sensor.gazpar2haws_energy: {'start': 1740178800000, 'end': 1740265200000, 'last_reset': None, 'state': 23106.539999999986, 'sum': 23106.539999999986, 'change': 27.650000000001455}
2025-03-03 08:04:39,960 DEBUG [gazpar2haws.gazpar] Entity 'sensor.gazpar2haws_energy' => Last date: 2025-02-22, last value: 23106.539999999986
2025-03-03 08:04:39,961 DEBUG [gazpar2haws.haws] Checking if sensor.gazpar2haws_cost exists...
2025-03-03 08:04:39,961 DEBUG [gazpar2haws.haws] Listing statistics IDs...
2025-03-03 08:04:39,962 DEBUG [gazpar2haws.haws] Sending a message...
2025-03-03 08:04:39,962 DEBUG [websockets.client] > TEXT '{"type": "recorder/list_statistic_ids", "statis...ype": "sum", "id": 149}' [75 bytes]
2025-03-03 08:04:39,969 DEBUG [websockets.client] < TEXT '{"id":149,"type":"result","success":true,"resul...unit_class":"energy"}]}' [4922 bytes]
2025-03-03 08:04:39,970 DEBUG [gazpar2haws.haws] Received response
2025-03-03 08:04:39,970 DEBUG [gazpar2haws.haws] Listed statistics IDs: 23 ids
2025-03-03 08:04:39,971 DEBUG [gazpar2haws.haws] sensor.gazpar2haws_cost exists: True
2025-03-03 08:04:39,972 DEBUG [gazpar2haws.haws] Getting last statistic for sensor.gazpar2haws_cost...
2025-03-03 08:04:39,972 DEBUG [gazpar2haws.haws] Getting ['sensor.gazpar2haws_cost'] statistics during period from 2023-03-06 00:00:00+01:00 to 2025-02-23 00:00:00+01:00...
2025-03-03 08:04:39,972 DEBUG [gazpar2haws.haws] Sending a message...
2025-03-03 08:04:39,973 DEBUG [websockets.client] > TEXT '{"type": "recorder/statistics_during_period", "...iod": "day", "id": 150}' [203 bytes]
2025-03-03 08:04:40,182 DEBUG [websockets.client] < TEXT '{"id":150,"type":"result","success":true,"resul...:3.6705150739726378}]}}' [101230 bytes]
2025-03-03 08:04:40,189 DEBUG [gazpar2haws.haws] Received response
2025-03-03 08:04:40,190 DEBUG [gazpar2haws.haws] Received ['sensor.gazpar2haws_cost'] statistics during period from 2023-03-06 00:00:00+01:00 to 2025-02-23 00:00:00+01:00
2025-03-03 08:04:40,190 DEBUG [gazpar2haws.haws] Last statistic for sensor.gazpar2haws_cost: {'start': 1740178800000, 'end': 1740265200000, 'last_reset': None, 'state': 2702.0439425595932, 'sum': 2702.0439425595932, 'change': 3.6705150739726378}
2025-03-03 08:04:40,191 DEBUG [gazpar2haws.gazpar] Entity 'sensor.gazpar2haws_cost' => Last date: 2025-02-22, last value: 2702.0439425595932
2025-03-03 08:04:40,192 DEBUG [gazpar2haws.gazpar] Min start date for all sensors: 2025-02-23
2025-03-03 08:04:40,192 DEBUG [gazpar2haws.gazpar] Energy start date: 2025-02-23
2025-03-03 08:04:40,192 DEBUG [gazpar2haws.gazpar] Volume start date: 2025-02-23
2025-03-03 08:04:40,193 DEBUG [gazpar2haws.gazpar] Cost start date: 2025-02-23
2025-03-03 08:04:40,193 INFO [gazpar2haws.gazpar] No data to fetch
2025-03-03 08:04:40,194 DEBUG [gazpar2haws.gazpar] End date: 2025-02-23
2025-03-03 08:04:40,194 INFO [gazpar2haws.gazpar] No volume data to publish
2025-03-03 08:04:40,195 INFO [gazpar2haws.gazpar] No energy data to publish
2025-03-03 08:04:40,195 INFO [gazpar2haws.gazpar] No cost data to publish
2025-03-03 08:04:40,195 INFO [gazpar2haws.bridge] Device 'gazpar2haws' data published to Home Assistant WS.
2025-03-03 08:04:40,196 INFO [gazpar2haws.bridge] Gazpar data published to Home Assistant WS.
2025-03-03 08:04:40,196 DEBUG [gazpar2haws.haws] Disconnecting from Home Assistant...
2025-03-03 08:04:40,197 DEBUG [websockets.client] > CLOSE 1000 (OK) [2 bytes]
2025-03-03 08:04:40,197 DEBUG [websockets.client] = connection is CLOSING
2025-03-03 08:04:40,199 DEBUG [websockets.client] < CLOSE 1000 (OK) [2 bytes]
2025-03-03 08:04:40,200 DEBUG [websockets.client] < EOF
2025-03-03 08:04:40,200 DEBUG [websockets.client] > EOF
2025-03-03 08:04:40,200 DEBUG [websockets.client] = connection is CLOSED
2025-03-03 08:04:40,201 DEBUG [websockets.client] x half-closing TCP connection
2025-03-03 08:04:40,202 DEBUG [gazpar2haws.haws] Disconnected from Home Assistant
2025-03-03 08:04:40,203 INFO [gazpar2haws.bridge] Waiting 480 minutes before next scan...
**

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions