Skip to content

Commit

Permalink
Fixed bindings for MQTT chem controller attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstrouse committed Feb 23, 2021
1 parent 4113a0f commit 17e713d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 10 deletions.
38 changes: 32 additions & 6 deletions web/bindings/mqtt.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@
{
"name": "chemController",
"description": "Populate the chemControllers topic",
"vars": {
"cfg": "@bind=sys.chemControllers.getItemById(data.id).get();"
},
"topics": [
{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/ph/tankLevel",
Expand Down Expand Up @@ -386,11 +389,11 @@
},
{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/pHDosingVolume",
"message": "{\"orpDosingVolume\":@bind=data.ph.doseVolume;}"
"message": "{\"pHDosingVolume\":@bind=data.ph.doseVolume;}"
},
{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/orpDosingVolume",
"message": "{\"pHDosingVolume\":@bind=data.orp.doseVolume;}"
"message": "{\"orpDosingVolume\":@bind=data.orp.doseVolume;}"
},
{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/orpSetpoint",
Expand Down Expand Up @@ -424,23 +427,46 @@
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/type",
"message": "@bind=data.type;"
},

{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/alkalinity",
"message": "@bind=vars.cfg.alkalinity;"
},
{
"topic": "config/chemControllers/@bind=data.id;/@bind=data.name;/alkalinity",
"message": "{\"alkalinity\":@bind=data.alkalinity;}"
"message": "{\"alkalinity\":@bind=vars.cfg.alkalinity;}"
},
{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/calciumHardness",
"message": "@bind=vars.cfg.calciumHardness;"
},
{
"topic": "config/chemControllers/@bind=data.id;/@bind=data.name;/calciumHardness",
"message": "@bind=data.calciumHardness;"
"message": "@bind=vars.cfg.calciumHardness;"
},
{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/cyanuricAcid",
"message": "@bind=vars.cfg.cyanuricAcid;"
},
{
"topic": "config/chemControllers/@bind=data.id;/@bind=data.name;/cyanuricAcid",
"message": "@bind=data.cyanuricAcid;"
"message": "@bind=vars.cfg.cyanuricAcid;"
},
{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/borates",
"message": "@bind=vars.cfg.borates;"
},
{
"topic": "config/chemControllers/@bind=data.id;/@bind=data.name;/borates",
"message": "@bind=vars.cfg.borates;"
},
{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/virtualControllerStatus",
"message": "@bind=data.virtualControllerStatus;"
},
{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/acidDemand",
"message": "@bind=data.ph.demand;"
},

{
"topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/alarms/flow",
Expand Down
11 changes: 7 additions & 4 deletions web/bindings/mqttAlt.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@
{
"name": "chemController",
"description": "Populate the chemControllers topic",
"vars": {
"cfg": "@bind=sys.chemControllers.getItemById(data.id).get();"
},
"topics": [
{
"topic": "state/chemControllers/@bind=data.id;/name",
Expand Down Expand Up @@ -482,19 +485,19 @@
},
{
"topic": "config/chemControllers/@bind=data.id;/alkalinity",
"message": "@bind=sys.chemControllers.getItemById(data.id).alkalinity;"
"message": "@bind=vars.cfg.alkalinity;"
},
{
"topic": "config/chemControllers/@bind=data.id;/calciumHardness",
"message": "@bind=sys.chemControllers.getItemById(data.id).calciumHardness;"
"message": "@bind=vars.cfg.calciumHardness;"
},
{
"topic": "config/chemControllers/@bind=data.id;/cyanuricAcid",
"message": "@bind=sys.chemControllers.getItemById(data.id).cyanuricAcid;"
"message": "@bind=vars.cfg.cyanuricAcid;"
},
{
"topic": "config/chemControllers/@bind=data.id;/borates",
"message": "@bind=sys.chemControllers.getItemById(data.id).borates;"
"message": "@bind=vars.cfg.borates;"
},
{
"topic": "state/chemControllers/@bind=data.id;/virtualControllerStatus",
Expand Down

0 comments on commit 17e713d

Please sign in to comment.