How to change Port assigned to UPB PIM

I am new to Home Assistant and can’t find an answer to this.
When I set up my UPB it was assigned to /dev/ttyUSB0
this has now moved to /dev/ttyUSB1 so how can I change Home Assistant to look in /dev/ttyUSB1 instead of the /dev/ttyUSB0.
I am running HA on a PI 4.

  1. Delete the existing UPB integration.

  2. Re-install the UPB integration; specify the new port during the installation process.

  3. The UPB integration creates entities based on the upb.upe file you provide. As long as the contents of that file haven’t changed, the integration will create entities with the same names.

Thanks for this but there must be a file in the operating system that can simply be changed.
If I delete and re install I have to re assign ever device to the appropriate room etc.

It’s in a file named core.config_entries located within the hidden directory named .storage (a sub-directory of the config directory). It’s hidden to prevent users from manually editing the files (one editing mistake is likely to corrupt Home Assistant’s operations). Be advised that you take full responsibility for any negative outcome.

The content is in JSON format and what you’re looking for looks like this:

      {
        "entry_id": "87d7568207f611bla5f597f8bla71d9c",
        "version": 1,
        "domain": "upb",
        "title": "UPB",
        "data": {
          "host": "serial:///dev/ttyUSB0",
          "file_path": "upb.upe"
        },
        "options": {},
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": 150,
        "disabled_by": null
      },

Ideally, Home Assistant should be shutdown while you make changes and you should make a backup copy of the file in case you accidentally make an editing mistake.

1 Like

Perfect!
Thanks so much!

You’re welcome!

Please consider marking my post above with the Solution tag. You marked your own post which doesn’t contain the actual instructions for solving the problem. The Solution tag’s purpose is to help users find answers to similar questions.

For more information about how to use the Solution tag, refer to guideline 21 in the FAQ.