HM controller echo befehle. ??

Support for our english speaking visitors

Moderator: Co-Administratoren

Antworten
kevinSV
Beiträge: 14
Registriert: 19.07.2012, 15:36

HM controller echo befehle. ??

Beitrag von kevinSV » 19.07.2012, 15:50

Hallo,
Gibt es die Möglichkeit einer eingehenden HM Controller-Befehle (z. B. ein druck auf einem Wandschalter) zu einem externes device über IP zu zenden , ohne das das externe Gerät die status aufragt beim HM controller? _

Danke für Ihre Antwort!

- Diese Nachricht wird per Google Translate übersetzt! -

Benutzeravatar
Dragonfly
Beiträge: 1249
Registriert: 04.01.2010, 11:40
Wohnort: Tyrol
Hat sich bedankt: 1 Mal
Danksagung erhalten: 4 Mal
Kontaktdaten:

Re: HM controller echo befehle. ??

Beitrag von Dragonfly » 19.07.2012, 17:36

can you please repeate the question in english?

if i understand you correct, you want to send a command like "http://192.168.1.1:800/something/" to a device without the CCU?

kevinSV
Beiträge: 14
Registriert: 19.07.2012, 15:36

Re: HM controller echo befehle. ??

Beitrag von kevinSV » 20.07.2012, 08:15

Hello,

We want to a incoming command ( like a button press or other status change ) to the CCU, to be ''echo'ed'' over IP to a external device.

So when you press a button on a keypad or remote, this command is sent as a status change from the CCU to a external ( PC ) device over IP.

Now we have to send a ''Get status'' command to the controller to check if something is changed, this takes up a lot of resources on the CCU.

Thank you for your reply.

ayngush
Beiträge: 345
Registriert: 02.02.2012, 12:05
Danksagung erhalten: 7 Mal

Re: HM controller echo befehle. ??

Beitrag von ayngush » 20.07.2012, 10:47

Hello,

this can be done with the XMLRPC Interface from the CCU. You need some good programming skills to resolve this.
First you have to set up an XMLRPC client and server on the target host. The server have to support multicalls -this is the biggest problem to find an class who support this. XMLRPC classes exists for many programming languages and frameworks like c#, .net, PHP, ... but only a small amount supports multicalls.

If you have a class for your preferred language you follow this steps:
With the client you register your server, which should support the methods "listDevices" "newdevice" "newdevices" and "event". All of this methods have to return a blank XMLRPC response to the CCU.
To register your server on the CCU simply sent an XMLRPC-request from your client with the method "init", an unique ID of your choise (12345 is just fine) and the target server as an network adress like "192.168.1.5:90234" if your server is listen to the TCP port 90234 or, if you set up an HTTP-XMLRPC server (i.e. PHP, Python, and so on...), "http://192.168.1.5:80/server/xmlrpcserver.php".
If the registration of your server was successful the method "event" ist triggert by the CCU every time a status has changed or updated.
to de-register your server just send an "init" request with a blank ID and the server adress.

You can find further information about the HomeMatic XMLRPC interface in this Thread: http://homematic-forum.de/forum/viewtop ... =31&t=4827
A PDF with the specifications are at: http://homematic.38h.de/HM_XmlRpc_V1_502__2_.pdf
A project which uses the XMLRPC interface and set up an event listener: http://homematic-forum.de/forum/viewtop ... =19&t=4901

best regards

Goglo
Beiträge: 610
Registriert: 14.04.2012, 18:34
Danksagung erhalten: 1 Mal

Re: HM controller echo befehle. ??

Beitrag von Goglo » 21.07.2012, 00:04

Another way of doing this might be the use of the undocumented method "system.Exec(cmd, &stdout, &stderr)" in HM-script. (All parameters being declared as String) This method allows to call shell-scripts or binaries like wget or netcat. But some attention needs to be taken when using this: Don't let the command run too long (e.g. multiple seconds) and ensure the executed command can't run in parallel. There have been reports of instable or not even responding CCUs when using this method. But I can't confirm this.
83 Kanäle in 50 Geräten:
3x HM-LC-Sw1-Pl, 1x HM-WDS10-TH-O, 5x HM-PB-4-WM, 3x HM-PB-2-WM, 3x HM-LC-Dim1T-FM, 2x HM-Sec-SC, 4x HM-Sec-RHS, 5x HM-CC-VD, 4x HM-CC-TC, 5x HM-LC-Sw1-FM, 2x HM-Sec-MDIR, 1x HM-WDS30-T-O, 1x HM-LC-Sw1-Pl-2, 2x HM-PB-2-WM55, 1x HM-LC-Dim1L-CV, 1x HM-CCU-1, 1x HM-PBI-4-FM, 1x HM-LC-Dim1L-Pl-2, 1x HM-LC-Dim1T-CV, 1x HM-LC-Dim1L-Pl, 1x HM-LC-Sw2-FM, 1x HM-LC-Sw1-SM, 1x HM-Sec-WDS

82 Kanäle in 43 Geräten:
1x HM-PB-2-WM, 2x HM-LC-Bl1-FM, 3x HM-LC-Bl1PBU-FM, 3x HM-PB-2-WM55, 2x HM-PB-4-WM, 9x HM-CC-VD, 8x HM-CC-TC, 2x HM-LC-Sw2-FM, 1x HM-WDS10-TH-O, 1x HM-CCU-1, 1x HM-Sen-MDIR-O, 4x HM-LC-Sw1-FM, 2x HM-SwI-3-FM, 1x HM-LC-Sw4-SM, 1x HM-LC-Sw1-Pl-2, 1x HM-PBI-4-FM, 1x HM-WDS30-T-O

kevinSV
Beiträge: 14
Registriert: 19.07.2012, 15:36

Re: HM controller echo befehle. ??

Beitrag von kevinSV » 21.07.2012, 08:59

Thank you for your reply, we will look if this solves our problem.

Thank you for your time!

kevinSV
Beiträge: 14
Registriert: 19.07.2012, 15:36

Re: HM controller echo befehle. ??

Beitrag von kevinSV » 31.07.2012, 21:48

Hello ayngush,
I am currently trying to implement an XML RPC server in Control4. I register the server with XML-RPC command init, and I receive a blank XML-RPC response back from the CCU, which would indicate that the registration was succesfull.
However, I receive no further data from Homematic controller. I tested this with a switch that is taught in at the CCU. In the CCU web UI I see that “Letzte Aktualisierung” updates succesfully when I press the switch. I tested with my firewall completely turned off.
Is there way to test the XML-RPC functionallity of the CCU?

Thanks!

ayngush
Beiträge: 345
Registriert: 02.02.2012, 12:05
Danksagung erhalten: 7 Mal

Re: HM controller echo befehle. ??

Beitrag von ayngush » 05.08.2012, 14:26

Hello,

you have to implement a method called "listDevices" on your XML-RPC Server, which is triggert shortly after the init from the CCU. Your server have to respond this call like all other calls from the CCU with a "blank" message.

The complete order of requests and responses to register yor server are:

Client: init("ip.to.your.server:port", "12345") -> CCU response: <some firmware details>;
CCU: listDevices("12345") -> your server response: "";
CCU (multicall format): event(XML-RPC-Message) -> your server response: "";
CCU (multicall format): event(XML-RPC-Message) -> your server response: "";
CCU (multicall format): event(XML-RPC-Message) -> your server response: "";

Also you have to implement the methods "newdevice", "newdevices" and "event".
All this methods respond with an "blank" return message. The method "event" is the one who gets the status updates but first you must "answer" (with a blank message) the "listDevices" request from the CCU. Befor that the CCU dosn't send the "event updates".

Also you should look into the log file wich you can find at "WebUI" under "Einstellungen" "Systemsteuerung" "Zentralen Wartung" "Logdatei herunterladen" where you can find the erros belong the XML-RPC Interface.

Regards

kevinSV
Beiträge: 14
Registriert: 19.07.2012, 15:36

Re: HM controller echo befehle. ??

Beitrag von kevinSV » 07.08.2012, 13:04

Hello,

I wasn't aware of the log functionallity of the CCU. I checked the log files and saw that there was a “transport” error. The CCU couldn't send the “listevices” command to my control4 driver due to a server socket problem.
I resolved that know, and I succesfully receive the listdevices command from the CCU in the Control4 driver. I however have a new issue, but thats Control4 related (after receiving listDevices from the CCU, something goes wrong with the network part of the controllers and I have to reset both...).

Thanks for your help.
Regards

Antworten

Zurück zu „HomeMatic - english“