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:
gt.sh.status 100 -> 110
gt.sh.cli.atn.cmd 100 -> 110
gt.sh.cli.scada.response 100 -> 110
gt.dispatch -> deprecated, and replaced by gt.dispatch.boolean (for dispatch commands of boolean actuators that come from the atn) and gt.dispatch.boolean.local (for dispatch commands on the local MQTT broker that come from the HomeAlone actor).
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.
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 theScada
need to include theFromGNodeAlias
andFromGNodeId
in order for the ear to validate and organize data from multiple houses. This meant updating a number of the existing messages:gt.sh.status
100 -> 110gt.sh.cli.atn.cmd
100 -> 110gt.sh.cli.scada.response
100 -> 110gt.dispatch
-> deprecated, and replaced bygt.dispatch.boolean
(for dispatch commands of boolean actuators that come from theatn
) andgt.dispatch.boolean.local
(for dispatch commands on the local MQTT broker that come from theHomeAlone
actor).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 theScada
,Atn
andTerminalAsset
.Functionally, this means the
settings.py
file now has aWORLD_ROOT_ALIAS
which gets used to select the correct collection of GNodes fromhouses.json.
Finally, the
gt.sh.status.110
also has a StatusUid, and the scada keeps track of these in a dict calledstatus_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.