BTicino MyHome bus: MH202 advanced scenario controller

m4rky_m4rk

Prominent Member
Joined
Aug 14, 2008
Messages
3,620
Reaction score
848
Points
701
Location
500m elevation
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:
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[
 
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,
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:
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?
 
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:
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:-(
 
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 :)
 
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 ?
 
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. :)
 
OK,
I'm italian born in Luxembourg. I understand well italian language and speaks it, but this doesn't help a lot with Bticino :)
 
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
 
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:
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 ?
 
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'?
 
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 ?)
 
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 ?)


I created a new thread for the Screen10. I have some questions my self. I will reply with what limited knowledge I have and will be doing more testing, learning

Please use this thread for Screen10 specific topics
BTicino MyHome bus: Homescreen10 LCD panel
 
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
 
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?
 
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.
 
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'?

I replied here:
BTicino MyHome bus: Homescreen10 LCD panel
 
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?
 
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?
 
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?
 
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:

The latest video from AVForums

TV Buying Guide - Which TV Is Best For You?
Subscribe to our YouTube channel
Back
Top Bottom