@Daniel_O (Daniel O ) posted a new topic, subject "[SOLVED] PaperUI: possible to clone items?". It read:

   Hey everybody,
    
    Search so far has mostly yielded results of people having problems with duplicate items showing up. But I actually want to duplicate something.
    
    Ok, background:
    
    So far I only had a very basi openhab2 Installation that I was using with the mqtt legacy binding to controll my sonoff devices. Since I'm renovating a few rooms now, I want to do more with openhab and migrate my other hardware. I also want to use more of a graphical UI, so I decided to set up a new installation and with the new mqtt binding, move everything to Paper UI. Thanks to the excellent guides in this forum I figured it all out (although I set up mosquito again, the internal broker just kept crashing) and have my sonoff 4chan now running with all the channels in paper ui - neat!
    
    Now, I have 5 more sonoff devices that I want to integrate.
    
    I am looking for a funtionality like this:  
    clone/duplicate a thing, create a new ID and it would be best if it is disabled after cloning.
    
    Then I want to change the name and edit the mqtt channel to adapt it for the new device, enable the thing again … and done.
    
    But it doesn't seem possible in paper ui? Or am I missing something, can you really not clone items? That was very easy with the config files. Is it possible for paper ui items to do this on the console?

After which, @vzorglub (Vincent Regaud) added

    Daniel_O:
    
    > But it doesn't seem possible in paper ui?
    
    Correct
    
    Daniel_O:
    
    > Or am I missing something, can you really not clone items?
    
    No, you can't clone things either
    
    Daniel_O:
    
    > That was very easy with the config files.
    
    You can still do this with the config files  
    For some bindings where you have lots of things, it mights be useful to use the text things files instead of the paperUI. This way you can copy and paste your things and just change the names and topics as required.
    
    For MQTT currently I have:
    [code] 
        Bridge mqtt:broker:MosquittoMqttBroker "Mosquitto MQTT Broker" [ 
          host="+1-209-825-5545",
          secure=false,
          port=1883,
          qos=0,
          retain=false,
          clientid="Oh2Mqtt2Thing",
          //certificate="",
          //certificatepin=false,
          //publickey="",
          //publickeypin=false,
          keep_alive_time=30000,
          reconnect_time=60000,
          //lastwill_message="",
          //lastwill_qos=1,
          //lastwill_topic="",
          username="username",
          password="password"
        ]
        {
            //*****************
            //** THERMOSTATS **
            //*****************
        
            // *** PORCH ***
            Thing topic PorchThermostat "Porch Thermostat" {
                Channels:
                    Type string : Mode "Mode" [
                        stateTopic="House/Porch/Thermostat/Mode",
                        commandTopic="House/Porch/Thermostat/Mode",
                        allowedStates="off,heat"
                    ]
                    Type number : Target "Target" [
                        stateTopic="House/Porch/Thermostat/Target"
                    ]
                    Type number : Ambient "Ambient" [
                        stateTopic="House/Porch/Thermostat/Ambient"
                    ]
                    Type number : Humidity "Humidity" [
                        stateTopic="House/Porch/Thermostat/Humidity",
                        min=0,
                        max=100
                    ]
                    Type number : Battery "Battery" [
                        stateTopic="House/Porch/Thermostat/Battery",
                        min=0,
                        max=100
                    ]
            }
        
            // *** HALLWAY ***
            Thing topic HallwayThermostat "Hallway Thermostat" {
                Channels:
                    Type string : Mode "Mode" [
                        stateTopic="House/Hallway/Thermostat/Mode",
                        commandTopic="House/Hallway/Thermostat/Mode",
                        allowedStates="off,heat"
                    ]
                    Type number : Target "Target" [
                        stateTopic="House/Hallway/Thermostat/Target"
                    ]
                    Type number : Ambient "Ambient" [
                        stateTopic="House/Hallway/Thermostat/Ambient"
                    ]
                    Type number : Humidity "Humidity" [
                        stateTopic="House/Hallway/Thermostat/Humidity",
                        min=0,
                        max=100
                    ]
                    Type number : Battery "Battery" [
                        stateTopic="House/Hallway/Thermostat/Battery",
                        min=0,
                        max=100
                    ]
            }
        
            // *** KITCHEN ***
            Thing topic KitchenThermostat "Kitchen Thermostat" {
                Channels:
                    Type string : Mode "Mode" [
                        stateTopic="House/Kitchen/Thermostat/Mode",
                        commandTopic="House/Kitchen/Thermostat/Mode",
                        allowedStates="off,heat"
                    ]
                    Type number : Target "Target" [
                        stateTopic="House/Kitchen/Thermostat/Target"
                    ]
                    Type number : Ambient "Ambient" [
                        stateTopic="House/Kitchen/Thermostat/Ambient"
                    ]
                    Type number : Humidity "Humidity" [
                        stateTopic="House/Kitchen/Thermostat/Humidity",
                        min=0,
                        max=100
                    ]
                    Type number : Battery "Battery" [
                        stateTopic="House/Kitchen/Thermostat/Battery",
                        min=0,
                        max=100
                    ]
            }
        
            // *** SMALL BEDROOM ***
            Thing topic SmallBedroomThermostat "Small Bedroom Thermostat" {
                Channels:
                    Type string : Mode "Mode" [
                        stateTopic="House/SmallBedroom/Thermostat/Mode",
                        commandTopic="House/SmallBedroom/Thermostat/Mode",
                        allowedStates="off,heat"
                    ]
                    Type number : Target "Target" [
                        stateTopic="House/SmallBedroom/Thermostat/Target"
                    ]
                    Type number : Ambient "Ambient" [
                        stateTopic="House/SmallBedroom/Thermostat/AmbientTemp"
                    ]
                    Type number : Humidity "Humidity" [
                        stateTopic="House/SmallBedroom/Thermostat/Humidity",
                        min=0,
                        max=100
                    ]
                    Type number : Battery "Battery" [
                        stateTopic="House/SmallBedroom/Thermostat/Battery",
                        min=0,
                        max=100
                    ]
            }
        
            // *** LARGE BEDROOM ***
            Thing topic LargeBedroomThermostat "Large Bedroom Thermostat" {
                Channels:
                    Type string : Mode "Mode" [
                        stateTopic="House/LargeBedroom/Thermostat/Mode",
                        commandTopic="House/LargeBedroom/Thermostat/Mode",
                        allowedStates="off,heat"
                    ]
                    Type number : Target "Target" [
                        stateTopic="House/LargeBedroom/Thermostat/Target"
                    ]
                    Type number : Ambient "Ambient" [
                        stateTopic="House/LargeBedroom/Thermostat/AmbientTemp"
                    ]
                    Type number : Humidity "Humidity" [
                        stateTopic="House/LargeBedroom/Thermostat/Humidity",
                        min=0,
                        max=100
                    ]
                    Type number : Battery "Battery" [
                        stateTopic="House/LargeBedroom/Thermostat/Battery",
                        min=0,
                        max=100
                    ]
            }
        }
        
        
    [/code]

Then @Daniel_O (Daniel O ) said

    Dang! Thanks for the confirmation. So that's 1:0 for the config files so far.
    
    If I properly create the config files, they should show up in paper ui as well . right? Or does it only show stuff from the internal files?

@vzorglub (Vincent Regaud) replied

    Daniel_O:
    
    > they should show up in paper ui as well . right?
    
    Correct, you will see the things in the paperUI with the channels and items links.  
    BUT your won't be able to edit them in the paperUI.

So @Daniel_O (Daniel O ) replied

    Thanks again!

Then @chrishiscox (chrishiscox) said

    So I have now converted to v3, using the ui only and now I need to re-instate my things and config files as I cannot clone an item? This is a little restrictive, as I have 6 of some devices and just keeping the naming convention the same is so tedious.  
    Is there a better solution when I introduce a new device that is identical to an existing device?  
    Cheers


{'source': 'discourse', 'url': 'https://community.openhab.org/t/solved-paperui-possible-to-clone-items/62760', 'title': '[SOLVED] PaperUI: possible to clone items?', 'views': 1705, 'has_accepted_answer': True, 'word_count': 904, 'like_count': 2, 'reply_count': 1, 'participant_count': 3, 'posts': 6, 'tags': 'openhab2 mqtt paperui', 'author': '@Daniel_O (Daniel O )', 'participants': '@Daniel_O (Daniel O ), @vzorglub (Vincent Regaud), @chrishiscox (chrishiscox)', 'image_url': [None], 'created_at': '2019-01-05T10:41:15.088Z', 'last_posted_at': '2021-06-06T01:37:35.990Z'}