I have a set of tags that are taking values every second.
I have set up a history provider to store my tag values history in my database.
I can see data is being stored in database table
I get empty results. tags that I try to query all have
HistroyEnabled = True
HistroyProvider = postgresql (this is my history provider's name)
What do I check to see what is wrong? How do I troubleshoot the history module? How do I make sure it is reliable? Since I am developing logic based on historical data for my alarming system and it has to be reliable.
the queryTagHistory function used to fetch all the historical data for the tags fine. but it stopped working and i have checked everything and do not understand why now.
To your point I have checked (startDate, endDate) pair, (startDate, rangeMinutes/rangeHours) pair, and returnSize = 0 with or without range and startDate:
tagPath = "[Default]_wrfm_/Delete Me"
ts_now = system.date.now()
ts_start = system.date.addMinutes(ts_now, -1500)
result = system.tag.queryTagHistory([tagPath], returnSize = 0, startDate = ts_start, endDate = ts_now)
self.getSibling("TextArea").props.text = result
I have two gateways but on two different machines in the same network, one for test and one for the main project. The only thing that comes to my mind is that because I had to duplicate the test gateway (by cloning the second machine entire OS image) and then changed the gateway name. It warned me of some malfunctions when I was changing the name of the gateway.
I should also mention that the database is shared on a third machine between these two gateways.
could that be the problem? if so, how can I check/troubleshoot it?