danielperna84 / pydevccu

HomeMatic CCU XML-RPC Server with fake devices for development
10 stars 9 forks source link

Support for binRPC #34

Open reichemn opened 1 year ago

reichemn commented 1 year ago

Did somebody already tried to port the nodejs implementation of binRPC to python to add binRPC support to this library?

At the first look the encoding/decoding part in https://github.com/hobbyquaker/binrpc/blob/master/lib/protocol.js looks not that complicated. Maybe I'm missing something.

danielperna84 commented 1 year ago

I had a look at other libraries. But after thinking about it a bit more, I simply refuse to give it a shot. My opinion may be highly political, but I believe it makes much more sense for CuxD to support XML-RPC than the other way around. XML-RPC is standardized and well supported, whereas BIN-RPC is proprietary for HomeMatic, and even within the HomeMatic ecosystem - as far as I know - only used by CuxD. So right now every tool has to explicitly maintain support for CuxD. It would be much more efficient if CuxD offered a stardard (XML-RPC) protocol that's easy to implement for everybody else.

reichemn commented 1 year ago

I think you are right, it would make more sense if there would be a single API for all features. I'm relatively new to homematic and it is really difficult for me to get into because there are so many APIs which need to be used together to accomplish some tasks. Do you have historical explanations on how these various interfaces evolved into their current state? As I know there are APIs using binary RPC, XML RPC and JSON. But also there is not a single server for each, there are many different server endpoints at the ccu used for different tasks. Furthermore, for each endpoint there is usually also a variant with SSL. Can you recommend some websites with information to get a deep understanding of these APIs and how they are supposed to be used?

danielperna84 commented 1 year ago

No, I don't know that much about the history. I think initially it started with BIN-RPC, and they added XML-RPC for developers as an API. Then later on they added JSON-RPC to improve the CCU Web UI. For more information about the history you should probably ask at the HomeMatic Forum.

For XML-RPC here's the documentation: https://www.eq-3.de/Downloads/eq3/download%20bereich/hm_web_ui_doku/HM_XmlRpc_API.pdf