Ok I just fixed it… I will let you know how it looks after a few days.
No doubt your right and this is the problem!
Thanks.
No that is not the fix now it is showing almost nothing.
The Hall now is 6 kWh according to Neviweb as an example.
As that didn’t work please let me know what I should try next.
I’ll check few things on my side and come back to you asap
The hourly_kwh
is giving you the kwh used for each hour. If there is no heating for one hour you will get 0 kwh.
Look like the data you compare in Neviweb are for a 24hrs period. In that case you should replace hourly_kwh
by daily_kwh:
state: "{{ state_attr('climate.neviweb_climate_den','daily_kwh') }}"
Thanks! I will give that a try and report back in a day or two once I have the data.
Thanks,
Joe
I also just noticed I was comparing apples with oranges.
Neviweb above gives you the last 24 hours.
HA above I think gives you the number since midnight.
So not going to be the same number.
Hopefully now when I look at what the total BOTH had for November 4th on November 5th they should be about the same.
@claudegel well sadly that didn’t work.
As they day went on the numbers looked more and more correct as I wanted.
But then I guess at midnight or around then the Neviweb numbers went back to 0 for the next day.
And that number is what got stored in HA for the day. (DAM!)
So at the end of the day when I go back and look in HA I see 0 kwh for most things for yesterday.
Just to be clear when I went to bed around 11 PM last night the hall was showing the correct numbers everything looked spot on to the total neviweb had. But today when I go and look back on yesterday I see 0 kWh in HA for the hall even thought it was over 12 kWh at 11 PM. So I assume it got set back to 0 around midnight and then that is what gets saved.
Any thoughts on how to address this?
Here is the HA data for yesterday.
Here is the Neviweb data for the same day…
This is how I have the variables setup now.
- sensor:
- name: "bathroom_energy_sen"
unique_id: sensor.bathroom_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_bathroom','daily_kwh') }}"
- sensor:
- name: "bedroom_energy_sen"
unique_id: sensor.bedroom_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_bedroom','daily_kwh') }}"
- sensor:
- name: "den_energy_sen"
unique_id: sensor.den_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_den','daily_kwh') }}"
- sensor:
- name: "dining_room_energy_sen"
unique_id: sensor.dining_room_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_dining_room','daily_kwh') }}"
- sensor:
- name: "ensuite_energy_sen"
unique_id: sensor.ensuite_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_ensuite','daily_kwh') }}"
- sensor:
- name: "hall_energy_sen"
unique_id: sensor.hall_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_hall','daily_kwh') }}"
- sensor:
- name: "joe_office_energy_sen"
unique_id: sensor.joe_office_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_joe_office','daily_kwh') }}"
- sensor:
- name: "karen_office_energy_sen"
unique_id: sensor.karen_office_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_karen_office','daily_kwh') }}"
- sensor:
- name: "living_room_energy_sen"
unique_id: sensor.living_room_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_living_room','daily_kwh') }}"
- sensor:
- name: "porch_energy_sen"
unique_id: sensor.porch_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total
state: "{{ state_attr('climate.neviweb_climate_porch','daily_kwh') }}"
Ok a few days later…
Now I am wondering if I should be using Total_Increasing like this?
- sensor:
- name: "bathroom_energy_sen"
unique_id: sensor.bathroom_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
state: "{{ state_attr('climate.neviweb_climate_bathroom','daily_kwh') }}"
Ok … problem solved… It looks like you need to use total_increasing vs just state_class of total. If you use state class of Total at Midnight when daily_kwh goes back to 0 that will be the value saved at the end of that day. Where if you use total_increasing you get the maximum value saved as the total for that day and it ignores the reset to 0. But the next day starts at 0 and builds up just fine.
Joe
Hi @claudegel I just noticed that since Daylight Saving Time ended on Nov 3, my thermostat is still stuck an hour forward. Is there a way to have it automatically sync with my home assistant since it’s correct?
@DanZChief how do you connect your thermostat ? via zha or GT130 ?
Via GT130 Neviweb is sending time once a day. But via zha you need to do it yourself with an automation.
Ok so your last example is working properly ?
- sensor:
- name: "bathroom_energy_sen"
unique_id: sensor.bathroom_energy_sen
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
state: "{{ state_attr('climate.neviweb_climate_bathroom','daily_kwh') }}"
I’ll update the doc.
I connected mine through Z2M, not sure if it’s a different process from ZHA. How would do this via an automation?
UPDATE! Disregard… Upon a reboot everything worked!
New issue… Neviweb error not loading on reboot…
Did they make changes on the server side again?
Logger: homeassistant.setup
Source: setup.py:416
First occurred: 3:02:41 PM (1 occurrences)
Last logged: 3:02:41 PM
Error during setup of component neviweb
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/socket.py", line 964, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 716, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1061, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xffff59a7aff0>: Failed to establish a new connection: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 802, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 594, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='neviweb.com', port=443): Max retries exceeded with url: /api/locations?account$id=8870 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff59a7aff0>: Failed to establish a new connection: [Errno -3] Try again'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/neviweb/__init__.py", line 179, in __get_network
raw_res = requests.get(LOCATIONS_URL + self._account, headers=self._headers,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='neviweb.com', port=443): Max retries exceeded with url: /api/locations?account$id=8870 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff59a7aff0>: Failed to establish a new connection: [Errno -3] Try again'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 416, in _async_setup_component
result = await task
^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/neviweb/__init__.py", line 78, in setup
data = NeviwebData(hass_config[DOMAIN])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/neviweb/__init__.py", line 102, in __init__
self.neviweb_client = NeviwebClient(username, password, network, network2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/neviweb/__init__.py", line 134, in __init__
self.__get_network()
File "/config/custom_components/neviweb/__init__.py", line 222, in __get_network
raise PyNeviwebError("Cannot get networks...")
custom_components.neviweb.PyNeviwebError: Cannot get networks...
network is the name of the location in Neviweb where are registered all your devices. Did you change the network name on Neviweb or in HA config ?
Check for capital letter, Name is different then name
To enable time you need to send a blank message to the following MQTT topic:
zigbee2mqtt/<FRIENDLY_NAME>/set/thermostat_time
Every time the above message is sent, Zigbee2MQTT will calculate the current time and send it to the thermostat.
If the thermostat loses power, you need to do this again. For Home Assistant users: if you want to avoid remembering to do this, you can add the following action
to your Auto_Publish_Outdoor_Temperature
automation (noted above).
- service: mqtt.publish
data:
topic: zigbee2mqtt/<FRIENDLY_NAME>/set/thermostat_time
payload: ''
I think now the word «service» is replaced by «action»
Thanks for the help so far, I’m a complete beginner!
I also did some research as to how to trigger this whenever daylight savings time starts of ends. Ended up with this:
{{ now().utcoffset() != (now().replace(day=(now().day - 1), hour=0, minute=0, second=0).utcoffset()) }}
No no changes… A reboot and everything was fine…
Not sure what happened.
Maybe you restart HA many time and if you do it too frequently Neviweb just block your session. You need to wait or flush the cash in your browser
It was after a HA crash. So not sure…
Anyway it is all good now.
Bonjour Claude,
J’avais acheté 7 thermostats Sinope l’an dernier et j’ai utilisé avec succès les signaux de Eco-sinopé tel que vous les décrivez dans la documentation pour monitorer les événements de pointe dans HA.
Cette année, je me suis inscrit à Hilo pour bénéficier de leurs reboursements partiels sur le coût des thermostats. Toutefois, je voudrais quand même monitorer les événement de pointe dans HA, car j’ai d’autres thermostats non compatibles avec Hilo que je voudrais contrôler.
Est-ce que vous savez si le contrôle des thermostats Sinope via Hilo utilise les mêmes catactéristiques que Éco-Sinopé? En particulier est-ce que l’énoncé suivant de votre doc est toujours applicable lorsque c’est Hilo qui en contrôle?
Blockquote
Merci d’avance!