The mediation level is a number associated with a device service to allow for greater flexibility in setting up intelligent home automation networks. In these networks, devices called fabrics are used to translate one message to another using a set of rules or scripts.
A problem arises when the input messages are also directly processed by output devices. For example, suppose there is some kind of 'doorbell' connected to the network, which sends the /bell message whenever it is pressed. Another device could respond to this '/bell' message by playing the sound of a bell. However, a fabric may be in between to make sure that the bell is disabled at night. So now, the sound device should not respond to the /bell message from the doorbell, but only from the fabric.
So, how to fix this? The solution is to use 'mediation levels'. For normal devices, this level equals zero, but for devices that receive and re-transmit messages based on logic, this number is 1 or higher. A device (like the doorbell above) that wants to send a message to auto-discovered devices sends the message to the subset of devices that has the highest mediation level. Devices with a mediation level higher than 0 should send their messages to devices with the highest mediation level below theirs.
In the example, the fabric could have a level equal to one. When the doorbell auto-discovers the fabric and the output device, it decides that it should only send messages to the fabric and not to the output device (which has level 0). Of course, as soon as the fabric is removed from the network, the doorbell should start sending messages to the output directly again. This mechanism allows for the flexible addition and removal of intelligent nodes to the network, while retaining basic functionality of any of these nodes is not present or has failed.
In the DNS-SD/mDNS discovery mechanism, the mediation level is specified by the EPMediationLevel service attribute.