Eltako "Baureihe 14 – RS485" (Enocean) Debugging

I haven’t found it in the forum nor the documentation. What position does the BA switch on the FAM14 needs to be?

Depends :slight_smile:

I use BA 2

https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.eltako.com/fileadmin/downloads/de/_bedienung/FAM14_30014000-3_dt.pdf&ved=2ahUKEwiY3P68156DAxX2X_EDHctYAnkQFnoECBgQAQ&usg=AOvVaw0upp4VfutXRPDq6Nmv450p

For everybody who wants to do some testing or monitoring and don’t want to spend a whole lot of money. If you by a simple and cheap USB<->RS485 device connect the A and B connections to the BR14 bus you can monitor the data via a PC. (56000 baud)
I tested also that if you put the FGW14 as your gateway it works as well.

Btw. the BR12 RSA-RSB bus is also a RS485 but at 9600 baud.

sorry for the quality…

1 Like

I connected the FAM14 to my HA and installed the Integration as described in the documentation.

Unfortunately the initial setup won’t work, I get following error:
grafik

So I added the gateway to the configuration:
grafik
grafik

But still the same error.

It starts first with eltako:

See example config here:

It does. The Eltako: is in the configuration.yaml and the rest in the included eltako.yaml

Have the same for modbus and mqtt integration. This way the configuration.yaml stays clean and I have all devices from one integration in an seperate yaml.

I’ve changed now a bit the way how the existing gateways are filtered out in the selection part. Plus I’ve added more output logs including the whole configuration how the integration is getting it from HA.
Please check the logs if you can find something suspicious. My tests have worked so far.

Changes are on main branch.

I have added an dummy light to the configuration and now the setup works.

1 Like

Does this mean you need to enter at least one device in the devices section of a gateway so that it works?

1 Like

I will do some testing in the morning.

I got everything working but I found out that the status of the devices / entities are updated with the replies they give.

Since the 12 -serie does not give any replies it would be very helpful to have a way to update the status automatically whenever a device is switched even if there is no reply. Maybe with so setting in the configuration or so.

Will there be more changes in the near future, which will change the entities (gateway changes)? It’s quite a bit of work with my setup to bring everything back up to date.

Hello @netzgauner,

no, it’s not planned to have further breaking changes and all tests look good so far.

I’m about to make the generation of the configuration more easy and started to develop an GUI for it. In the end it will do the same like the existing command line tool which was improved recently. It can now detect many sensors and switches which are registered in the actuators and automatically adds them into the configuration.

This is not possible, I get this error:

Invalid config for [eltako]: expected a dictionary for dictionary value @ data['eltako']['gateway'][0]['devices']. Got None. (See /config/configuration.yaml, line 170).

I found that when I use a physical button to switch a lamp or relay the status gets updated, but when I use a software button in the UI the status doesn’t get updated. Any idea why?

but after pushing the physical on button:

Yes, when changing the status in ha it wait for the status update of the actuator. You can disable that by …

Your error message says you need to have at least one device in the gateway section.

YES!!! This works perfect.I finallly switch of my FHEM machine!!!

I know but asked in post 188 if it was possible to run two gateways where one has no devices and I checked it and this was the error.

Just one more question. Is there also an “all off command”

1 Like

I found out that my FSR12 relay’s switch opposite of the actions declared in the switch.py for F6-02-01. So HA showed “on” when it was “off” and “off” when it is “on”. Therefor a use F6-02-02 for these 4 relay’s and added an inverted action behavior for the F6-02-02 in switch.py

This fixed my issue but does anybody noticed the “inverted” on/off action on a relay?

    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
                
            pressed_msg = F6_02_01(action, 1, 0, 0).encode_message(address)
            self.send_message(pressed_msg)
            
            released_msg = F6_02_01(action, 0, 0, 0).encode_message(address)
            self.send_message(released_msg)

        elif self._sender_eep == F6_02_02:
            if discriminator == "left":
                action = 1
            elif discriminator == "right":
                action = 3
            else:
                action = 1
                
            pressed_msg = F6_02_02(action, 1, 0, 0).encode_message(address)
            self.send_message(pressed_msg)
            
            released_msg = F6_02_02(action, 0, 0, 0).encode_message(address)
            self.send_message(released_msg)
        
        if self.general_settings[CONF_FAST_STATUS_CHANGE]:
            self._on_state = True
            self.schedule_update_ha_state()


    def turn_off(self, **kwargs: Any) -> None:
        """Turn off the switch."""
        address, discriminator = self._sender_id
        
        if self._sender_eep == F6_02_01:
            if discriminator == "left":
                action = 1
            elif discriminator == "right":
                action = 3
            else:
                action = 1
                
            pressed_msg = F6_02_01(action, 1, 0, 0).encode_message(address)
            self.send_message(pressed_msg)
            
            released_msg = F6_02_01(action, 0, 0, 0).encode_message(address)
            self.send_message(released_msg)
        
        elif self._sender_eep == F6_02_02:
            if discriminator == "left":
                action = 0
            elif discriminator == "right":
                action = 2
            else:
                action = 0
                
            pressed_msg = F6_02_02(action, 1, 0, 0).encode_message(address)
            self.send_message(pressed_msg)
            
            released_msg = F6_02_02(action, 0, 0, 0).encode_message(address)
            self.send_message(released_msg)

Hey all,

it’s been a while I came here as I got distracted by other things and now finally getting back to it. I must say I’m amazed by the amount of work that happened here! Really impressive! :open_mouth:

I today tried to load the integration and it was quite challenging. It seems the configuration documentation is not up to date at all with what is in this thread. But that’s ok (for now :wink: ).

I have another weird issue now though. Every single time I try to add the Eltako integration, it tells me “Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble”.

 File "/config/custom_components/eltako/config_flow.py", line 67, in manual_selection_routine
    g_list = list([g for g in g_list_dict.values() if g not in self.hass.data[DATA_ELTAKO]])
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/eltako/config_flow.py", line 67, in <listcomp>
    g_list = list([g for g in g_list_dict.values() if g not in self.hass.data[DATA_ELTAKO]])
                                                               ~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'eltako'

The device is at /dev/ttyUSB0. I tried specifying it and not, but no real difference.
My config is really basic:

eltako:
  general_settings:
    fast_status_change: False # True: Changes status in HA immediately without waiting for actuator response. Default: False
    show_dev_id_in_dev_name: True
  gateway:
    - id: 1
      device_type: fgw14usb # Supported gateways: gam14, fgw14usb
      base_id: FF-AA-80-00
      devices:
        light:
          - id: 00-00-00-01
            eep: M5-38-08
            name: FSR14_4x - 1
            sender:
              id: 00-00-B0-01
              eep: A5-38-08

Can someone try to help me understand why the key eltako can not be found? It’s clearly there. But the config that’s being read are the children of the eltako config item, as can be seen from the logs:

2023-12-28 22:42:28.282 DEBUG (MainThread) [eltako] Add new gateway
2023-12-28 22:42:28.304 DEBUG (MainThread) [eltako] Config: {'general_settings': {'fast_status_change': False, 'show_dev_id_in_dev_name': True}, 'gateway': [{'id': 1, 'device_type': 'fgw14usb', 'base_id': 'FF-AA-80-00', 'devices': {'light': [{'id': '00-00-00-01', 'eep': 'M5-38-08', 'name': 'FSR14_4x - 1', 'sender': {'id': '00-00-B0-01', 'eep': 'A5-38-08'}}]}, 'name': ''}]}
2023-12-28 22:42:28.324 DEBUG (MainThread) [eltako] my debug: {1: 'EnOcean ESP2 Gateway - fgw14usb (Id: 1, BaseId: FF-AA-80-00)'}
2023-12-28 22:42:28.325 ERROR (MainThread) [aiohttp.server] Error handling request

I don’t understand how this can work?

Thanks a ton!

Hello @cvvvlb,

I hope I could fix it. Changes are pushed to main branch.

Sorry for that. I’m always trying to improve the whole testing and staging things but this is quite complex in conjunction with home assistant.

1 Like

Thanks so much and apologies for the late reply!! I will test asap! :slight_smile:

@philipp14 just to confirm, yes, it’s working now! Great stuff! Thanks so much!

1 Like