Youless intergration

Hi Gerben.
I have uninstalled it from HACS, updated the configuration.yaml rebooted, do not see any youless custom components, but do not get it working. It drives me mad.
Another installation with the same setup worked perfectly when i migrated, but there I have gas metering and electro.
If needed I can give you access to the install, maybe there are some leftovers from HACS install
Thanks
Nicky

No matter the intent, never provide others direct access to your installation.

Do you have pvoutput firmware installed on the youless? If so that is the cause, this is not yet supported.

Otherwise open the logs of home assistant and post any information relating to the youless integration.

Thanks for getting back.

Nothing special installed on the youless clean reset, in one system it works not in this one, logs are empty no errors. So I think there is somewhere a problem in the logic of the integration, I only have the electro consumption

So to fix it I am now using the code provided earlier in this thread (big thanks to @Davey400 ) . But for sure the integration has a bug


###############################
# YOULESS SENSOR - workarround
###############################
  - platform: command_line
    name: youless
    json_attributes:
    - net
    - gas
    - pwr
    - ts0
    - cs0
    - ps0
    - p1
    - p2
    - n1
    - n2
    command: 'curl -X GET http://192.168.0.11/e | jq -c ".[0]"'
    value_template: 'OK'
  - platform: template
    sensors:
      youless_netcounter:
        value_template: "{{ state_attr('sensor.youless','net') }}"
        entity_id: sensor.youless
        friendly_name: 'Electro Meter'
        unit_of_measurement: 'kWh'
      youless_gas:
        value_template: "{{ state_attr('sensor.youless','gas') }}"
        entity_id: sensor.youless
        friendly_name: 'Gas meter'
        unit_of_measurement: 'm3'
      youless_power:
        value_template: "{{ state_attr('sensor.youless','pwr') }}"
        entity_id: sensor.youless
        friendly_name: 'Current power consumption'
        unit_of_measurement: 'W'
      youless_power_production:
        value_template: "{{ state_attr('sensor.youless','ps0') }}"
        entity_id: sensor.youless
        friendly_name: 'Current power production'
        unit_of_measurement: 'W'    
      youless_consumption_high:
        value_template: "{{ state_attr('sensor.youless','p2') }}"
        entity_id: sensor.youless
        friendly_name: 'Electro consumption high'
        unit_of_measurement: 'kWh'
      youless_consumption_low:
        value_template: "{{ state_attr('sensor.youless','p1') }}"
        entity_id: sensor.youless
        friendly_name: 'Electro consumption low'
        unit_of_measurement: 'kWh'
      youless_production_high:
        value_template: "{{ state_attr('sensor.youless','n2') }}"
        entity_id: sensor.youless
        friendly_name: 'Electro production high'
        unit_of_measurement: 'kWh'
      youless_production_low:
        value_template: "{{ state_attr('sensor.youless','n1') }}"

Just to make sure. Have you also manually deleted the directory in custom_integrations and restarted

1 Like

Yes, and I even tried clean install.
I logged a bug report and there are more people with the same issue, so hopefully someone inspects the logic…

Hi all,

I was succesfully using the integration for about a month now, but since a few days, I got errors like below

Logger: homeassistant.components.youless
Source: components/youless/init.py:32
Integration: YouLess (documentation, issues)
First occurred: 12:43:58 (1 occurrences)
Last logged: 12:43:58

Unexpected error fetching youless_gateway data: Expecting value: line 1 column 41 (char 40)

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 187, in _async_refresh self.data = await self._async_update_data() File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 147, in _async_update_data return await self.update_method() File “/usr/src/homeassistant/homeassistant/components/youless/init.py”, line 32, in async_update_data await hass.async_add_executor_job(api.update) File “/usr/local/lib/python3.9/concurrent/futures/thread.py”, line 52, in run result = self.fn(*self.args, **self.kwargs) File “/usr/local/lib/python3.9/site-packages/youless_api/init.py”, line 45, in update self._device.update() File “/usr/local/lib/python3.9/site-packages/youless_api/devices.py”, line 173, in update response = validate_enologic_response(response.json()[0]) File “/usr/local/lib/python3.9/site-packages/requests/models.py”, line 910, in json return complexjson.loads(self.text, **kwargs) File “/usr/local/lib/python3.9/site-packages/simplejson/init.py”, line 525, in loads return _default_decoder.decode(s) File “/usr/local/lib/python3.9/site-packages/simplejson/decoder.py”, line 370, in decode obj, end = self.raw_decode(s) File “/usr/local/lib/python3.9/site-packages/simplejson/decoder.py”, line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 41 (char 40)

Someone has a clue what this is all about ?

Kr,

BArt

trying to add the enelogic p1 reader ( Youless LS110) to HA.
Tried the normal integration that sees the Youless but does not give any readings.
It sees the sensors.
Added the integration from: jongsoftdev / youless / custom_components — Bitbucket
but to no avail.
When i use the ipaddress with the port 1000
http://192.168.1.198:1000 sees the youless without portnumber i get a ‘Unknown error occurred’.
Any thoughts?

Hello

Perhaps a stupid question, but what is the correct setup for the sensors in the energy dashboard with the Youless 120? Because I’ve tried a lot but somehow things don’t add up.

Regards

hi @MaartenProvo,

I would say its correct in your screenshot.
mine is the same:

²Can we somewwhere extract the actual HOUSEHOLD Load ? This is the grid consumption, but if you have batteries & PV panels, I would like to know how much Power I’m currently requesting, and how much power is currently used by grid, battery & PV

Anyone ?

Thx,

Bart

If you really mean power ((k)W, not (k)Wh) this is hard to get right. Unless you actually measure it (which in many installations might even be impossible depending on how things are connected) you can only calculate it.

But the trouble is, the values you get from solar and your energy meter are samples that are often not very frequent, not at the same time, and fluctuating. So when you start adding and subtracting samples from different points in time, the result may at times be weird.

The power flow card in HACS can do many of the calculations for you. It is quite nice to have, and usable if you know values are not exact and can even be impossible at times during fluctuations.