I think I already know the answer to this, but I wanted to see if anyone has found a workaround.
I have a distributed Ignition application with one backend gateway and one frontend gateway. The backend handles all I/O, database operations, and tag history. The frontend is only responsible for rendering applications.
When using the Perspective Power Chart, I would like to store annotations in the tag history database. My current architecture uses remote history providers, allowing the frontend gateway to retrieve historical data from the backend gateway. The issue is that a remote history provider connection is read-only, which prevents annotations from being written to the database.
The only workaround I can think of is creating a database connection on the frontend gateway that points to the same historical database used by the backend. This would allow annotations to be written successfully. However, I would prefer to keep the frontend read-only and have the backend remain responsible for all database writes.
You are trying to coerce Ignition's historians to store annotations for tags, which they are not designed to do. But they can store string tags on change--a possible approach, but you will be limited to single notes at a given millisecond timestamp.
The canonical approach would be to use a non-historian DB table to store events in your desired format. With DB connections on both front and back ends. (Where you do the writes is application dependent.)
When you say that Ignition historians are not designed to store annotations, could you clarify what you mean? It seems that there are mechanisms in place within the historian to support annotations, see links below.
I've tested and used this successfully on a single Ignition gateway. However, in a distributed architecture, the read-only nature of remote history providers and my architecture creates the unique challenge described above.