embyt / enocean-mqtt

Receives messages from an enOcean serial interface (USB) and provides selected messages to an MQTT broker.
GNU General Public License v3.0
42 stars 21 forks source link

Support for Raspberry PI Hat #18

Closed marvin-w closed 3 years ago

marvin-w commented 3 years ago

Hi there,

thank you for the library. I know this is not really a bug or an issue but I'd like to know if it's possible to use this lib with a raspberry pi hat similar to this one: https://de.elv.com/raspberry-pi-enocean-modul-115626

I'd like to publish window handle states to my mqtt broker - I tried this with FHEM already and... it doesn't really work that great or at all and I'm also using home assistant for the most part.

Feel free to close this issue again if you have no answer for it.

Cheers!

crowbarz commented 3 years ago

That looks like the element14 EnOcean Pi hat. I have three of them in my setup, all using this module to publish events received from my EnOcean buttons located all around the premises to the MQTT server. I use Home Assistant as well, there's a core integration available for EnOcean but that requires HA to be installed on the same system as the EnOcean transceiver and that doesn't suit my setup. I use Node-RED to deduplicate the EnOcean button events from all the hats and trigger actions in HA and other systems over MQTT.

Just be sure to use /dev/ttyAMA0 for the EnOcean interface name when using this Pi hat as it doesn't present itself as a USB serial port.

crowbarz commented 3 years ago

You should however be aware that there are UART conflicts with the hat if you are using a Pi 3 or newer, as by default Bluetooth uses the hardware UART on those platforms. On my system, I disabled Bluetooth by adding the following to /boot/config.txt:

dtoverlay=pi3-disable-bt

You might need also to add enable_uart=1 to /boot/config.txt as well on Pi 2 or older systems.

marvin-w commented 3 years ago

Nice thank you :100: ! I'll give it a try.

I already did the adjustments in your second post as otherwise it would have also not worked with FHEM.

marvin-w commented 3 years ago

Nice, I got it working, thank you again for the help!