Need help with setting up some EnOcean devices

I’d be willing to bet that whole string works. FYI your os is HassOS. You’re running Hassio on HassOS.

Allright then, my config looks like shown below now.
Now i am searching for the correct device IDs. Where exactly do i find them? I looked behind the switches and in the PCT14-Project the pre-owner of the house sent me. I tried different numbers but none of them look like the example in the HA EnOcean manual:

# Example configuration.yaml entry
binary_sensor:
  - platform: enocean
    id: [0x01,0x90,0x84,0x3C]

I tried different numbers i found but i always get this error:

Fri Jan 10 2020 18:37:40 GMT+0100 (Mitteleuropäische Normalzeit)

Invalid config for [binary_sensor.enocean]: expected int @ data['id'][0]. Got 'AB' expected int @ data['id'][1]. Got 'BA'. (See ?, line ?). Please check the docs at https://home-assistant.io/integrations/enocean/

Here is my config:


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

mobile_app:
discovery:

knx:
  tunneling:
    host: 192.168.178.47
    port: 3671
    local_ip: 192.168.178.109
    
switch:
  - platform: knx
    name: Geräteschuppen Licht
    address: 1/0/1

  - platform: knx
    name: Gartenhaus Licht
    address: 1/1/1

  - platform: knx
    name: Bewässerung am Gartenhaus
    address: 2/0/1

  - platform: knx
    name: Bewässerung SüdWest
    address: 2/1/1

  - platform: knx
    name: Bewässerung Einfahrt/Straße
    address: 2/2/1

  - platform: knx
    name: Bewässerung Terrase
    address: 2/3/1

  - platform: knx
    name: Pumpe I/O
    address: 2/4/1

  - platform: knx
    name: Bewässerung Beete NordOst
    address: 2/5/1

  - platform: knx
    name: Garagentor öffnen
    address: 5/1/0

  - platform: knx
    name: Garagentor schließen
    address: 5/1/1

enocean:
  device: /dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT3NUQNM-if00-port0
  
# Example configuration.yaml entry
binary_sensor:
  - platform: enocean
    id: [AB,BA,02,13]

you need to use the byte values for the id’s on the binary sensor. Simply add 0x before each of those values.

binary_sensor:
  - platform: enocean
    id: [0xAB,0xBA,0x02,0x13]

Or if you know how to convert hex to decimal…

binary_sensor:
  - platform: enocean
    id: [171, 186, 2, 19]

I think we are almost there :wink:
Now i dont have any errors anymore.
The device appears as entity but i cannot switch it on or off. Maybe this is because i configured it as a “binary sensor”? I don´t understand this because the EnOcean documentation under “binary sensor” lists the PTM215 module. All our wall switches are in fact PTM 215s.

Not sure, I don’t have these devices. But if it’s a switch, try and configure as a switch

I think we might be almost there :wink:

The USB 300 has a little LED. When i press one of the wall-switches, this LED flashes 2 times (on press and release).

I configured one device as switch (see config.yaml near the bottom). When i press the switch in HA the little LED flashes, too. This means it is doing something, right? Unfortunately no lights turn on.

I read something about setting um the switches as an automation, as suggested in the HA enocean manual here: Can't use ttyUSB0 device on Hass.io (with Enocean USB300)

But i am not sure how to set it up correctly. Can someone check my config? Thank you so much!


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
# automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

mobile_app:
discovery:

knx:
  tunneling:
    host: 192.168.178.47
    port: 3671
    local_ip: 192.168.178.109
    
switch:
  - platform: knx
    name: Geräteschuppen Licht
    address: 1/0/1

  - platform: knx
    name: Gartenhaus Licht
    address: 1/1/1

  - platform: knx
    name: Bewässerung am Gartenhaus
    address: 2/0/1

  - platform: knx
    name: Bewässerung SüdWest
    address: 2/1/1

  - platform: knx
    name: Bewässerung Einfahrt/Straße
    address: 2/2/1

  - platform: knx
    name: Bewässerung Terrase
    address: 2/3/1

  - platform: knx
    name: Pumpe I/O
    address: 2/4/1

  - platform: knx
    name: Bewässerung Beete NordOst
    address: 2/5/1

  - platform: knx
    name: Garagentor öffnen
    address: 5/1/0

  - platform: knx
    name: Garagentor schließen
    address: 5/1/1

  - platform: enocean
    id: [0xfe,0xfe,0x74,0xec]


enocean:
  # device: /dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT3NUQNM-if00-port0
  device: /dev/ttyUSB0

automation:
  - alias: Licht Test
    initial_state: on
    trigger:
      platform: event
      event_type: button_pressed
      event_data:
        id: [0xfe,0xfe,0x74,0xec]
        pushed: 1
        which: 1
        onoff: 0
    action:
      - service: switch.toggle
        entity_id: switch.xxx

Is that issue solved (as its quite a while since someone replied)?
I’m just curious as I probably face the same issues soon.

Hello I am also interested by your result. Indeed I try to trigger with HA some fsb61np actuators (for roller shutter) controled by a soft remote control nodon. But I don’t know how to proceed :thinking::confused::cry:

Hello Christian,

where exactly are you stuck? Did you find out the device IDs for the remote and the actuator?
If you have a linux machine available, you can plug in your Enocean Stick and read the device ID this way too, no need to pry open the cases of those devices then.

EDIT: Also you can set the debug level of the enocean component to debug and look at the IDs in the log

Hello fedot,
Thank you for your time.
Today I have succeeded to find device IDs of my remote control and actuator.
I understand that, for my project (control roller shutter with HA) that the most important is to communicate with the actuators of the cover.
As I also understood that these actuators are not supported by Enocean of HA, so I try now to use MQTT between FHEM (which is able to control the actuators) and HA.

I have define MQTT mosquito broker in HA. Now, I understand that I need to define a MQTT in FHEM but I don’t know how :frowning:
Then I will have to launch a ‘’‘mosquitto_pub - h 192.168.1.4 - t /…/set - m “closes”’ ‘’’ for a test. but I don’t know exactly what I need to write for this test :frowning:

PS just to understand fedot : I have just added enocean directly on configuration.yaml so I don’t how to check if my remote control is detected with a debug mode. Do I miss something? I Don’t understand how to have debug mode?

Hey Christian,

enabling debug mode will allow you to read the actual Enocean radio traffic (containing device IDs for example), so you don’t have to open up remotes and such where the IDs are inside of the device.
Seems like you’ve already got this step done, but if you want to double-check:

Add this to your configuration.yaml:

logger:
  default: error

Go to the Developer Tools -> Services
Select service logger.set_level with data:

homeassistant.components.enocean: debug

Now, press the buttons you want to press on your remotes and they will show up (Developer Tools -> Logs -> Show Full Home Assistant Log -> Scroll to the very bottom)

The messages will look sth. like this:

2020-06-01 11:36:45 DEBUG (Thread-4) [homeassistant.components.enocean] Received radio packet: AA:AA:AA:AA->FF:FF:FF:FF (-58 dBm): 0x01 ['0xbb', 0x'bb', '0xcc', '0xcc', '0xcc', '0xcc', '0xdd'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x3a', '0x0'] OrderedDict()

I’ve replaced my device’s ID in the upper example - however you should get the idea. The actual device ID is only the part I’ve replaced with 0xcc!

I don’t have any enocean relays or actuators, but if I read the manual right, it seems like you might have to learn the remote (being the enocean USB key) to the device if you can’t trigger it with just the ID set as a switch (like in the docs: https://www.home-assistant.io/integrations/enocean/#switch)
Speaking of which - looking at the config example you’ve provided - maybe you can try out multiple channels since you didn’t specify any?

Anyway, can you set the actuator to learning mode and flip the switch you’ve set in HA a few times? Maybe that will do it.
IMHO - enocean is pretty cool for remotes and sensors since they usually don’t need a battery, but I’ve read a lot about the problems when trying to use relays, so you might want to look into different wireless technologies.

As far as FHEM is concerned, maybe you won’t need to fiddle around with MQTT if you don’t need to - isn’t there a REST API?
And, speaking of FHEM, how does the configuration of your actuator look in there?

Hello Fedot, thank you for your answers which could help me !

  1. By using logger: default: error..., something strange happens : you will see in my log reports below that @15:37 its seems to run, but @17:25 I have many errors. :frowning:
Serial port exception! (device disconnected or multiple access on port?)
17:25:04 – /usr/local/lib/python3.7/site-packages/enocean/communicators/serialcommunicator.py (ERROR)
Data CRC error!
17:25:04 – /usr/local/lib/python3.7/site-packages/enocean/protocol/packet.py (ERROR)

2020-06-01 15:37:14 DEBUG (Thread-2) [homeassistant.components.enocean] Received radio packet: 00:2B:42:2B->FF:FF:FF:FF (-92 dBm): 0x01 ['0xf6', '0x10', '0x0', '0x2b', '0x42', '0x2b', '0x30'] ['0x2', '0xff', '0xff', '0xff', '0xff', '0x5c', '0x0'] OrderedDict()
2020-06-01 15:40:30 DEBUG (Thread-2) [homeassistant.components.enocean] Received radio packet: 00:2B:42:2B->FF:FF:FF:FF (-73 dBm): 0x01 ['0xf6', '0x10', '0x0', '0x2b', '0x42', '0x2b', '0x30'] ['0x2', '0xff', '0xff', '0xff', '0xff', '0x49', '0x0'] OrderedDict()
2020-06-01 17:25:04 ERROR (Thread-2) [enocean.protocol.packet] Data CRC error!
2020-06-01 17:25:04 ERROR (Thread-2) [enocean.communicators.SerialCommunicator] Serial port exception! (device disconnected or multiple access on port?)

I don’t know what is wrong in my configuration (I have not made any enocean installation, I have just added the following lines)

enocean:
  device: /dev/ttyS0

switch:
  - platform: enocean
    id: [0x00,0x2b,0x42,0x2b]

I know that my GPIO port is good (I have an HEXDUMP sender_ID answer 002b422b). Do I need to make other things ?

  1. I think the configuration you have seen is Beasty’s configuration :slight_smile:
  2. Your idea to make Eltako FSB61 learn (LRN…) my switch defined in HA is a good idea. I want to try this… as soon as I will have solved the issue above :frowning:
  3. A simple web search on rest-API FHEM shows me that exists (https://github.com/matgoebl/FhAPI); but I Don’t know at all what is it ? and how to use it ? could you explain me please ?
  4. In the enclosed snapshot and the Following lines, you will find the actuator caracteristic and FHEM configuration
define EnO_switch1_FSB61 EnOcean 051430A8
setuuid EnO_switch1_FSB61 5ed2e2c0-f33f-2658-73bb-b4b6e746b02195bc
attr EnO_switch1_FSB61 IODev TCM310_0
attr EnO_switch1_FSB61 comMode confirm
attr EnO_switch1_FSB61 eep A5-3F-7F
attr EnO_switch1_FSB61 manufID 00D
attr EnO_switch1_FSB61 room EnOcean
attr EnO_switch1_FSB61 subDef FFA5E401
attr EnO_switch1_FSB61 subType manufProfile
attr EnO_switch1_FSB61 webCmd opens:stop:closes
define FileLog_EnO_switch1_FSB61 FileLog ./log/EnO_switch1_FSB61-%Y.log EnO_switch1_FSB61
setuuid FileLog_EnO_switch1_FSB61 5ed2e2c0-f33f-2658-c8dd-01dd1c5e4b2c77c0
attr FileLog_EnO_switch1_FSB61 logtype text
attr FileLog_EnO_switch1_FSB61 room EnOcean

I don’t know if it is linked but I seen on FHEM some things strange in the log

2020.06.01 15:37:14 1: /dev/ttyS0 disconnected, waiting to reappear (TCM310_0)
2020.06.01 15:37:19 3: Setting TCM310_0 serial parameters to 57600,8,N,1
2020.06.01 15:37:19 1: /dev/ttyS0 reappeared (TCM310_0)
2020.06.01 15:40:30 1: /dev/ttyS0 disconnected, waiting to reappear (TCM310_0)
2020.06.01 15:40:32 3: Setting TCM310_0 serial parameters to 57600,8,N,1
2020.06.01 15:40:32 1: /dev/ttyS0 reappeared (TCM310_0)
2020.06.01 15:40:55 1: /dev/ttyS0 disconnected, waiting to reappear (TCM310_0)
2020.06.01 15:41:00 3: Setting TCM310_0 serial parameters to 57600,8,N,1
2020.06.01 15:41:00 1: /dev/ttyS0 reappeared (TCM310_0)
2020.06.01 17:25:04 2: TCM TCM310_0 wrong header checksum: got 03, computed 9D

Hey Christian,

  1. can you add channel: 0 below the switches id? If that doesn’t work - try increasing the number a few times
    Also… you’re not using FHEM and HA on the same machine, are you? Seems like they both try to access the same module - which they can’t
  2. Oh sorry, seems like I’ve mixed the configs up. :crazy_face:
  3. Yeah, maybe that will do it, although this might do it for you as well: EnOcean : switch doesn't control the device but changes when you manually change th state · Issue #33025 · home-assistant/core · GitHub although you’re not using a USB key, are you?
    Looks like there is a user working on integrating Enocean better, will probably take some time though.
  4. If I read the repo right:

You don’t need this module, if it is sufficient for you to execute plain fhem commands via HTTP:
http://yourserver/fhem?cmd=set+Light+on

Seems like it should be pretty easy once you’ve figured out the URLs to use the switch, you can add it as a REST API switch in Home Assistant: RESTful Switch - Home Assistant

  1. Seems like FHEM can do the learning part while HA can’t.

I guess that gets me to the conclusion that you should probably use FHEM for all the Enocean stuff. I haven’t used it, but you can probably make some RESTful switches in HA to control your switches as well as some automations to report the states back from FHEM to HA.
If you don’t want to deal with all of that and are using FHEM just for Enocean, well, you could get different switches, if you didn’t invest heavily into your current setup. (WiFi/MQTT with Tasmota maybe? Or if you’ve got the hardware, Homematic? There are a lot of solutions)

You are right Fedot ! hopefully there are lot of solutions ; I continue to search one which can be efficient for me :slight_smile:

  1. I have tried different channels from 0 to 3, but nothing appears in HA. Same error of connections :frowning:
    You are right about the fact that I have installed HA on a docker of my Raspbian Destkop (I don’t know where the HA-OS is in my Rpi), whereas I have installed FHEM in a “usual” way in /opt/fhem
    I imagine it could be compatible because FHEM is accessible with http://xxx.xxx:8083 and HA accessible with https://sss.duckdns.org:8123 which replace http://xxx.xxx:8123
  2. it is not an Enocean USB key > I use an Enocean Pi plugged on the GPIO > I have not understood from the github that we can use dolphin on a PC while Encean pi is plugged on the GPIO, have I ?
  3. antother good idea Fedot to launch directly with http !! I have tries different http , but the roller shutters don’t move > but I am going to check on the FHEM forum if it is not possible to make in that way > indeed it would be much much better !!

So I have the intuition (even if I am still beginner) that something can be done to integrate these EnOcean devices into HA (without buying other devices), but I haven’t find the way yet. Maybe MQTT (but does MQTT work with a docker and non-docker installations ?), but it is very very hard to configure in FHEM :-((
And even with these explanations https://github.com/matgoebl/FhAPI I am not able to play this scenario :frowning:
I am still motivated to find the solution

I hope you’ll be able to resolve your issues :slight_smile: I think the Dolphin Software is probably only for USB Keys, but I haven’t taken a look at it. You might want to remove the Enocean stuff completely from HA since it interferes with FHEM as it seems.
The explanations are for the FhAPI addon, which as I said, you probably don’t really need for just flicking a few switches. There are probably official REST endpoints for FHEM, you don’t need to make it more complicated than it needs to be (manual MQTT setup for a few switches and states)

Did you eventually manage to get it done ?

Hello @jaypi
I have succeeded to define my eltako roller shutter dimmer controlled by FHEM, then MQTT to HA :blush::sweat_smile: not easy for the first time, but it works

Hm ok can you run FHEM and HA on the Same PI?

Yes in the same pi with enoceanpi to catch and send enocean messages.
I use a Pi4

Sounds good. But you didn’t use the standard HA PI image but installed HA and FHEM in dockers?