# How to create a second instance

**URL:** <https://forum.genieacs.com/t/how-to-create-a-second-instance/1223>\
**Category:** Uncategorized\
**Created:** [November 22, 2020, 12:21pm UTC](https://forum.genieacs.com/t/how-to-create-a-second-instance/1223 "2020-11-22T12:21:37Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![vinitr](https://avatars.discourse-cdn.com/v4/letter/v/53a042/32.png) [@vinitr](https://forum.genieacs.com/u/vinitr)\
**Post date:** [February 4, 2021, 10:24am UTC](https://forum.genieacs.com/t/how-to-create-a-second-instance/1223/21 "2021-02-04T10:24:17Z")

</div>

hye,  
I am new here can you help me to create service from GenieAcs to Cpe.  
where i need to write that script and how that script work/communicate with my cpe.  
i am able to do reset,reboot, upload config file etc.  
but this is not able to do by me.  
please help!

---

<div class="post-metadata">

**Author:** ![zaidka](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/zaidka/32/9_2.png) [@zaidka](https://forum.genieacs.com/u/zaidka)\
**Post date:** [February 5, 2021, 8:27am UTC](https://forum.genieacs.com/t/how-to-create-a-second-instance/1223/22 "2021-02-05T08:27:15Z")

</div>

> [@Jorge](#):
>
> PD. I can’t make it work with your suggestion or I’m maybe putting it in the wrong place. I’ve set that like this:

It may be that the parameter is reported as non-writable. Download the list of parameters as CSV to confirm. If writable is false then the workaround suggested by @akcoder is probably your only option here.

---

<div class="post-metadata">

**Author:** ![Jorge](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jorge](https://forum.genieacs.com/u/Jorge)\
**Post date:** [February 5, 2021, 8:44am UTC](https://forum.genieacs.com/t/how-to-create-a-second-instance/1223/23 "2021-02-05T08:44:58Z")

</div>

Hi Zaid,  
on the CSV is shows like I posted on the answer 15, like this:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/1X/bd4f5ff5ef4f684d265a421d787d1e93278402ae.png)  
Nothing on the Writable option. Anyway with the @akcoder solution it’s working fine.

Thanks.

PD. Well I mean nothing when the info is loaded for the first time, if I reflesh the parameter at least twice then is shows writable true and it let my add the instance event without the workaround but I couldn’t achieve refleshing it by script.

---

<div class="post-metadata">

**Author:** ![AlvinTLC](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/alvintlc/32/428_2.png) [@AlvinTLC](https://forum.genieacs.com/u/AlvinTLC)\
**Post date:** [February 11, 2021, 9:54pm UTC](https://forum.genieacs.com/t/how-to-create-a-second-instance/1223/24 "2021-02-11T21:54:15Z")

</div>

Hi i have the same issue, creating a second wan this one works for me

```
   log('Creating WANPPPConnection (if necessary)');
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANPPPConnection.*", null, {path: 1});

log('Setting up WANPPPConnection');
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.*", {path: now}); //Refresh the node...

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.Name", {value: now}, {value: "Internet"});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.ConnectionType", {value: now}, {value: "IP_Routed"});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.X_BROADCOM_COM_IfName", {value: now}, {value: "ppp0.1"});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.X_HW_IPv6Enable", {value: now}, {value: true});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.X_HW_IPv4Enable", {value: now}, {value: true});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.NATEnabled", {value: now}, {value: true});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.X_BROADCOM_COM_FirewallEnabled", {value: now}, {value: true});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.Enable", {value: now}, {value: true});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.X_HW_VLAN", null, {value: "100"});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.X_HW_SERVICELIST", null, {value: "VOIP_INTERNET"});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.Password", null,{value: serial.value[0]});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.Username", null,{value: serial.value[0]});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.X_HW_IPv6.IPv6Address.1.Origin", {value: now}, {value: "AutoConfigured"});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.*.X_HW_IPv6.IPv6Prefix.1.Origin", {value: now}, {value: "PrefixDelegation"});

```

and whn i try to use this one not work

declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1”, null, {path: 1});

```
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1.Name",{value: now}, {value: "WAN_VOIP"});

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1.Enable", {value: now}, {value: true});

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1.ConnectionType", {value: now}, {value: "IP_Routed"});

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1.NATEnabled", {value: now}, {value: true});

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1.AddressingType", {value: now}, {value: "DHCP"});

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1.X_HW_SERVICELIST", null, {value: "VOIP"});

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1.X_HW_VLAN", null, {value: "150"});

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1.X_HW_PRI",null, {value: "2"});
```

---

<div class="post-metadata">

**Author:** ![darkam](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/darkam/32/471_2.png) [@darkam](https://forum.genieacs.com/u/darkam)\
**Post date:** [March 31, 2021, 1:46pm UTC](https://forum.genieacs.com/t/how-to-create-a-second-instance/1223/25 "2021-03-31T13:46:00Z")

</div>

Hello, I see you doing this directly using these variables, but I can’t find it in my version and 1.2.5.

I can’t add any of that to the code.  
these functions are in some shell file there in the terminal - I can’t create this at least it doesn’t work for me

 ![Screenshot_3](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/1X/3fda6923285b05d44618e1c5ec2f4930d0a29d24.png)

---

<div class="post-metadata">

**Author:** ![egor.gr](https://avatars.discourse-cdn.com/v4/letter/e/7ea924/32.png) [@egor.gr](https://forum.genieacs.com/u/egor.gr)\
**Post date:** [November 3, 2022, 10:07am UTC](https://forum.genieacs.com/t/how-to-create-a-second-instance/1223/26 "2022-11-03T10:07:44Z")

</div>

Hi.

> [@](#):
>
> ```auto
> let values = {
> Name: "3_VOIP_R_VID_52",
> X_HW_SERVICELIST: "VOIP",
> X_HW_VLAN: 52,
> X_HW_PRI: 51
> };
> 
> let basePath = "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANIPConnection.";
> const path = basePath + '.[' + Object.keys(values).map(key => key + ':' + values[key]).join(',') + ']';
> 
> declare(path, {path: 1}, {path: 1});
> 
> ```

In case where key have a “-”, for example  
`X_ZTE-COM_8021P:6,`  
I get unexpected token ‘-’ error when trying to save code.

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [November 3, 2022, 4:42pm UTC](https://forum.genieacs.com/t/how-to-create-a-second-instance/1223/27 "2022-11-03T16:42:06Z")

</div>

Create your own issue instead of performing necromancy please.

[Previous page](https://forum.genieacs.com/t/how-to-create-a-second-instance/1223.md?page=1)
