Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting device removes custom device configs from user device config #121

Open
Renpona opened this issue Feb 27, 2024 · 2 comments
Open

Comments

@Renpona
Copy link

Renpona commented Feb 27, 2024

If any custom device configurations (i.e., ones containing custom messages) have been added by the user to Intiface Central's buttplug-user-device-config.json file, then they will be removed by Intiface Central whenever a device is connected.

Specifically, the "configurations" section of the "specifiers" section gets wiped, and the "messages" section in the device entry gets completely removed.

Steps to Reproduce:

  1. Add a custom device configuration including a new messages config to Intiface Central's buttplug-user-device-config.json file.
  2. Run Intiface Central.
  3. Connect any device to Intiface Central.
  4. Check buttplug-user-device-config.json again - it will have been overwritten by Intiface Central.

Here is an example file before connecting a device:

  "version": {
    "major": 2,
    "minor": 0
  },
  "user-configs": {
    "specifiers": {
      "tcode-v03": {
        "websocket": {
          "names": [
            "TestDevice"
          ]
        },
        "configurations": [
          {
            "identifier": [
              "T1234"
            ],
            "name": "TestDevice",
            "messages": {
              "ScalarCmd": [
                {
                  "StepRange": [
                    0,
                    100
                  ],
                  "ActuatorType": "Vibrate"
                }
              ]
            }
          }
        ]
      }
    },
    "devices": [
      {
        "identifier": {
          "address": "T1234",
          "protocol": "tcode-v03",
          "identifier": "TestDevice"
        },
        "config": {
          "index": 0,
          "messages": {
            "ScalarCmd": [
              {
                "StepRange": [
                  0,
                  100
                ],
                "ActuatorType": "Vibrate"
              }
            ]
          }
        }
      }
    ]
  }
}

Here is what that same example file looks like after carrying out the steps to reproduce:

  "version": {
      "major": 2,
      "minor": 0
  },
  "user-configs": {
      "specifiers": {
          "tcode-v03": {
              "websocket": {
                  "names": [
                      "TestDevice"
                  ]
              },
              "configurations": []
          }
      },
      "devices": [
          {
              "identifier": {
                  "address": "T1234",
                  "protocol": "tcode-v03",
                  "identifier": "TestDevice"
              },
              "config": {
                  "index": 0
              }
          }
      ]
  }
}

I was told in Discord that this will be fixed with the configuration system rewrite, but I'm opening the issue anyway just so it's tracked.

@Renpona
Copy link
Author

Renpona commented Mar 19, 2024

Will likely be fixed by buttplugio/buttplug#616

@qdot
Copy link
Contributor

qdot commented Mar 19, 2024

Yup. Not gonna make it into 2.5.6 as I need to get this release out ASAP, but hopefully 2.5.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants