Simple logic

107 views
Skip to first unread message

peter taylor

unread,
Dec 31, 2021, 12:50:57 PM12/31/21
to Loxone English
Hi all, 

  I yet to install my loxone system because I haven’t built my extension yet but I’m getting a head start and learning as much as i can from the forums. I’ve bought lots of bits and built a test board which went swimmingly and config seems simple enough to use but one thing I couldn’t figure out was how to write simple logic I.e if this button is pushed and it is between these hours then do x. I realise that with so many function block pre programmed for certain tasks the need might not come up. I’m replacing another system (homeseer) and this sort of thing is really easy, and you do some really cool automations. 

Thanks in advance and thanks to everyone who contributes to the forum, it’s really useful 

Pete 

Rob

unread,
Dec 31, 2021, 1:43:00 PM12/31/21
to Loxone English
Hi Peter
Some conditional logic (e.g. if "this" then "x") is often easier to do within the App or web interface using the Automatic Designer function. Generally this would be able to do most of those types of decision logic scenarios and can often be easier than doing the logic in config.
There is also a new function block called "Sequential Controller" which allows some element of "text" type logic programming. I haven't used it myself yet but it seems like it might be quite useful.
Cheers
Rob

peter taylor

unread,
Dec 31, 2021, 5:46:04 PM12/31/21
to Loxone English
Cheers rob, I’ll give the block a try. 

Pete 

Rydens

unread,
Jan 1, 2022, 5:03:28 AM1/1/22
to Loxone English
Hi Pete, there is also a Status block which allows 4 inputs which can then be compared with basic logic and output both text and a number (or on/off) on the fist match.
The other useful block in building your own logic is the analogue memory block. This allows you to hold a value and trigger it out later.
Thanks Rob for identifying the new Sequential Controller - looks interesting. 

You can achieve a lot with the Loxone blocks but it can get pretty complex. Ideally keep the logic a simple as possible for both maintenance, and the end user.

If you need  real complex logic it is often best to do it outside of Loxone. I send virtual outputs to Home Automation (HASSIO) which can then respond back to Loxone, and handle any Alexa / Google / TP Link plugs / Shelly / etc integrations. The logic in Home Automation is YAML and more like If this then that, but also you can build small  Python routines or App Demon Python processes. Overall very powerful (and free). Again a good community support group.

Have fun Pete, and do ask again if you have other questions. 
This is a very helpful group. 
Cheers David
 

Rob_in

unread,
Jan 1, 2022, 5:21:21 AM1/1/22
to Loxone English
On Friday, 31 December 2021 at 18:50:57 UTC+1 peterta...@gmail.com wrote:
...how to write simple logic I.e if this button is pushed and it is between these hours then do x.

Loxone depends a lot on operating modes. What is going on between the hours you are interested in? It's dark? People are expected to be outside of the home? etc.

Depending on what you are trying to achieve, set a mode and just put that in an 'And' block with your button press.

You can turn operating modes on and off based on a time schedule, presence detection, light sensors, etc, etc.

Of course you can just use a time schedule block directly but I like operating modes more as they can directly affect other things - like choosing light controller motion moods for example.

HTH,

Robin

Rydens

unread,
Jan 1, 2022, 5:51:45 AM1/1/22
to Loxone English
Fully agree Robin. 
Pete it is worth thinking through your operating modes.
I have many but the main ones are:
- time based: Time Day / Time Evening / Time Night which are used a lot in choosing the lighting modes (using the Automatic function in the lighting block)
- location based: Location Home / Location Out (popped out to the shops) / Location Away (eg on holiday) which are used to determine heating,  hot water, presence simulation etc.
- event based: Cleaning mode / Guest mode / etc.

Cheers David

Reply all
Reply to author
Forward
0 new messages