Eltako "Baureihe 14 – RS485" (Enocean) Debugging

the values of the target temperature can be accessed using temperature as well as current_temperature for the current temperature of a climate entity

it would be possible to use either events or create a fake eltako climate and set it using climate.set_temperature

eg. get the climate from tado using state_attr(‘climate.tado_smart_thermostat_su0658204416’, ‘current_temperature’) }} and state_attr(‘climate.tado_smart_thermostat_su0658204416’, ‘temperature’) }}

and either throw an event or set the temperature of a fake climate

basic home assistant example:

alias: Tado
description: Notify current temperature when a button is pressed
trigger:
  - platform: device
    device_id: 29214bf168d4e16d79746ce52d83d338
    domain: button
    entity_id: 7d64509ae89ba3dab5ce076ee1e51534
    type: pressed
action:
  - service: notify.mobile_app_ipad
    data:
      message: >-
        The current temperature is {{
        state_attr('climate.tado_smart_thermostat_su0658204416',
        'current_temperature') }} and {{
        state_attr('climate.tado_smart_thermostat_su0658204416', 'temperature') }} degrees
        Celsius.
mode: single

as you said, i think this could be kinda useful

@philipp14

I have added a basic function to the gateway to send arbitrary telegrams. Since each gateway can be used with a different base id, I added the service function for each of them.

# This example allows to send a telegram to turn on the light.

Service: eltako.gateway_1_send_message
Data:
  id: FF-82-3E-04
  eep: A5-38-08
  Command: 1

You can find everything in this gist, the example in the gist can currently only be used for switchable lights and for setting the temperature.

Changed code at line 243 and 244 as well as 147 to 173.

Let me know your thoughts and if you have any questions.

1 Like

Awesome!!!

Changed it a bit so that you don’t need to distinguish between the cases of EEPs. Meaning to say, you just specifies the arguments and it picks the right EEP. In the logs you can then see if something was missing:

@Vinnovic how did you get the position status working again?

I updated to v1.4 but its still showing opening/closing even after the shutter stopped. The percentage is show correct but status don’t switch to open.

I installed the main and that worked ok for me. I haven’t installed the 1.4 version yet

The changes from the main branch should be in v1.4

@philipp14 do you have any idea why the state of the roller shutters is not reflected correct?

Did you restart home Assistent after the update?

I had once also trouble updating to the next version because HACS just didn’t change the deployment but this was longer ago.
Can you update HACS?

Yes, I did restart HA. HACS is up to date.

But I copied the covers.py from the main manually over to HA before updating to v1.4 back then. But from my understanding on an update all the files will be overwritten?

Maybe I have to uninstall the eltako integration and reinstall it?

I removed all eltako entities, deleted the integration and rebootet HA.

Then I downloaded the integration again from HACS, installed it and rebootet.

Unfortunately the state still stays at closing/opening event though the roller shutter stops at the correct percentage and also the percentage is show correctly:

@Hersfeld You may try to copy over this file and check it again, you may need to remove the py cache folder within the eltako integration.

The link contains a bug fix that is available in the feature branch, maybe this fix will work for this situation as well.

There is a merge mistake in it :see_no_evil:. I took over your corrected method in addition so we have now two times the same method but luckily it takes always the new and second one. That’s why tests worked and I haven’t recognized it.
So it work and will be cleanup soon.
So often it would be much easier to have a type-safe language.

Yeah, i see.

One more thing.

You changed the code to add an else, that may cause the cover position to show up as either 0 or 100 when stopping the cover mid flow, surely this will only happen once, after a full opening or closing it will be set.

The way i changed it without the else was more like this approach:

Your cover might be either 100% open or 100% closed at first launch, (there may be situations where the cover might be 50% closed or open, but i think this will happen rarely) therefore setting the value to 0 or 100 and calculate the position on top with:

self._attr_current_cover_position = max(self._attr_current_cover_position - int(time_in_seconds / self._time_closes * 100.0), 0)

may cause the cover to show up correct in most situations at first run, while the added else will cause the cover to show either fully opened or fully closed at first run, even when stopping the cover mid flow.

Just some thoughts :smiley:

Thanks, I will change it back to your implementation. Could you please extend the tests so that I won’t change it back to a bad state.

I found also something which could explain the update problems although I’ve ignored it in the beginning completely and it worked anyways.
In the manifest I’ve forgot to increase the version number of the integration.

I rather think it is more an python cache issue.

I have deleted the pycache but still the state stays at opening/closing.

I also tried to delete the Integration and the eltako folder from custom_components. Then I tried both, main and v1.4 but for both I didnt worked.

Maybe there is an error in my configuration?

    - id: 00-00-00-1D
      eep: G5-3F-7F
      name: "Arbeitszimmer links"
      sender:
        id: FF-D6-30-1B
        eep: H5-3F-7F
      device_class: shutter
      time_closes: 16
      time_opens: 17

Hello @Hersfeld,

you are right, I do have the same behavior.

For me the documentation about cover states is not really clear. In which state is it when half-open? Other integrations use always open if it is not completely closed. Then also both buttons work. :slight_smile:

I made it now like in this example:

I pushed changes to main. Can you please test if it works like you would expect it?

1 Like

@philipp14 Tested with the main branch and its working again as expected. State changes to Open X% and I can click open/close button.

Thank you very much for the fix!

Sorry for me it was until now unclear what the correct in between state was.

I will write some unit-tests to ensure it won’t change back and then I probably will make a new release. There are already some new features on main.

@Hersfeld Do the percentage values fit?

Yes, the values fit.

1 Like