Sending commands over LAN from Loxone system to raspberry Pi running Demoticz

1,790 views
Skip to first unread message

Keith Emerson

unread,
Jun 30, 2017, 6:30:00 AM6/30/17
to Loxone English
Hi,
I have a Loxone system with hard-wired blinds on the ground floor. I have now fitted battery operated Louvolite blinds upstairs which use 433.92 MHz remotes.
I have purchased a RFXCOMtrx433E transceiver, connected this to a Raspberry Pi v3B and loaded this with Demoticz. All of this works fine and I can control the blinds using the Demoticz set-up.
What I want to do now is to integrate the blind control into Loxone. The Rasberry Pi has a LAN connection but I need to work out how to send the correct commands over LAN from Loxone to the Pi?
Can I do this by accessing the Demoticz front-end or do I bypass this and access the RFX (on one of the Pi's USB ports) directly from the LAN using ser2net (or something)?
As you can probably tell I'm a newbie in this area but feel that I am getting closer to a solution. Any examples of using a Rasberry Pi interfaced to Loxone would be helpful. I get the impression that virtual outputs may play a part in this?
By the way, the RFXCOM device works very well and has potential for uses with other 3rd party 433MHz sensors and actuators.

Thanks, Keith Emerson

Peter van Es

unread,
Jul 3, 2017, 3:31:04 AM7/3/17
to Loxone English
Hi Keith,

to control Domoticz devices from Loxone you need to use Virtual Outputs in Loxone.

Domoticz has a way of receiving and sending commands using a JSON API, which is described here: https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s

You will need to know the index number of the device you are controlling. The complete command would look like:

http://<username:password@>domoticz-ip<:port>/json.htm?type=command&param=switchlight&idx=99&switchcmd=On

where:

  • username and password are the authentication details for your domoticz installation
  • domoticz-ip is the ip address of the raspberry pi hosting your domoticz installation
  • port is usually 8080
  • idx=99 should correspond to the device number of the device you are controlling.
 In the virtual output connector you insert the http part up to the port number, in the virtual command you can define the post string (from json.html onwards) for ON and OFF in one output.

You use a similar method to retrieve status information from Domoticz.

Peter

Keith Emerson

unread,
Jul 5, 2017, 11:30:33 AM7/5/17
to Loxone English
Hi Peter,

Thank you very much for your response. I haven't quite cracked it yet but with your help I'm making progress. I did see a message in the Domoticz log that indicated that the Loxone miniserver had made contact! I should have more time next week so please bear with me as I'm sure that I will be asking for some more help. Thanks again for getting back to me. Much appreciated.
Regards, Keith

Byron

unread,
Jul 7, 2017, 6:11:39 AM7/7/17
to Loxone English
Is there a way to put variables in the Loxone Virtual Output?
For example, I could want to let Domoticz control my Daikin Airconditioning but still use the Intelligent Room Controller.
For this, I would send the target temperature and 0-10V setting to Domoticz and use that to set the Daikin.

The big question in this case is: how do I put variables in a Virtual Output.

Keith Emerson

unread,
Jul 10, 2017, 6:08:37 AM7/10/17
to Loxone English
Hi Peter,

Getting closer but no cigar as yet!.

By entering the following into my PC's browser

http://192.168.1.159:8080/json.htm?type=command&param=switchlight&idx=05&switchcmd=On

the blinds operate and I get a response back from Domoticz(Raspberry Pi).

My Loxone virtual output is set up as follows:- (the Sonos virtual outputs are there to see if I could work out a suitable command format so please ignore)


I have set up the  virtual output command as follows:



When I activate VCQ3 Domoticz registers that it has an incoming connection from my loxone miniserver but the blinds do not operate?

Thanks for any help
Regards, Keith Emerson







On Friday, 30 June 2017 11:30:00 UTC+1, Keith Emerson wrote:
Auto Generated Inline Image 1
Auto Generated Inline Image 2

Keith Emerson

unread,
Jul 10, 2017, 6:54:08 AM7/10/17
to Loxone English
Hi Peter,

I quick call to Loxone support put the final piece in the puzzle. I needed to put a "/" before the json in the command, leave HTTP extensions blank and change HTTP method from POST to GET.

Thanks for your help. I wouldn't have been even close without it.

Regards, Keith Emerson






On Friday, 30 June 2017 11:30:00 UTC+1, Keith Emerson wrote:

Peter van Es

unread,
Jul 10, 2017, 11:03:19 AM7/10/17
to Loxone English
Keith,

great to hear. I was planning to have a look at my exact config when home tonight, but now you've managed to fix it with a little help from the support people at Loxone, I don't need to do that anymore.

Thanks for providing the group with the feedback and final solution.

Peter

Op maandag 10 juli 2017 12:54:08 UTC+2 schreef Keith Emerson:
Reply all
Reply to author
Forward
0 new messages