Tank Level heating oil - Integration tecson sensor

There were two reasons for looking into this topic. The two plastic tanks are slowly going blind and I wanted a history of the heating oil tank level in Home Assistant.

I found some useful inormation @Tecson homepage. As my two battery tanks almost always have the same level, I decided against the variant for battery tanks and ordered the e-litro net instead, which I integrated into our home network via cable. I use the measurements of the single tank to calculate the total level in Home Assistant, which is then displayed as the current level in the app.

dashboard-heizöllevel

The installation of the tecson sensor is well described and if you still have a free “blind cap” on the tank, you can simply use it to bring the sensor into the tank. Alternatively, you have to drill a hole. The tecson support team advised me exactly where to drill the hole. I sent them photos of my tank system by e-mail.

As soon as you have integrated the tank sensor into your local network, you can access it via http://IP-adress. For the integration with Home Assistant you shall use the XML interface via http://IP-adress/xml

I have added following in my configuration yaml:

In the section “rest:”

  - resource: http://192.xxxx/xml
    scan_interval: 3600
    sensor:
      - name: "Oil tank 1"
        device_class: volume_storage
        state_class: measurement
        unit_of_measurement: "L"
        unique_id: oellevel_raw
        value_template: "{{ value_json.seqSmartbox.seqData.seqTanks.seqTankLevel.tankLevel }}"

This is the configuration of a sensor for a single tank. As I have two tanks of the same size, but only measure in one tank, I have added the following to the template section.

      - name: "tank level"
        unit_of_measurement: "L"
        state_class: "measurement"
        unique_id: oellevel_current_sum
        state: >
          {% if states('sensor.oeltank_1') | int(-1) >= 0 %}
            {{ states('sensor.oeltank_1') | int * 2 }}
          {% endif %}

The if statement checks whether the current value of the rest sensor is a number. Only then will the value be used for the calculation. For example, if you have 4 tanks of the same size, you must of course insert * 4 :wink:

Info: Link to the german version: it-und-hausautomation

Hello user-x-adm Frank,
i tried to configure my e-litro with the wifi-SmartLink Adapter
for HomeAssist, but i did not get any response with the parameter
http://192.168.2.241/xml (192.168.2.241 without /xml is working fine)
in my Webbrowser. (Page not found)
Thanks for help
Marc

It could be a problem with your webbrowser, because there is no style information. I have tested the xml page using Microsoft Edge.
And I use the e-litro net - maybe there is a different to the e-litro (without net). Maybe you should ask the support of tecson in this case. The xml access works fine on my device without any configuration changes — out of the box.

So maybe you should get in touch with the tecson support.
Frank