# Can I set which provider to add a device to on another gateway in script

**URL:** <https://forum.inductiveautomation.com/t/can-i-set-which-provider-to-add-a-device-to-on-another-gateway-in-script/82592>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [December 1, 2023, 3:33pm UTC](https://forum.inductiveautomation.com/t/can-i-set-which-provider-to-add-a-device-to-on-another-gateway-in-script/82592 "2023-12-01T15:33:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [December 1, 2023, 3:33pm UTC](https://forum.inductiveautomation.com/t/can-i-set-which-provider-to-add-a-device-to-on-another-gateway-in-script/82592/1 "2023-12-01T15:33:48Z")

</div>

Is there a way with the system.device.addDevice to chose which gateway a device is added to? We just moved to a scaled out arch and wanted to ease the adding of tags and devices.Thx, Jake

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [December 1, 2023, 3:36pm UTC](https://forum.inductiveautomation.com/t/can-i-set-which-provider-to-add-a-device-to-on-another-gateway-in-script/82592/2 "2023-12-01T15:36:56Z")

</div>

You will need to use the gateway messaging system for this to call the system.device.addDevice on the remote gateway. You may want to consolidate a couple of your most used messages into a single project that is common across the gateways to keep confusion down etc...

---

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [December 1, 2023, 3:38pm UTC](https://forum.inductiveautomation.com/t/can-i-set-which-provider-to-add-a-device-to-on-another-gateway-in-script/82592/3 "2023-12-01T15:38:43Z")

</div>

Sounds good, I'll mess with this as time permits. You rock.Thx jake
