thegridelectric / gw-scada-spaceheat-python

GridWorks SCADA for space heating
MIT License
5 stars 2 forks source link

Jm/remove ear. WARNING: requires update to settings.py #89

Closed jessicamillar closed 2 years ago

jessicamillar commented 2 years ago

The primary ear function is managing the first step of data persistence in the cloud. This functionality does not belong in the SCADA repo.

All messages between the Atn and the Scada need to include the FromGNodeAlias and FromGNodeId in order for the ear to validate and organize data from multiple houses. This meant updating a number of the existing messages:

This also involved stubbing out the concept of a GNode - via some json dicts in the houses.json file - and including the basic GNode information for the Scada, Atn and TerminalAsset.

Functionally, this means the settings.py file now has a WORLD_ROOT_ALIAS which gets used to select the correct collection of GNodes from houses.json.

Finally, the gt.sh.status.110 also has a StatusUid, and the scada keeps track of these in a dict called status_to_store. Right now it never actually writes these to disk or flushes the dict. Which means we need to replace it with something at least slightly better at some point in the next month.