You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/publish_data.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,11 +49,24 @@ By default, running an optimization in EMHASS will output the results into the C
49
49
```bash
50
50
# RUN dayahead
51
51
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/dayahead-optim
52
-
# Then publish teh results of dayahead
52
+
# Then publish the results of dayahead
53
53
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/publish-data
54
54
```
55
55
*Note, the published entities from the publish-data action will not automatically update the entities' current state (current state being used to check when to turn on and off appliances via Home Assistant automations). To update the EMHASS entities state, another publish would have to be re-run later when the current time matches the next value's timestamp (e.g. every 30 minutes). See examples below for methods to automate the publish-action.*
56
56
57
+
```{note}
58
+
59
+
If your are using the thermal model, then for this manual publish implementation you need to indicate which of your deferrable loads are thermal.
60
+
We do this with the `"def_load_config"` entry.
61
+
62
+
If you have just one deferrable load which is a thermal load then the payload of `curl` publish command should look like:
63
+
`{"def_load_config": [{"thermal_config": {}}]}`
64
+
65
+
Similarly if you have three deferrable loads where the second load is a thermal load the payload would have been:
Setting `continual_publish` to `true` in the configuration saves the output of the optimization into the `data_path/entities` folder *(a .json file for each sensor/entity)*. A constant loop (in `optimization_time_step` minutes) will run, observe the .json files in that folder, and publish the saved files periodically (updating the current state of the entity by comparing date.now with the saved data value timestamps).
0 commit comments