Comments (3)
OMG, now the problem is gone. I haven't done anything. No restarts, no config changes, no nothing... I seriously have no friggin idea what happened. The log errors are gone and the optimization and data publisher runs without issues.
I'll close this. If anything like this happens again, I'll try to set up a dev environment with a clone of this repo to try to get more details before posting anything.
Thanks a million for your engagement in this. emhass is key to making my solar facility more profitable and I really appreciate this. I bought you some coffee.
from emhass.
I ran this Python script to test the retrieval of history. I ran it from a separate PC on the same network.
It returns a complete list of sensor history, so still can't reproduce the EMHASS behavior.
(secrets masked)
import pandas as pd
from requests import get, post
days_list = pd.date_range(end='2024-04-17', freq='D', periods=5)
print(days_list)
print(days_list[0].isoformat())
day = days_list [0]
var = 'sensor.template_emhass_no_var_load_2'
hass_url= 'https://my.homeassistant.url:8123/'
long_lived_token = 'XXXXXXXXXXXXXXXX'
url = hass_url+"api/history/period/"+day.isoformat()+"?filter_entity_id="+var
headers = {
"Authorization": "Bearer " + long_lived_token,
"content-type": "application/json",
}
# Then once that all this is defined there is no much to it than this:
response = get(url, headers=headers)
# And extract the data >> This is where your code is failing so check this part:
data = response.json()[0]
# If successful then print
print(data)
[{'entity_id': 'sensor.template_emhass_no_var_load_2', 'state': '694.05', 'attributes': {'unit_of_measurement': 'W', 'device_class': 'power'}, 'last_changed': '2024-04-12T22:00:00.928736+00:00', 'last_updated': '2024-04-12T22:00:00.928736+00:00', 'context': {'id': '01HVG824J3QD58P2P1KHNK5EBW', 'parent_id': None, 'user_id': None}}, {'entity_id': 'sensor.template_emhass_no_var_load_2', 'state': '693.03', 'attributes': {'unit_of_measurement': 'W', 'device_class': 'power'}, 'last_changed': '2024-04-12T22:00:02.861105+00:00', 'last_updated': '2024-04-12T22:00:02.861105+00:00', 'context': {'id': '01HVG824J3QD58P2P1KHNK5EBW', 'parent_id': None, 'user_id': None}}, {'entity_id': 'sensor.template_emhass_no_var_load_2', 'state': '694.55', 'attributes': {'unit_of_measurement': 'W', 'device_class': 'power'}, 'last_changed': '2024-04-12T22:00:05.114414+00:00', 'last_updated': '2024-04-12T22:00:05.114414+00:00', 'context': {'id': '01HVG824J3QD58P2P1KHNK5EBW', 'parent_id': None, 'user_id': None}}, {'entity_id': 'sensor.template_emhass_no_var_load_2', 'state': '685.56', 'attributes': {'unit_of_measurement': 'W', 'device_class': 'power'}, 'last_changed': '2024-04-12T22:00:17.870891+00:00', 'last_updated': '2024-04-12T22:00:17.870891+00:00', 'context': {'id': '01HVG824J3QD58P2P1KHNK5EBW', 'parent_id': None, 'user_id': None}}, {'entity_id': 'sensor.template_emhass_no_var_load_2', 'state': '684.04', 'attributes': {'unit_of_measurement': 'W', 'device_class': 'power'}, 'last_changed': '2024-04-12T22:00:20.125773+00:00', 'last_updated': '2024-04-12T22:00:20.125773+00:00', 'context': {'id': '01HVG824J3QD58P2P1KHNK5EBW', 'parent_id': None, 'user_id': None}}, {'entity_id': 'sensor.template_emhass_no_var_load_2', 'state': '689.17', 'attributes': {'unit_of_measurement': 'W', 'device_class': 'power'}, 'last_changed': '2024-04-12T22:00:32.871763+00:00', 'last_updated': '2024-04-12T22:00:32.871763+00:00', 'context': {'id': '01HVG824J3QD58P2P1KHNK5EBW', 'parent_id': None, 'user_id': None}},
...
from emhass.
I need to find the time to try to replicate this.
In the meantime can you provide the logs from the add-on after a fresh restart of the add-on?
It's just to check the information printed on the logger about how data is retrieved from HA.
It is true that HA core and EMHASS on docker standalone mode are the least common installation methods these days.
from emhass.
Related Issues (20)
- Documentation update to help find compatible modules and panels HOT 4
- Data posted via home assistant is different to what appears in the EMHASS logs HOT 6
- Infeasible result with 0.10.1, optimal with 0.9.1 HOT 4
- Feature request: Provide p_hybrid_inverter as a sensor HOT 2
- Sensor unit: Unit is missing for 'Total cost function value' HOT 1
- load_cast_forecast nordpool fails, HOT 7
- pv_forecast is not aligning with JSON input for naive-mpc-optim command HOT 4
- Unable to connect to home assistant HOT 2
- Warning: deprecated lags_grid argument HOT 1
- Feature Request: Pd_max/Pc_max as runtime parameters HOT 3
- 400 error on call HOT 1
- Feature Request: Support solcast/Forecast.Solar
- Feature Request: Support dynamic electricity prices HOT 4
- Custom machine learning forecast model predict HOT 1
- Solcast shows values at night HOT 4
- Optimisation at times exceeds p_nom for deferrable loads HOT 1
- Cannot install add-on HOT 4
- Feature request: minimum continous runtime for each deferrable load HOT 1
- Same as 328 - missing image update to0.10.6 HOT 12
- sometimes error since 0.10.6 MPC HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emhass.