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

Unable to control D2-05 Blinds control for position and angle #17

Closed hhenkel closed 3 years ago

hhenkel commented 4 years ago

I'm trying to control my Nodon Roller Shutter Module working with enocean-mqtt. So far I'm able to receive messages via mqtt but I'm not able to set the position of the roller shutter when following the README. I'm not sure where the problem is - I guess my "default_data" part is wrong but I'm currently struggling what the "correct" data would be. Maybe you can help clarify how this value is calculated and update the README?

I added some debug messages to your code to get a better understanding of what is going on. I'm able to see that your code is receiving my requests from the mqtt broker and is setting the data for the sensor, but I'm not sure if a enocean message is triggered after this step. Can you clarify if this is implemented and should work?

My config for the roller shutter module looks like this:

[shutter]
address = 0x051C1FB7
rorg = 0xd2
func = 0x05
type = 0x00
log_learn       = 1
publish_rssi    = 1
persistent = 1
answer          = 1
default_data    = 0x32790008
romor commented 4 years ago

I am not aware on the communication structure of the Roller shutter relay.

What is implemented (and used by myself) is the following: my heating actuator sends an Enocean status message every x minutes and stays awake for very short time while it accepts a new heating request message as response. This can be configures by using answer = 1 and the default_data. Thus, this RF packet is sent directly as an answer to the incoming message. In such a case, the enocean profile specifies 2 messages then with the given profile, specifying an additional field direction. Refer to EEP.xml and search for such direction tag.

I do not know whether your device works similar? Or is it just always ready and waits for incoming messages (not related to answering)? In this case, such feature is not implemented in enocean-mqtt right now.

However, it sounds like a useful extension. I would be glad to support such an implementation but we would probably need to do it together since I lack such devices for testing purposes.

hhenkel commented 4 years ago

@romor thanks for your honest feedback to my request. I was looking at nodered with the enocean-js based plugin to solve my issue. However after debugging nodejs code I can say that code has some flaws of its own.

I'm with you, that it might be a useful extension of your project, but my current guess is, that this will lead to some major rework and additional implementation work in the underlying python library. In my opinion it would be nice if the library and your code would work in a more general way, automatically based on the available docs from enocean.

I'm yet undecided how to solve my issue - as I just want to get my few devices working... ;)

We can close the issue if you like or leave it open for reference for now.

romor commented 4 years ago

I just did an implementation of that feature.

To use it:

Please notice, that this is not tested at all. Please expect problems, potentially even syntax errors. Looking forward to your feedback.

markuslindenberg commented 3 years ago

I might soon (hopefully next week) be able to test this with a bunch of Becker Enocean blind drives, which support D2-05-02 and according to the manufacturer are 100% compliant. I'm planning to integrate them in Home Assistant, looking at the very basic state of HA's native enocean support I guess enocean-mqtt is the way to go.

See https://www.becker-antriebe.com/fileadmin/user_upload/Downloads/Rolllaeden/Antriebe/n01_2010_301_120_0_de.pdf for reference.

romor commented 3 years ago

Branch packet_sending is merged to master and should provide the function needed.