HERA-Team / hera_mc

The HERA monitor and control (M&C) system.
BSD 2-Clause "Simplified" License
3 stars 3 forks source link

When I2C logging is paused, bogus new values appear in the db #619

Closed dannyjacobs closed 2 years ago

dannyjacobs commented 2 years ago

Solution: M&C Correlator monitor should check I2C sensor value timestamps. When the timestamp is unchanged don't put a new value in the db table. Potential issue: Is there a different timestamp for each sensor value?

Happy Birthday Bryna!

bhazelton commented 2 years ago

M&C does monitor the timestamps in redis and only puts a new value in when there's a new timestamp. This is caused by some of the data in a redis key being updated, including the timestamp, but some of the data being persisted rather than nulled. The real solution needs to come upstream, I thought @david-deboer was going to make an issue on hera_corr_f for this but I don't see it.

bhazelton commented 2 years ago

Here's the hera_corr_f issue: https://github.com/HERA-Team/hera_corr_f/issues/113

david-deboer commented 2 years ago

I've updated hera_corr_f to provide json.dumps(None) when the i2c monitoring is off (this is the same as used for other non-responsive fields in the script). I also exposed the include_i2c flag to the script, so that it can be run with i2c on from the command line. It is a PR awaiting review.

david-deboer commented 2 years ago

This changed has been merged and installed on site.