cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Use the Edge MicroServer (EMS) to Connect to ThingWorx Part 3

No ratings

 

 

Step 5: Verify Connectivity 

 

The EMS is now attempting to talk to the ThingWorx platform.

 

However, ThingWorx does not have detailed information about the Edge device that is attempting to connect to it, so it will show up in the Unbound category.

 

  1. Open ThingWorx Composer.
     

    02-wems-browse.png

     

  2. On the left, click Monitoring.
     

    03-wems-monitoring.png

     

  3. Click STATUS > Remote Things.
     

    04-wems-remote-things.png

     

  4. Click Unbound.
     

    05-wems-unbound.png

     

  5. Confirm that you see the EdgeThing listed in the Unbound section.

    NOTE: The name EdgeThing comes from the config.lua script. EdgeThing is simply the name that is in that script, hence the name that you see in ThingWorx. To change the name of the device, you could stop both wsems.exe and luaScriptResource.exe, edit config.lua to use a different Thing name other than EdgeThing, and then restart both of the WSEMS programs. At that point, the Thing showing up in Remote Things -> Unbound would be whatever name you changed to in config.lua.

 

Create a Remote Thing

 

Now that the EMS is communicating with Foundation, let's create a Remote Thing to which Foundation can tie said connection.

 

  1. In ThingWorx Composer, click Browse > MODELING > Things, + New.
     

    06-wems-things.png

     

  2. In the Name field, enter EdgeThing.

    • Note that the name must match the spelling and capitalization of the Thing's name that you entered in the EMS's config.lua for it to auto-connect. 

  3. If Project is not already set, search for and select PTCDefaultProject.

  4. In the Base Thing Template field, search for and select RemoteThingWithTunnelsAndFileTransfer.

    01-uems-new-thing.png

     

  5. At the top, Click Save.

    • Note the status-indication pop-up indicating that EdgeThing is now connected.
     

    11-wems-thing-saved.png



Use Services to Explore EMS Files

 

Now that your Remote Thing is Saved and Connected, we can use some of the built-in Services to explore the EMS folders and files which we previously created for testing purposes.

 

  1. At the top of EdgeThing, click Services.

    12-wems-services.png

     

  2. Under the Execute column, click the Play Symbol for BrowseDirectory.

    33-mlp-browse-directory.png

     

  3. In the top-left path field, type / and click the bottom-right Execute button.

    • Note the other and tw folders which we previously created for testing.

      34-malp-slash-execute.png

       

     
  4. In the top-left path field, type /tw and click the bottom-right Execute button.

    • Note the tw_test_01.txt file which we previously created for testing.
     

    35-mlp-slash-tw-execute.png

     

As the tw_test_01.txt file (and its parent folder) were items which we custom-created for this guide, you should now be 100% convinced that connectivity between Foundation and the EMS is dynamically working.

 

If so desired, you could explore into other folders (or even add additional files to these folders), run the BrowseDirectory Service again, and confirm that Foundation is now aware of the EMS and actively communicating.

 

 

Step 6: Next Steps

 

Congratulation! You've completed the Install the Edge MicroServer (EMS) guide.

 

In this guide, you learned how to:

 

  • Install the EMS
  • Configure the EMS
  • Connect the EMS to ThingWorx Foundation

 

The next guide in the Medical Device Service learning path is Setup a Raspberry Pi as an IoT Device

 

The next guide in the Vehicle Predictive Pre-Failure Detection with ThingWorx Platform

learning path is Use the EMS to Create an Engine Simulator.

 

Learn More

 

We recommend the following resources to continue your learning experience:

 

CapabilityGuide
ConnectConnect Industrial Devices and Systems

 

Additional Resources

 

If you have questions, issues, or need additional information, refer to the:

 

ResourceLink
CommunityDeveloper Community Forum
Version history
Last update:
‎Mar 07, 2023 02:29 PM
Updated by:
Labels (1)
Contributors