Quantcast

BTicino MyHome bus: MH202 advanced scenario controller

m4rky_m4rk

Member
MH202 Scenario programmer product details

Thread for the MH202 advanced scenario controller discussions

Notes/tips:
  1. Boolean counters need to be set to an initial state, True or False. It is the change of state that is important. This can be done with a scenario that has no start conditions but is set to run at restart of MH202. I also add a Light on/off event so that I know it ran OK and finished after uploading a new config.
  2. A CEN command in the Action list can be used to trigger another scenario if the same CEN command is in its Start list
  3. CEN vs Boolean usage: CEN commands cannot be used in the 'only if' list.
  4. Approximately 5 scenarios can be run simultaneously.
  5. Actions are executed sequentially.
  6. The minimum time delay command is 1 sec but an action, eg Light on, takes approx 250ms to execute, So, dummy actions can be used to create delays shorter that 1 sec.
  7. It is possible to set the start conditions for several scenarios to be identical. Which is actually run can then be decided by the use of an 'only if' condition. This is useful to allow the use of just one CEN address that then triggers other scenarios dependent on, for example, time of year, room temperature, sun sensor etc.
  8. A tip for debugging. The web admin page of the MH202 shows which scenarios are currently running.
 
Last edited:

m4rky_m4rk

Member
Original post From gugus24 here

Hi M4rky,
As expect I tried to use the boolean and that 's my result :
  • Boolean with the True/false value -- > wroks fine (as not so difficult to program it)
  • Counter : Impossible to make it work.
Here is the scenario I just realized to test the Counter :

When I turn on the garage lights 3 times, the kitchen light should turn on.


1. Creation of 1 Scenario for my Counter :
Start Area :
  • Garage Light -> ON
Action Area :
  • Command -> Value+ | Step -> 1
  • Address -> Counter 1

2. Creation of 1 Scenario to Turn on the kitchen lights

Start Area :
  • Garage Light : -> ON
Condition :
  • Command -> Variable Value
  • Condition -> '='
  • If Value -> '3'
  • Address -> Counter 1
Perhaps you will find my mistake....
In advance I thank you a lot[
 

m4rky_m4rk

Member
Hi Gugus,

I have not used counter before but I think you should you start by setting an initial value, say 0 and in the ' kitchen light on' scenario reset the counter to 0 again. I would create an initialisation scenario that runs at only at start of the MH202 to set the initial counter state.. See scenario properties 'Exceute at device restart' =yes ... top right panel in MyHome suite for the scenario
 

m4rky_m4rk

Member
M4rky,
is it possible to see the state of a boolean counter ?
Yes but BTicino do not make it easy. Checking the state of booleans' would make life a lot easier.

I have Screen10 panel. It can show if an actuator is open or closed. Normally that would be to show if a light is on or off. I used some spare actuators connected to nothing and set them to open or close depending on a boolean state. So I get a green indicator if a Boolean is true. I only do this for really important booleans eg Master off, auto run.
A slight problem with that is the display shows the boolean indicator as switch and someone... not saying who ....could switch it on/off by mistake... So, I used another scenario and the boolean to switch it immediately back to reflect the correct boolean state... A nice but more expensive way would be to use a Basic contact interface module as well as actuator. The screen10 can show the state of the contact module and user cannot accidentally change the state on the panel.
 
Last edited:

djtom2002

Novice Member
Hi! Great that we have an own MH202 Thread now. As summer passes by i will have some time to readjust me bticino settings.

Therefore i will create a new weather scenario which should do the following:

In summer shut down the shutters at a certain temperature (how to get the temperature?) at the moment i just have indoor temperature which is not enough as it might be hot inside and cooler outside and i just have opened my windows.

In winter i want that the shutters don't go down to collect sun through the windows. How have you handled such situations or do you similar ones?
 

m4rky_m4rk

Member
Hi Tom,

Most of my scenarios are for blind control!! My house is almost a passive house and the average temperature doesn't change much day to day. 0.5deg or less. Summer max was 26.5C at the top the house, 23C in the lower part....with 30-35C outside day temperature for many days/weeks.. Winter min is 21C throughout. The house is sealed and the air circulation is managed through an air circulation unit; so I tend not to open windows much. It's not passive because I have very large floor to ceiling south facing windows and so I have to be careful to control sun room heating whilst trying to maximise the light for me and the plants. The house is designed to have a light and an airy feel.

I have an outdoor temperature sensor but have not felt the need so far to use it for blind control.

I have selected blinds opening, tilting and closing automatically depending on the following sensors:
  • External bright light sensor
  • External low light light sensor
  • Internal room temperature probes. Usually the probe from the hottest part of the house is enough
  • Wind sensor
  • Rain sensor... for summer storms when squalls can be very sudden and without any other warning

In addition I have conditional factors such as:
  • time of day
  • time of year
  • workday vs weekend
  • sunrise, sunset
I use Boolean's to track such things as:
  • guests using a room.. e.g. don't want the blinds suddenly going up without warning
  • terrace in use... don't want to be on terrace and blinds come down...I have a roof terrace!!!
  • current blind positions.... to stop unwanted or unnecessary blind movement
  • holiday mode.... house takes over more control at weekends
  • master stop activated... for safety... nothing will run
  • manual override of automatic control... for temporary stop of auto control.. wind control still active.
To go along with the blind control I also added some light control for when the blinds close, sunset, dark etc.

Its quite complex but my house now runs all the blinds all by itself with the blinds being sent to the correct positions for most situations with no unwanted movements. I hardly feel the need to adjust them manually any more.

I can also control activate some of the scenarios manually from my phone or control panel.

Useful for setting up and debugging:
  • IP camera to see when they move while at work... very useful time saver
  • MH202 web admin page to see which scenarios are currently active
  • Screen10 panel to visualise some of the boolean and contact states
  • I built an internal sun sensor out of a temperature probe.. to check on my phone if blinds closed correctly before the room overheats. Mobile-Alerts range of sensors are cheap and useful for this. Also useful for checking the wind limit switch is set correctly. See Amazon.
If you get stuck with ideas on how to handle a specific situation let me know and we can discuss how it might be done.
 
Last edited:

gugus24

Novice Member
Hi Gugus,

I have not used counter before but I think you should you start by setting an initial value, say 0 and in the ' kitchen light on' scenario reset the counter to 0 again. I would create an initialisation scenario that runs at only at start of the MH202 to set the initial counter state.. See scenario properties 'Exceute at device restart' =yes ... top right panel in MyHome suite for the scenario
Hi M4rky,
This should set the value '0' only when the MH202 module restarts ? The problem is that MH202 never restart except when I inplug it from the bus:-(
 

m4rky_m4rk

Member
Hi M4rky,
This should set the value '0' only when the MH202 module restarts ? The problem is that MH202 never restart except when I inplug it from the bus:-(
After a MH202 has restarted a defined value is set if you set a scenario to define it that runs automatically at restart. After that the counter can either stay the same, increases, or decreases but it has a value that can change. The point is that after a restart the value will be in an undefined state and scenarios that depend on a counter value as start or condition will not run as expected eg after power cut or config upload. As I said before I have not used counters but am using my experience of Booleans... so I could be wrong :)
 

gugus24

Novice Member
After a MH202 has restarted a defined value is set if you set a scenario to define it that runs automatically at restart. After that the counter can either stay the same, increases, or decreases but it has a value that can change. The point is that after a restart the value will be in an undefined state and scenarios that depend on a counter value as start or condition will not run as expected eg after power cut or config upload. As I said before I have not used counters but am using my experience of Booleans... so I could be wrong :)
Hi M4rky,

Thank you. Ok I understand what you mean with the restart of MH202.
Can I ask you where you from ? GErmany, Italy, UK, Luxembourg ?
 

m4rky_m4rk

Member
I am from the UK and built a new house with bus system electrics in Austria.

So, being a foreigner with terrible German language skills, new to BUS systems for houses (KNX, BTicino) and with a lot of the interesting BTicino stuff written in Italian I know how valuable small internet discussions can be to help get the most out of your system and also to check what your installer did, says. :)
 

gugus24

Novice Member
OK,
I'm italian born in Luxembourg. I understand well italian language and speaks it, but this doesn't help a lot with Bticino :)
 

gugus24

Novice Member
Hi again M4arky,

Sorry to disturb you, but I still have problems to understand the difference between CEN, CEN PLus, CEN Modules, Programmed Modules....
I created a Scenario and as don't have any Scenario Commands like HD4680, I would like to start it with my Multimedia Screen 10". But this doesn't work .
Can you please help me and explain how to configure it? I don't understant how to link a command with the scenario. I guess that one the reason of my misunderstand is because I don't understant the difference between the families like Scenario Commands
upload_2017-9-12_20-20-55.png
and Scenarios
upload_2017-9-12_20-21-48.png
.
Best Regards
 

m4rky_m4rk

Member
I think you need to use Scenario control as start event in the MH202. I have not used the items under 'Scenarios' as in your screen shot. When I asked BTicino, when they used to actually respond to posts, they said that the different scenario types are to support legacy products. Don't worry about them. You need to use the items listed in 'Scenario control' I use both CEN and CEN plus depending on... for phone use CEN Plus, for MH202 to MH202 and screen10 to MH202 I use CEN. They are slightly different in setup up but slightly.

For MH202 one scenario calling another, use CEN and pick and address and button 0 to use as start condition and then in another scenario use the same as an action.

For Phone app to MH202. Use CEN plus as start for a scenario choose address and button. On phone choose the same.

For screen 10. I found CEN works but there are additional options on the screen10. You can enter a CEN as start, stop, enable and disable. Now when you check the Scenario button on the screen there are four options Start, stop, enable, disable.. Like my phone app and I assume this works like the web interface for the MH202 too. I have not had time explore it much. I should get to this next week and will post more to discuss what I find.. Blind leading the blind :). CEN plus didn't seem to work and for the Screen10 there are additional scenario controls called My-Home-Screen10 scenarios. I thought I saw when I first checked it out it was possible to create these directly on the panel but now that doesn't seem to work. Maybe I am going crazy!!

Just in case you didn't realise it. First for the screen 10 you need to create an object for the Scenario.. Add object in Functions, Scenarios. When that's done you can drag that object on to a room page under 'Rooms' You can also add a shortcut onto the home page from the configure items box on the right. This home page shortcut doesn't show the other buttons, like for rooms, for start, stop, enable and disable but seems just be the CEN command setup as 'start' for the object. Again I need to do more testing.
 
Last edited:

gugus24

Novice Member
Thank you M4rky,

When you say : 'For Phone app to MH202' and 'for MH202 to MH202', what do you mean ? Does it mean 'For Phone to MH202' that you launch with your Phone a Scenario saved in the MH202 ?
 

gugus24

Novice Member
Ok, let's try to start a scenario written on MH202. I want to launch it from my 10" Touchscreen.
If I understood, I should create a CEN Command on the Touchscreen. When I choose Scenario on my Touchscreen in the Functions Menu, I only have the following options 'Scenario Module', 'My Home Screen Scenario' or 'Scheduled Scenario'?
 

gugus24

Novice Member
For MH202 one scenario calling another, use CEN and pick and address and button 0 to use as start condition and then in another scenario use the same as an action.

For Phone app to MH202. Use CEN plus as start for a scenario choose address and button. On phone choose the same.
Are the scenario Addresses in the same range than the Bus Address ? (I mean if I have a light on the Address A=1 and PL=2, this address cannot be taken by the scenario ?)
 

Tony50

Novice Member
Hi Mark,

Can you share your configuration with us?
It is really hard to find info about MH202 online and how to build scenarios. I am at the beginning and I must say that I am quite confused.
Any help/suggestion is appreciated.

Regards
Tony
 

m4rky_m4rk

Member
My file is quite large and has 130 scenarios. Some of these are nested and call other scenarios. I think it could confuse you more. What do you want to know, what task do you have in mind?

At the top of this thread I put some general tips but as no one seems to use the MyHome BUS threads I started I had given up on the community side... happy to be proven wrong though.

How did you find this thread?
 

m4rky_m4rk

Member
Thank you M4rky,

When you say : 'For Phone app to MH202' and 'for MH202 to MH202', what do you mean ? Does it mean 'For Phone to MH202' that you launch with your Phone a Scenario saved in the MH202 ?
Phone app can launch a scenario, LCD panel can launch a scenario, MH202 scenarios can launch other scenarios.
 

Tony50

Novice Member
My file is quite large and has 130 scenarios. Some of these are nested and call other scenarios. I think it could confuse you more. What do you want to know, what task do you have in mind?

At the top of this thread I put some general tips but as no one seems to use the MyHome BUS threads I started I had given up on the community side... happy to be proven wrong though.

How did you find this thread?
I am following you on the Bticino forum and I saved this link a couple of mounts ago.
The loneliness in this world is very high so I decide to write you in order to get some help on the MH202 and maybe share a bit of info together.
I don't mind to share but a lot of people do. I appreciated the work that you have done so far but for me, it is quite difficult to build a proper scenario in MH202.
So that why I asked you to share (maybe using a dedicated cloud sharing tool) what you have been producing so far.
I will do it with my project and I am open having discussion on it.
Is it ok for you?
 

m4rky_m4rk

Member
Thanks. I thought maybe BTicino would have removed the links I left there. Yeah, it would be good to discuss this stuff but I am not sure what's in the config file and so I am not so keen the post that. It would need some explaining too. What do you want your scenario to do?
 

Tony50

Novice Member
Let say that I want to do a normal timer for my lamp that I want to turn on when is getting dark and turning off after midnight or another time. How will you build the scenario?
 

m4rky_m4rk

Member
Let say that I want to do a normal timer for my lamp that I want to turn on when is getting dark and turning off after midnight or another time. How will you build the scenario?

I assume you know some basics but just in case you don't or something is not clear and for the benefit of others wanting to learn that pass by I will start from the beginning.

MH202 Scenarios are configured using the software MyHomeSuite.
On starting the MyHomeSuite and opening the project for you home you should see all your devices on available on your bus. These are added to the Home project by your installer or yourself. If things are missing I can tell you how to add them. The MH202 scenario controller should be in the list. Select it and the select configuration button on the bottom right panel. This will then bring to the configuration Home page.
Most items on the home page are not so useful but Clock is. It's here you set the time zone, summer time and importantly your geographic coordinates. This information is used by the MH202 to know when sunset and sunrise, day and night are in your area.

Also, from the Config home page you can set the IP address for the MH202 (for Phone access and for MH202 Scenario web page access)

On Bottom right in MyHome Suite for MH202 config there are some arrows. Click the right one and it will take you to the scenario configuration panels. The main panels are 'Start', 'Stop', 'Only if' and 'Action'.

Top right there a few more options as tick boxes for the scenario 'Execute at restart' and 'Repeat action'. These are only occasionally needed. Execute at restart is good to get the system into a known start state, say after a power cut or after a new config has been uploaded to the MH202. I use it to set Boolean states and some some important switches into a 'safe' state. 'Repeat action' I do not recommend using if you plan on any fine timing control eg blind blade control. I can say more on that later if asked.

On the left panels there are tabs for Scenarios and Objects lists. Objects are grouped into category types e.g. On/Off, time etc The scenario lists is simply all the Scenarios you have created.

In the object lists are the items used to build a scenario. Depending on which panel have is selected , 'Start', 'Stop', ' Only if' and 'Action' the available objects will change. Unavailable objects for that panel/area will be greyed out. Simply drag and drop the items you want to use into the panel your are working on.

Now to the meat of what you asked.
This is the way I would simply do it but there are other ways too

Create scenario1 called 'Lights: On Lamp1'

Add.....
Start panel:
  • Time object 'Sunset'
Action panel:
  • Object On/Off Light and set the address to the bus address of the lamp or socket you want to control. Select On
Create Scenario2 called 'Lights:Off Lamp1'

Add the following objects.....
Start panel:
  • Time 'Hour' 00:00 and as many other times as you want the lamp to go Off
Action panel:
  • On/Off Light and set the address to the bus address of the lamp or socket you want to control. Select Off

If the light is coming on too early then you could do it like this:
Create scenario1 called 'Lights: On Lamp1'

Add to following objects.....
Start panel:
  • Time 'Sunset'
Action panel:
  • Time delay 30mins
  • On/Off Light and set the address to the bus address of the lamp or socket you want to control. Select On
If you have a light sensor relay and contact interface then you could use the sensor state to trigger the lights coming on instead or as well as Sunset.

If you plan on creating many scenarios its best to consider the naming scheme for the Scenarios from the start. It can get hard to debug if your are not sure what's doing what easily. I use a scenario naming scheme like this: 'Lights: On/Off description' 'Blinds: Open/Close description', 'Boolean: description' etc

To make things more intelligent its useful to add sensors (eyes and ears of the brain) and use Booleans (the brains memory) to monitor and track the states of things. It depends on how much BUS stuff you have (blinds, lights, sockets etc) and how much you want use implement automation. eg If you had a dark sensor then you could get the lamp to come on when its actually dark and not just at sunset eg cloudy day. eg You could prevent it coming on if you're out of the house by monitoring your alarm state. Fully armed = away from home.. I aim to make things as automatic as possible but not annoying by being obvious and getting in the way.
 
Last edited:

Tony50

Novice Member
Thanks a lot. It is quite clear.
During my experiment, I had to use the Stop as well.

Create scenario1
called 'Lights: On Lamp1'
Start panel:
  • Time object 'Sunset'
Stop panel:
  • Time '23:30'

Action panel:
  • Object On/Off Light and set the address to the bus address of the lamp or socket you want to control. Select On
I am not sure if this is correct because the scenario is always triggered even if I tried to turn off the light automatically.
Can you explain the use of STOP panel?
 

m4rky_m4rk

Member
Stop exits the scenario at whatever point its up to. It does not turn the light off.

To turn a light off you will need an action with Light xx Off. You could do it in the same scenario but you would need a delay after the On, say 6hrs. The light would then come at sunset or shortly after and then off 6hrs later after the On. If you want it off at a fixed time then you will need to create an Off scenario like I posted above.
 

Tony50

Novice Member
Why not doing it like:

Create scenario1 called 'Lights: On Lamp1'
Start panel:
  • Time object 'Sunset'
Action panel:
  • Object On/Off: Timed Light with the right address. Command: Timed ON and set the needed timer
I got that there are different way of doing the logic but I am wondering if at the moment I am doing it properly. As I told you I had to add the Stop case because I faced some issue during my try and catch exercise. It seems that without using the stop condition the scenario is always in the loop. So I had to add this conditions in all my scenarios.

This is the way that I build the above scenario:
SCE1 called 'Lights: On Lamp1'
Start panel:
  • Time object 'Sunset'
Stop panel:
  • Hour: '23:30'
Action panel:
  • On Light (1.1)
SCE2 called 'Lights: OFF Lamp1'
Start panel:
  • Time object '00:35'
Stop panel:
  • Hour: '00:36'
Action panel:
  • Off Light (1.1)

As I said it works but I don't this is the most efficient way of doing it. The problem that I am facing if, for instance, I want to turn off the light manually before 23:30 the MH202 forces it at ON later. After 23:30 I can manually turn it OFF.
So once again, what is the idea of using STOP panel? My personal interpretation is that will be used for the ending of the scenario. In case you will not use it there is a possibility that the scenario will loop forever (I watered my garden for 6 hours last summer).
 

m4rky_m4rk

Member
Scenario's shouldn't loop unless you have the 'Repeat' option set to 'yes'!! Its top right of the screen under the scenario name and description. Both options should be 'No' for your lamp situtation.

Normally the scenarios just run through the sequence of 'Actions' and then stop when they get to the end of the sequence. Then they will only start again if the start condition occurs again. There should be no need for the stop command.

If the Repeat option is not selected then I am puzzled. In that case could you post a screen shot of MyHome Suite.

Stop panel is used to interrupt a already running scenario. eg when you want to start another scenario which has some of the same items in the action list as an already running scenario. eg blinds with staggered closing and then another scenario starts to open them. If you do not stop the first scenario then both scenarios could run at the same time causing confusing results. FYI Up to 5 scenarios can run simultaneously.

For debugging and testing you can see what is running by accessing the MH202 via your browser and going to the scenarios tab. There all scenarios are shown with the running ones highlighted. You can start and stop them too.

For testing set the times around the time you are working on it and replace sunset with an hour. Then there is no need to wait for sunset or midnight to get a result ;)
 
Last edited:

Trending threads

Latest News

LG Mini LED concept TV unveiled
  • By Andy Bassett
  • Published
LG Display to start OLED panel mass production at China plant
  • By Andy Bassett
  • Published
Sonos to cease support for older products in May
  • By Andy Bassett
  • Published
Philips announces SN503, ST702 and SH402 sports headphones
  • By Andy Bassett
  • Published
Philips announces Fidelio X3 headphone
  • By Andy Bassett
  • Published
Top Bottom