Getting Shelly to work with Loxone

3,777 views
Skip to first unread message

Techdoctor

unread,
Jul 31, 2021, 8:07:07 AM7/31/21
to Loxone English
Just recently got some shelly products,  a plug and an Energy monitor.

Managed to get the Shelly plug to work via the Shelly app, then by using virtual inputs and outputs was able to control the plug all from within Loxone. I also have a status display so I know when the plug is on or off. I did this by using a status block connected to a virtual input that polls the built in power meter on the socket. So if the power consumption is greater than 0 the plug has to be on.
This is what it looks like in my Loxone set up. If any one wants a tutorial I can write one up.

Shelly.png

Rob

unread,
Jul 31, 2021, 1:37:20 PM7/31/21
to Loxone English
Looks good in the app.
I'd be interested in a tutorial on this and to see your config details on how you polled the VI to obtain the power usage.
I also thought the minimum poll time was 10s which seems quite a delay. Was this a problem?


Rafael Millan

unread,
Jul 31, 2021, 2:22:53 PM7/31/21
to Loxone English, Rob
Yeah, definitely will love to see the tutorial. I’ve been working with a shelly dimmer. Still haven’t mastered the status part
--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/b540ff62-1464-448a-ad6f-49581ba8669dn%40googlegroups.com.

Techdoctor

unread,
Aug 8, 2021, 6:45:10 PM8/8/21
to Loxone English
Tutorial should be done by end of next week. 

Peter Holden

unread,
Aug 9, 2021, 8:21:11 AM8/9/21
to Loxone English
I've invested in some Shelly1s and a couple of relays, primarily for use in the new garage, lights and roller doors. I've also used a Shelly1 to switch a mirror demister, using a virtual output which seems to work ok. However the App is rubbish, there is supposed to be a new version soon. I've also joined the FaceBook Shelly support group (English Version) which is full of problems. Of concern is relays randomly opening garage doors, which has dented my confidence in the product. Having said that, I'm sure that many of the issues reported by posters is lack of knowledge, whether that be electrical wiring or how the products actually work. 
I'd be interested to see the tutorial also.

Duncan

unread,
Aug 9, 2021, 1:57:53 PM8/9/21
to Loxone English
i have used a lot of shelly devices, mostly relays, rgbw contollers and dimmers - all are not connected to the cloud and ive never used the app

i have had 100% reliability and no unexpected actions - perhaps its the app/cloud that causes this?

Rydens

unread,
Aug 10, 2021, 4:14:34 AM8/10/21
to Loxone English
I have over 15 Shelly devices running well for over a year some for several years, which compliments my Loxone install.
I am connected to the Shelly cloud, and do use their app on occasions. 
My Shellies are controlled either by their own schedule, or controlled directly by Loxone, or directly from Home Automation (HASSIO on a Raspberry pi).
They are great devices, well priced with an excellent API and good support. 
The Facebook group is good but also has lots of people who have no idea what they are doing explaining their mistakes and blaming Shelly!
Happy to contribute to @Techdoctor write up to help Loxone users. 
Cheers David

JohnR

unread,
Aug 10, 2021, 4:30:18 AM8/10/21
to Loxone English
Another vote for Shelly products - I recently installed a couple of relays to control heating and lighting and have used some of their RGBW lights in a building that Loxone hasn't reached. All the Shelly devices are controlled directly by Loxone, and the config was quite straightforward (after a bit of research!). Since the installation have had no issues whatsoever. I don't use their app or cloud service. 

Great bits of kit, and fantastic value for money. 

I second the initiative by @Techdoctor to write up some documentation on the config, and happy to contribute to same. 

Techdoctor

unread,
Aug 18, 2021, 6:51:15 AM8/18/21
to Loxone English
Here is the link to the first draft of the tutorial.  Please let me know if there are any typos error etc and I will update.

Deac99

unread,
Aug 21, 2021, 6:08:27 PM8/21/21
to Loxone English
@ Techdoctor - Thanks for that tutorial!  I have read through it, seems simple enough and just ordered a pair of relays to try it out. 

I have a basic / general question for everyone - What exactly is the reason we can accomplish this direct control with Shelly vs the need for an MQTT broker with other devices?  That part has confused me.  Basically, how would I know that I can communicate directly to a device by looking at the devices specifications?   For example if I bought the Shelly Flood Sensor would that work?  I'm assuming yes, but don't know that for sure. 

Or more abstract, I have a robotic vacuum cleaner how would I know if I can connect directly to that or if I need IO Broker/MQTT for communicating?

One thing that I have observed is that you can communicate with the Shelly device via a web browser and it's IP address.  Whereas the Echo or my vacuum you can only communicate via the app.  Does that have something to do with it?

Thanks in advance!

Duncan

unread,
Aug 22, 2021, 4:57:41 AM8/22/21
to Loxone English
not all the shelly devices work directly though such as the heat&temperature sensor - if a device can send a single event or value in the correct format to our chosen IP of the miniserver then generally it should work, and as you said, devices with only an app and no published api are going to be difficult without a detour via mqtt, iobroker etc, depending on someone else doing the hard work of developing an interface

so the ones that have web calls for single functions can usually be operated directly such as the relay on/off or dimmers

shelly devices now have an option where they can send a signal to something else (eg for shelly to shelly directly without cloud) and its this function we can use to trigger loxeon

for instance, if we create a virtual input in loxone, we can set the relay to operate the VI when an input is on, off, long push etc - these are all under the 'actions' section and you put in the action for loxone event eg http://user:pass@loxone-IP/path-of-the-VI


Message has been deleted

Duncan

unread,
Aug 22, 2021, 5:51:13 AM8/22/21
to Loxone English
create your VI in loxone - note the VIxx number
configure the loxone as below with your loxone user:pass, ip address and VIxx
Capture.JPG

Deac99

unread,
Aug 22, 2021, 9:32:50 PM8/22/21
to Loxone English
Hi Duncan,

Thanks for this info.  I got it working perfectly!  The Shelly 1 relays came in yesterday.  I've hooked one up and have it working perfectly to have Loxone send the command TO the Shelly relay per Techdoc's tutorial.  Just wanted to prove to myself that part works.  

As you know but for the sake of others reading this, I am wanting to use the Shelly1 relay as a "Sensor" to tell a VI in Loxone that that device is on and have the Lox send commands to do other things.

I spent many hours messing around trying to get the VI and Shelly URL commands working.  It ends up, the entire problem I was having is that when I would test to turn the relay on, I was using the browser interface to turn it on as I did not actually have the device with me to provide the signal to the SW.  (I simulated it with a jumper from L to SW and it would activate - but when working with Lox, I was just using the button on the browser window).  It ends up that the button won't send the signal!  After much head scratching I decided to touch the L to SW jumper while watching live view and sure enough - it works perfectly.  Who would have thunk!

Thanks so much for that screenshot of what you did!  This is a really powerful device! 

Techdoctor

unread,
Oct 22, 2021, 6:10:38 AM10/22/21
to Loxone English
@ Duncan,
Tried doing what you suggested, but for some reason I can't get it to work 
I have a Shelly Plug S and VI number is 1
  • http://user:password@LoxoneMiniserverIP:Port/dev/sps/io/VI1/on
Used the above for relay status On then for relay status off used the same url but changed on to off. But couldn't get it to work.
Have seen other people having the same problem, so it might be a Shelly Plug S issue.


Message has been deleted

Duncan

unread,
Oct 22, 2021, 6:26:55 PM10/22/21
to Loxone English
im not sure things arent getting mixed up here:

  • http://user:password@LoxoneMiniserverIP:Port/dev/sps/io/VI1/on
is used for loxone to detect that the input of a switch (eg shelly 1) has turned on/off, so acts like a loxone digial input

to determine the status of the relay, you need to use a different virtual input, one with command recogniton 

here is a detailed tutorial for the shelly plug s:

including status, power consumption etc

unless you have also configured the actions section where your inital loxone url/vi is triggered by the shelly plug s turning on/off (also mentioned in the tutorial above)

Peter Holden

unread,
Oct 23, 2021, 4:29:53 PM10/23/21
to Loxone English
Talking of Shellys
I would like to add a Shelly1 to my Garador. I believe the way to do this is to use the Shelly as a momentatry switch?
Looking at the instruction manual, fig 14 or 15 appears to be how to connect but although I'm quite happy how to wire a Shelly 1 to a light and switch, it isn't clear to me how to wire this. Also what code to use in the Virtual Output Command.
Grateful as ever for any help. :)garador instructions.jpeg

Techdoctor

unread,
Oct 25, 2021, 7:11:56 AM10/25/21
to Loxone English
Have a look at this http://blog.smarterhome.club/2020/04/05/shelly-1-garage-door-opener-the-easy-way-or-the-fun-way/ Plus you can power it from the Garador controller using terminals 5 and 20 fig12
Just remember to set the auto off to 1 sec. This will switch off the relay after 1 sec when it is activated.

Techdoctor

unread,
Oct 25, 2021, 7:13:15 AM10/25/21
to Loxone English
And here is a link to a tutorial I wrote on connecting Loxone to Shelly 

Peter Holden

unread,
Nov 1, 2021, 7:57:07 AM11/1/21
to Loxone English
An update for info.

I've wired the Shelly as per the attached drawing - quite simple really. What wasn't quite so straightforward was the Shelly settings, although it should have been. I made the mistake of watching a few videos on the subject which recommended setting the Shelly as a 'momentary switch' with an auto off delay of 1s.
Having created the VQ in Loxone with all the correct details, the door operated down and up but then failed (from Loxone). I could hear the Shelly relay continually clicking but it seemed to have lost its power and therefore no internet connection. The only way to get it going again was to connect to a 240v supply which seemed to reset it. I don't understand why this set up caused the Shelly to have a hissy fit.Garador_Shelly Wiring.jpg

What I should have done and actually this is plain in the drawing (if you speak German) is to set the Shelly as a detached switch, with a auto delay off of 2s. At the moment it's now working perfectly. 

Thanks to the guys on Loxforum who were really quick to respond.

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Simon Still

unread,
Apr 11, 2022, 11:11:13 AM4/11/22
to Loxone English
So I've had a couple of shelly1's running for a while now.

I'm getting some odd behaviour with  them - sometimes (not all the time) there is a delay of about 6 seconds before the Shelly reacts.  I'm not getting any delay on my hard wired Loxone lighting, and I've not changed anything on my network.

Techdoctor

unread,
Apr 14, 2022, 7:29:17 AM4/14/22
to Loxone English
It might be worth checking if they are ok in the shelly app. I have had problems with shelly 2.5 devices receiving a weak wifi signal. Fortunately they where installed in a false ceiling so it was quite easy to move them to improve the signal. Sometimes it was a matter of moving them about 20cm and they where fine. I did have one that required a complete reset which meant I had to set it up all over again. Also make sure all the Shellys are on the most recent firmware. 

Peter

unread,
Aug 3, 2022, 3:23:27 PM8/3/22
to Loxone English
Despite my previous assertion that I had managed to set up a Shelly1 with the Garador controller - I hadn't!
Despite trying all manner of settings, the Shelly kept losing its connection to my Wifi and I eventually gave up. However, having now successfully wired a gate controller I'm going to give this another go.
I mistakenly believed that the Shelly1 DC power supply was a range between 12v-24v, when actually it's 12v or 24v. The Garador DC supply is 19v (measured with a meter) which was probably why the Shelly1 kept failing. This is more or less confirmed by Garador tech support, who have stated that THEIR products will work off the '24v' supply but not necessarily third party products. They are also recommended using the black/red terminals for a momentary pulse not the 23/5/20/21 terminal block.
With that in mind, I'll try again, but not sure if I should take a 240v supply to the Shelly or add a 24V DC transformer? I'm also intending to add a magnetic reed switch on the door so will use the same voltage. I've just read that a 240v  supply is not recommended, but not sure why?

garador instructions.jpeg

Duncan

unread,
Aug 4, 2022, 7:22:04 AM8/4/22
to Loxone English
the shelly operating voltage is either 12v or 24-60v (or 240v) so im sure you are right that the 19v may be causing the issue

i seem to remember that you have to use the same voltage for the digital input as its power supply - so its 240v for both or 12/24v for both but not mixed

the digital input isnt isolated from the supply so you would be putting 240v onto your digital input if you mix....

the shelly 1 works perfectly well with 240v supply / digital input

Rafael Millan

unread,
Aug 4, 2022, 7:36:09 AM8/4/22
to Loxone English, Duncan
Actually the shelly 1 (just the 1, not the rest), is a dry relay so you technically can operate 240v and power it with 12v. Just mind your wiring.

Peter

unread,
Aug 4, 2022, 8:02:02 AM8/4/22
to Loxone English
Thanks for the replies guys, I was wondering whether there was any advantages in using 24v DC for the Shelly supply and therefore the same voltage for a magnetic reed switch as opposed to using 240v supply and a 240v reed switch. The obvious downside is having to add a 24v DC supply.
Message has been deleted

Duncan

unread,
Aug 4, 2022, 10:15:06 AM8/4/22
to Loxone English
sorry my comment was related to the shelly 1 digital input which isnt isolated from the power supply, not the fully isolated relay

i would have concerns that reed relays and their connectors are not really suited to 240v so would stick to the 24v if possible, even at the expense of having another small psu to supply it

Message has been deleted

Peter

unread,
Aug 29, 2023, 10:15:07 AM8/29/23
to Loxone English
Finally getting round to installing a reed switch / door contact on my garage door and will connect to the SW terminal on the Shelly1 (powered by a 24v DC driver).
Does anyone know how to pull the info from the Shelly into Loxone?

Rydens

unread,
Aug 29, 2023, 11:44:16 AM8/29/23
to Loxone English
Shelly can output an HTTP command when it turn on off etc. Look under I/O Actions in Shelly Edit device

That command can change a value in Loxone. 

An example of a command is: http://user:password@LoxoneMiniserverIP:Port/dev/sps/io/Garage_Door/on

You can test these commands in a browser

Cheers David

Peter

unread,
Aug 29, 2023, 2:06:14 PM8/29/23
to Loxone English
David

We may be talking at cross purposes or I'm misunderstanding your reply.

The Garage door is already controlled by a Shelly1 using the Garage/Gate Function Block and a VI & VQ. When I connect a Reed Switch to the SW terminal of the Shelly I want a notification in Loxone that the door is open or closed. 
Since my earlier post I've realised that I can achieve this by using a Virtual HTTP Input, polling the status of the Shelly and then parsing the data of the SW terminal ("inputs":[{"input":\v). This returns a 0 or 1 depending on whether the door is closed or open. I may have to convert this digital response to a text using a Status Block?
I'm curious as to whether I can use the response form the HTTP input in the Garage FB to indicate whether the door is open or closed?

For info there is also a XML template on the Loxwiki site here

Thanks, Peter

Peter

unread,
Aug 30, 2023, 10:30:27 AM8/30/23
to Loxone English
Playing around with a Shelly 1.
I have a number of Shelly 1s connected to lights (and garage doors) and up to now did not receive a notification in Loxone if the physical on / off switch they are wired into was operated. 
Now I've found that I can interrogate the SW status (returns a 0 or 1 as per my last post) I can use that info in a VI via logic and a FB switch to keep Loxone in sync.Garage Internal Light.jpg
Operating the physical switch turns on the light and sends a pulse to the function block, thus indicating in Loxone the light is on and vice versa. The downside is that if the FB switch is then used to turn the light off the physical switch remains in the on position, but the light is off. i guess I can change the switch to a push button.

Anyway, this all seems a little ugly and I wonder if there is a better way of achieving the same aim.

Techdoctor

unread,
Aug 31, 2023, 4:36:16 PM8/31/23
to Loxone English
I am pretty sure that if you then change the state of the physical switch it then switches the lights on. The physical switch can be thought of as part of a two way switching circuit.

Kev

unread,
Sep 8, 2023, 1:30:14 PM9/8/23
to Loxone English
Use a retractive switch instead of your standard 2-way switch. With some switches you can replace the switch module itself (such as Click Scolmore). I've installed Loxone in a few homes where we've had a mix of retractive switches and either Touch or Faradite, the Touch/Faradite in rooms where there's a lot of interaction such as kitchen or lounge, the retractive in garages/spare bedrooms. Tie the retractive switches to a DI or if going via Shelly then set it up as a 'Button' and 'Momentary'

Duncan

unread,
Sep 10, 2023, 10:42:44 AM9/10/23
to Loxone English
if you cant get a sutable retractive switch, you can program the shelly to send a pulse to the same virtual input for the on and off values of the switch, recreating the same effect
for the on and off webhook in the shelly use:
http://user:password@LoxoneMiniserverIP:Port/dev/sps/io/VIxxx/pulse

Peter

unread,
Sep 10, 2023, 11:05:55 AM9/10/23
to Loxone English
Thanks for the suggestions.

This doesn't seem as straightforward as I thought. 
It seems the Shelly Button Type has to be set to 'Detached' to pull the SW status for the Loxone V I, which I think rules out using a dumb retractive switch.
When setting the Shelly button type to Momentary, Loxone doesn't detect any physical switch operation via its SW status.
If there is a way round this it would be really useful to use the logic in a Lighting Controller too?

@Duncan - could you expand on your last post please?

Whilst this is only messing around as far as this garage light is concerned there's going to be some useful stuff for setting up the Garage Door reed switch and any logic integration that may be possible with the Garage / Gate Function Block.

Duncan

unread,
Sep 10, 2023, 2:54:57 PM9/10/23
to Loxone English
it is fairly straight forward once you've got it working once...

1) the button must be detached otherwise it directly changes the output status of the shelly
2) the SW input can have a url set for the on action and off action which sends the pushes or on/off into a virtual input in loxone
3) if you have a retractive physical button, only the on action is sent and is usually configured as a pulse  - each press of a retractive button has and on and off which would be the loxone equivalent of a double click if you sent both, which usually turns off a lighting block....
4) if you have a normal switch, you can either send the on and off to loxone, so loxone knows whether the switch is on or off, or you can set the on and off to both send a pulse, so each change of the switch acts like a retractive push

under the 'actions' section, button switched on and off you input the url to operate the loxone virtual input:

http://user:pass@minserver-IP/dev/sps/io/VIxx/pulse
http://user:pass@minserver-IP/dev/sps/io/VIxx/on
http://user:pass@minserver-IP/dev/sps/io/VIxx/off



retractive action for switch - each change is sent as a pulse to loxone.jpg
normal action for switch - switch satus is sent to loxone.jpg

Peter

unread,
Sep 20, 2023, 10:56:52 AM9/20/23
to Loxone English
Thanks Duncan, will give the URL approach a try.

Going back to the original intent - Reed Switch / Garage Door 
Connect the Reed Switch to the SW and N terminals of the Shelly1 (24v)
Create a Virtual HTTP Input with the URL of the Shelly - Login:Password@IP/Status
When polled the URL will return its status, the bit we want for the Command recognition of the HTTP Input Command is the value of "inputs":[{"input":/v
This will return a digital value of 1 or 0 (closed or open)
Add the VIs to some logic and the Garage/Gate function Block.
Screenshot 2023-09-20 143058.jpg

Gert Stalpaert

unread,
Nov 27, 2023, 7:19:30 AM11/27/23
to Loxone English
I know that this is an old post, but nevertheless, what is the best way to integrate a shelly rgbw in Loxone? I will either use the channels for RGBW as for 4 separate white-only leds.
Is it possible to do that directly from within Loxone or do I need HomaAssistant/loxberry/mqtt/...?

Thanks,
Gert


Duncan

unread,
Nov 27, 2023, 10:02:31 AM11/27/23
to Loxone English
its easy to do it directly, particularly if you are doing 4 x white strip
for colour, you have to use a block for formula in loxone to split the combined rgb data into 3 separate numbers for the r, g and b elements

these can be imported to loxone then added to your project
the wiki shows you how to split the loxone rgb as well
Message has been deleted

Peter

unread,
Jan 4, 2024, 5:57:26 AMJan 4
to Loxone English
Peter
Sep 20, 2023, 3:56:52 PM
to Loxone English

Going back to the original intent - Reed Switch / Garage Door 
Connect the Reed Switch to the SW and N terminals of the Shelly1 (24v)
Create a Virtual HTTP Input with the URL of the Shelly - Login:Password@IP/Status
When polled the URL will return its status, the bit we want for the Command recognition of the HTTP Input Command is the value of "inputs":[{"input":/v
This will return a digital value of 1 or 0 (closed or open)
Add the VIs to some logic and the Garage/Gate function Block.
Screenshot 2023-09-20 143058.jpg
Copying this from my previous post. Whilst this works well, I get open or closed notifications in the App, there seems to be an unintended consequence. I'd noticed on a couple of occasions the garage door was open when I thought it should be closed, although sometimes difficult to remember, especially if the wife had been in there. I'd also become aware that the MS was rebooting on occasion due to a 'low memory' warning - usually  accompanied by the garage door opening But not always). I initially thought that the reboot was causing the Shelly to open the garage door but on reflection I'm now not so sure, it may be this Config that is causing the problem. Of note, the workshop door (identical motor, settings etc to the garage door) does not react to the MS reboot. I don't think the polling cycle is overly onerous, however, I don't know how the MS handles the data it's receiving from the Shelly. Is it this data that is creating the low memory reboot and the subsequent opening of the door? If that is the case why isn't the workshop door getting in on the act?
For the time being, I've 'disconnected the VQs



Garage Door Settings.jpg
Reply all
Reply to author
Forward
0 new messages