Skip to content

Log-SwitchController-1


title: Log-SwitchController-1: Received duplicate switch state for switch


Related Config File Sections:

MPF expects to get only state changes from platforms. That is part of the platform interface contract. This warning indicates that the contract is violated (i.e. because MPF got a switch close but the switch has been closed before). This might indicate bugs in the platform firmware, our platform interface or the communication in between.

MPF handles this gracefully so there is no need to worry. It will just ignore the second hit and carry on.

There are conditions where you will see this. Our smart virtual platform will sometimes trigger this. Those are kind of bugs. Usually harmless but we will fix them if you report them.

Additionally, you can trigger those warnings if you use more than source of switch states at once for the same switch. That could be any two of a hardware platform, MPF monitor or keyboard mappings.

Lastly, the P-Roc is known for sending switches twice when using debounced switches. This has to do with its internal state machine and is usually harmless.

Need more help troubleshooting?

Have a look at our Troubleshooting section. It might give you some hints for certain classes of problems.

What if this did not fix your problem?

Please tell us about your error in the community forum and we might be able to update this page afterwards. Or even better: You help us to update it afterwards.

Is something missing here? Do you have a helpful hint for others experiencing this error?

Please create a Pull Request and add it. Alternatively, please tell us in the community forum.


Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results