Hi again
reinstalled every thing on a Generic x86-64
Managed to see webpage with some graphs.
Changed to 60 min.
but i still get errors when trying day a head and publishing the results.
final try if somebody could help me or i´ll ditch this project.
- name: "power_photovoltaics"
device_class: power
state_class: measurement
unit_of_measurement: "W"
state: "{{ states('sensor.accumulated_production_siden')|float(0) * 1000 }}"
- name: power_load_no_var_loads
unit_of_measurement: W
device_class: "power"
value_template: >-
{{states('sensor.accumulated_consumption_siden')|float(0)*1000}}
#- states('sensor.pool_heatpump_power')|int(0)
#- states('sensor.pool_pumps_power')|int(0)
#- states('sensor.hvac_power')|int(0)
#- states('sensor.hws_power_2')|int(0)
#- states('sensor.hpwc_power')|int(0)
- binary_sensor:
- name: “Luna2000”
state: >-
{{(states(‘sensor.power_photovoltaics’)|float(0)
- states(‘sensor.power_load_no_var_loads’)|float(0))
>= 5000 }}
shell_command:
publish_data: “curl -i -H “Content-Type:application/json” -X POST -d ‘{}’ http://localhost:5000/action/publish-data”
trigger_nordpool_forecast: “curl -i -H “Content-Type: application/json” -X POST -d ‘{“load_cost_forecast”:{{((state_attr(‘sensor.nordpool_kwh_se4_sek_3_10_025’, ‘raw_today’) | map(attribute=‘value’) | list + state_attr(‘sensor.nordpool_kwh_se4_sek_3_10_025’, ‘raw_tomorrow’) | map(attribute=‘value’) | list))[now().hour:][:24] }},“prod_price_forecast”:{{((state_attr(‘sensor.nordpool_kwh_se4_sek_3_10_025’, ‘raw_today’) | map(attribute=‘value’) | list + state_attr(‘sensor.nordpool_kwh_se4_sek_3_10_025’, ‘raw_tomorrow’) | map(attribute=‘value’) | list))[now().hour:][:24]}}}’ http://localhost:5000/action/dayahead-optim”
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun emhass (no readiness notification)
s6-rc: info: service legacy-services successfully started
2023-03-11 16:47:20,194 - web_server - INFO - Launching the emhass webserver at: http://0.0.0.0:5000
2023-03-11 16:47:20,195 - web_server - INFO - Home Assistant data fetch will be performed using url: http://supervisor/core/api
2023-03-11 16:47:20,197 - web_server - INFO - The data path is: /share
2023-03-11 16:47:20,245 - web_server - INFO - Using core emhass version: 0.4.5
waitress INFO Serving on http://0.0.0.0:5000
2023-03-11 16:47:27,290 - web_server - INFO - EMHASS server online, serving index.html…
2023-03-11 16:47:41,429 - web_server - INFO - Setting up needed data
2023-03-11 16:47:41,984 - web_server - INFO - Retrieving weather forecast data using method = scrapper
2023-03-11 16:47:51,631 - web_server - INFO - Retrieving data from hass for load forecast using method = naive
2023-03-11 16:47:51,895 - web_server - INFO - Retrieve hass get data method initiated…
2023-03-11 16:48:25,153 - web_server - ERROR - Exception on /action/dayahead-optim [POST]
Traceback (most recent call last):
File “/usr/local/lib/python3.9/dist-packages/flask/app.py”, line 2528, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/python3.9/dist-packages/flask/app.py”, line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/python3.9/dist-packages/flask/app.py”, line 1823, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python3.9/dist-packages/flask/app.py”, line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File “/usr/local/lib/python3.9/dist-packages/emhass/web_server.py”, line 170, in action_call
input_data_dict = set_input_data_dict(config_path, str(data_path), costfun,
File “/usr/local/lib/python3.9/dist-packages/emhass/command_line.py”, line 91, in set_input_data_dict
P_load_forecast = fcst.get_load_forecast(method=optim_conf[‘load_forecast_method’])
File “/usr/local/lib/python3.9/dist-packages/emhass/forecast.py”, line 585, in get_load_forecast
rh.get_data(days_list, var_list)
File “/usr/local/lib/python3.9/dist-packages/emhass/retrieve_hass.py”, line 140, in get_data
df_tp = df_raw.copy()[[‘state’]].replace(
File “/usr/local/lib/python3.9/dist-packages/pandas/core/generic.py”, line 5920, in astype
new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
File “/usr/local/lib/python3.9/dist-packages/pandas/core/internals/managers.py”, line 419, in astype
return self.apply(“astype”, dtype=dtype, copy=copy, errors=errors)
File “/usr/local/lib/python3.9/dist-packages/pandas/core/internals/managers.py”, line 304, in apply
applied = getattr(b, f)(**kwargs)
File “/usr/local/lib/python3.9/dist-packages/pandas/core/internals/blocks.py”, line 580, in astype
new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
File “/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py”, line 1292, in astype_array_safe
new_values = astype_array(values, dtype, copy=copy)
File “/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py”, line 1237, in astype_array
values = astype_nansafe(values, dtype, copy=copy)
File “/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py”, line 1098, in astype_nansafe
result = astype_nansafe(flat, dtype, copy=copy, skipna=skipna)
File “/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py”, line 1181, in astype_nansafe
return arr.astype(dtype, copy=True)
ValueError: could not convert string to float: “16512.0 - states(‘sensor.battery_charge_discharge_power’)|float(0)}}”
2023-03-11 16:48:51,392 - web_server - INFO - Setting up needed data
2023-03-11 16:48:51,409 - web_server - INFO - >> Publishing data…
2023-03-11 16:48:51,410 - web_server - INFO - Publishing data to HASS instance
2023-03-11 16:48:51,466 - web_server - ERROR - Exception on /action/publish-data [POST]
Traceback (most recent call last):
File “/usr/local/lib/python3.9/dist-packages/pandas/core/arrays/datetimelike.py”, line 962, in _validate_frequency
raise ValueError
ValueError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/usr/local/lib/python3.9/dist-packages/flask/app.py”, line 2528, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/python3.9/dist-packages/flask/app.py”, line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/python3.9/dist-packages/flask/app.py”, line 1823, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python3.9/dist-packages/flask/app.py”, line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File “/usr/local/lib/python3.9/dist-packages/emhass/web_server.py”, line 174, in action_call
_ = publish_data(input_data_dict, app.logger)
File “/usr/local/lib/python3.9/dist-packages/emhass/command_line.py”, line 453, in publish_data
opt_res_latest.index.freq = input_data_dict[‘retrieve_hass_conf’][‘freq’]
File “/usr/local/lib/python3.9/dist-packages/pandas/core/indexes/extension.py”, line 78, in fset
setattr(self._data, name, value)
File “/usr/local/lib/python3.9/dist-packages/pandas/core/arrays/datetimelike.py”, line 891, in freq
self._validate_frequency(self, value)
File “/usr/local/lib/python3.9/dist-packages/pandas/core/arrays/datetimelike.py”, line 973, in _validate_frequency
raise ValueError(
ValueError: Inferred frequency 30T from passed values does not conform to passed frequency H