jeffsf / pyDE1

Controller for the Decent Espresso DE1
GNU General Public License v3.0
77 stars 16 forks source link

Multiple state-change records in the database #33

Closed jeffsf closed 2 years ago

jeffsf commented 2 years ago
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:03:31|1661403811.37583|1661403815.30079|Idle|NoState
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:03:30|1661403810.99671|1661403814.51845|Espresso|Flush
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:03:28|1661403808.07728|1661403811.70006|Espresso|PreInfuse
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:03:23|1661403803.12726|1661403807.31754|Espresso|HeatWaterHeater
291ade15-5e09-4e94-b98f-478a82dc4ff7|2022-08-24 22:03:19|1661403799.16162|1661403803.33542|Idle|NoState
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:03:19|1661403799.16162|1661403807.26609|Idle|NoState
291ade15-5e09-4e94-b98f-478a82dc4ff7|2022-08-24 22:03:18|1661403798.71002|1661403802.52706|Espresso|Flush
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:03:18|1661403798.71002|1661403807.20564|Espresso|Flush
291ade15-5e09-4e94-b98f-478a82dc4ff7|2022-08-24 22:03:15|1661403795.30926|1661403799.08477|Espresso|PreInfuse
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:03:15|1661403795.30926|1661403807.15509|Espresso|PreInfuse
291ade15-5e09-4e94-b98f-478a82dc4ff7|2022-08-24 22:03:01|1661403781.10127|1661403782.06999|Espresso|HeatWaterHeater
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:03:01|1661403781.10127|1661403807.1007|Espresso|HeatWaterHeater
291ade15-5e09-4e94-b98f-478a82dc4ff7|2022-08-24 22:02:55|1661403775.28105|1661403782.01073|Idle|NoState
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:02:55|1661403775.28105|1661403807.03597|Idle|NoState
291ade15-5e09-4e94-b98f-478a82dc4ff7|2022-08-24 22:01:32|1661403692.19212|1661403781.94338|Sleep|NoState
6361125a-b911-48e5-a808-9c145bfa20a6|2022-08-24 22:01:32|1661403692.19212|1661403806.97683|Sleep|NoState
[...]
jeffsf commented 2 years ago

This looks to be due to the rolling buffers.

Although the same report, it is stored for and would be retrieved for different sequences.

"Not a bug"

sqlite> select sequence_id,datetime(event_time,'unixepoch','localtime'), event_time, insert_time, state, substate from state_update where sequence_id = 'e633f811-7952-4e18-9891-2c85ba07b2b5' order by event_time desc limit 20;
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:59:58|1661439598.33553|1661439598.74361|Idle|NoState
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:59:57|1661439597.86691|1661439597.93082|Espresso|Flush
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:59:47|1661439587.51295|1661439587.89873|Espresso|Pour
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:59:41|1661439581.20129|1661439581.80589|Espresso|PreInfuse
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:59:36|1661439576.23962|1661439577.35833|Espresso|HeatWaterHeater
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:59:16|1661439556.8098|1661439577.30453|Idle|NoState
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:59:16|1661439556.43674|1661439577.24595|Espresso|Flush
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:59:14|1661439554.5183|1661439577.18961|Espresso|PreInfuse
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:58:58|1661439538.71306|1661439577.13588|Espresso|HeatWaterHeater
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:58:56|1661439536.78065|1661439577.07273|Idle|NoState
e633f811-7952-4e18-9891-2c85ba07b2b5|2022-08-25 07:58:00|1661439480.54185|1661439577.00312|Sleep|NoState