Eltako "Baureihe 14 – RS485" (Enocean) Debugging

Ok thank you very much. I’ve now quickly restored a backup. I’ll try it tomorrow and get back to you.

hi @philipp14 ,

thanks for the update. I needed to rollback cause of setup problems.

The integration crashed at init process:

2023-12-13 15:41:47.762 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Eltako for eltako
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/eltako/__init__.py", line 64, in async_setup_entry
    gateway_base_id = config_helpers.get_id_from_name(gateway_description)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/eltako/config_helpers.py", line 130, in get_id_from_name
    return AddressExpression.parse(dev_name.split('(')[1].split(')')[0])

here is my config:

eltako:
  gateway:
    device: fgw14usb            
    base_id: 00-00-B0-00       
    devices:
      light:
       - id: "00-00-00-01"
         name: "light a"
         eep: "M5-38-08"
         sender:
             id: "00-00-B0-01"
             eep: "A5-38-08"

it looks like an parsing error for gateway port. My gateway description has no (') at the string.

gateway_description = '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK05EKQL-if00-port0'

Maybe you can help me.

Hi @philipp14 ,

I will try to restart the gateway the next time. Is there anything I can test to help you for this problem ?

Hi @philipp14,

I tried to merge your work on home-assistant-eltako repo from the past 7 months into my original repository where initiated in January some updates of chrysn’s code (GitHub - onIon-energy/home-assistant-eltako: Integration for Eltako 14 series in Home Assistant), but noticed that your repo is no longer forked.

Would you be able to create a pull request in my repo to bring it back in line (like you did in April), or point me to the right way to do this?

Thanks, also for bringing the HA Eltako integration further to life! Your work is vital in this.

Best, Michaël

Hello all,

It’s not always that easy as it looks to create an release. :grimacing: Sorry for the trouble.

I’ve inserted checks for needed info to reload a gateway.

The thing is by introducing the possibility to have more than one gateway a few things changed and made some things incompatible.

  • you need to define new gateways containing base_id in configuration
  • device ids are now not unique anymore and I needed to change the id of the device which is now {gateway_base_id}_{device_id} instead of {device_id}
  • the installation process changed because now you need to define not only which serial port you want to use, you need to choose a mapping between gateway and serial port.
    • This implies that reloading of existing gateways does not work because the given data is not the same anymore

=> Conclusion:

  • Do Backup first!!!
  • You need to delete the existing gateways and add them newly.
  • If you like migrate or old sensor data histories. (There might be better docs than I linked above.)

Hello @michaelpiron,

I decoupled the repos because if you fork a repo you cannot properly track your changes.
Unfortunately, I don’t see a way to create pull-requests to an unlinked repo.

What would you like to achieve by getting pull-requests?

Funnily, I found my repo listed in here. Maybe this came through the initial fork.

Ok, I found a way to get the BR14 messages to my BR12 bus. I managed to borrow a second FGW14 and connected it to my own one.
The first one communicates as gateway from HA the BR14 bus and the second one translates the BR14 to the BR12 bus.

Next step is to switch my FSR12 relays (with F6-02-01).
I need to make a difference for channel 0 and 1.
I found this piece of code in switch.py

    def turn_on(self, **kwargs: Any) -> None:
        """Turn on the switch."""
        address, discriminator = self._sender_id
        
        if self._sender_eep == F6_02_01:
            if discriminator == "left":
                action = 0
            elif discriminator == "right":
                action = 2
            else:
                action = 0

Can anybody tell how to add the discrimination “left” and “right” in the configuration.yaml?

I checked this in the Enocean integration and the use “channel” but this:

      switch:
        - id: FF-8C-E8-82         
          eep: M5-38-08             
          name: "Buitenlamp"   
          channel: left
          sender:                   
            id: FF-8C-E8-82          
            eep: F6-02-01 

does not work.

And how do I put this in the yaml file because when I know how to distinguish between left and right both switches need to have the same adress (ID).

1 Like

Hello @heubie,

never tried it but this should work regardings docs: e.g. 00-21-63-43 left

Unfortunately, it doesn’t work. I can’t figure out what kind of base ID is supposed to be for the gateway.
For FGGW14USB

gateway:

  • base_id: FF-EB-3F-21 # Address which is used to send telegrams into wireless network. Mainly important for transceivers like FAM-USB
  • device: fgw14usb # Supported gateways: gam14, fgw14usb, fam-usb

usb/serial port will be defined when you manaully add the gateway/hub to Home Assistant

devices: 

PCT14_gateway

Hey @netzgauner,
I’ve actually planned to change it a bit. So that you can define an arbitrary Id for the gateway. This gives you also the possibility to change or replace the gateway without losing all the history of the existing devices.
If you have any ideas or wishes how to improve it please let me know.

The gateway base id is the same like fam14. Funnily, i don’t see my gateway in PCT14.

Thanks for the quick reply. But even then the gateway is not found.

con_yaml_eltako

You need to remove the second ‘-’ in front of device.

Ok thanks. Then I misunderstood something, because in the documentation it says…

  gateway:
  - base_id: FF-AA-80-00        # Address which is used to send telegrams into wireless network. Mainly important for transceivers like FAM-USB
  - device: fgw14usb            # Supported gateways: gam14, fgw14usb, fam-usb

Will test it further tomorrow. and report.

Sorry für that I already corrected it here:

Like I said I’m about to change it so that you can define am arbitrary identifier.

1 Like

Sorry but this does not work, any other tips?

    devices:
      switch:
        - id: FF-8C-E8-82 left     
          eep: M5-38-08             
          name: "Buitenlamp"   
          sender:                   
            id: FF-8C-E8-82      
            eep: F6-02-01 
2023-12-15 21:58:12.124 CRITICAL (MainThread) [eltako] Address has disciminator left, None expected
Traceback (most recent call last):
  File "/config/custom_components/eltako/switch.py", line 42, in async_setup_entry
    entities.append(EltakoSwitch(gateway, dev_conf.id, dev_conf.name, dev_conf.eep, sender_config.id, sender_config.eep))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/eltako/switch.py", line 59, in __init__
    super().__init__(gateway, dev_id, dev_name, dev_eep)
  File "/config/custom_components/eltako/device.py", line 31, in __init__
    self.listen_to_addresses.append(self.dev_id.plain_address())
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/eltakobus/util.py", line 39, in plain_address
    raise ValueError("Address has disciminator %s, None expected" % self[1])
ValueError: Address has disciminator left, None expected

No.
still can´t find any gateway

Deletet integration deletet repo. Intalled everything new. But still can´t find. :thinking:

OK sorry working now. Got a copy paste foult from old to new yaml in a cover device. :face_with_peeking_eye:

1 Like

Can you explain me what that left and right means? And for which switches that is meant?

I use switches based on PTM215 which have 4 button. Actually the EEP F6-02-01 does support all 4 an pressing 2 at the same time. Only in the code there is left and right supported.
If you want have more possibilities here that is easy to extend.

The thing with Enocean (and therefore Eltako) is that they use different names for units than the rest of the world.

What everybody calls a switch, that knob on the wall or that button on a remote Enocean uses binary_sensor.

And what the rest of the world calls a relay or a contact which can be turned on and off they call it a switch

Therefor my FSR12 (in BR14 this is a FSR14) are called Switch and the left and right I’m referring to are the two relays in the unit. In the Enocean intergration these are called Channel 0 or 1

Mh, that does not real fit. All channels can be mapped to single and independent addresses. It doesn’t matter if you have a FSR14x2 or x4 or many used in conjunction.
The eep F6-02-01 is the telegram from the wall-mounted switches. By using switch in HA you have a virtual clone of a real wall-mounted switch.