MenuToggle Menu

Custom Plugins

Available in the Enterprise plan only.

ProtoPie Connect has the following in-built plugins: API, IFTTT, Logitech G29 steering wheel, Arduino, Gamepad, and blokdots. On top of this, users subscribed to the Enterprise plan can upload their own Custom Plugins and thus connect their prototypes with any hardware, APIs, or apps supporting Socket.IO through ProtoPie Connect.

Creating Custom Plugins

Custom integrations in ProtoPie Connect can be achieved using Custom Plugins and Bridge Apps. However, we suggest using Custom Plugins instead of Bridge Apps. As Custom Plugin files are portable, they are easier to work with and share among team members.

Here’s how you create a Custom Plugin:

  1. Write your code or reuse an existing Bridge App.
  2. Compile your Bridge App into a single executable binary using pkg
    Index.js files can be compiled for multiple targets (more details here).
  • pkg -t node16-macos-arm64 index.js for Mac ARM
  • pkg -t node16-macos-x64 index.js for Mac Intel
  • pkg -t node16-win-x64 index.js for Windows

3. Copy the executable file to an empty directory and name it plugin. Create a metadata.json file and add the plugin’s name { "name": "name of the plugin" }.

4. Compress the file (.zip). Your Custom Plugin is now ready to be used!

[object Object]

5. Import the Custom Plugin into ProtoPie Connect and run it in the terminal.

[object Object]

You can find some Custom Plugins examples here.

What is a Bridge App?

Bridge Apps enable communication between any hardware, APIs, or app supporting Socket.IO and ProtoPie Connect. Bridge Apps can catch events, receive data from a server, and even work as a single application.

For your convenience, you can use and customize these Bridge Apps available on GitHub.

Connecting Hardware via Bridge App

The main role of a Bridge App is to convert signals from the hardware into Socket.IO messages - a language ProtoPie can understand - and/or vice versa.

  1. Connect the Bridge App to ProtoPie Connect.
  2. The bridge app converts hardware signals into Socket.IO messages for ProtoPie to interpret. Usually, messages will have the following format:
    {messageId: "HwEventName", value: "ValueAssociatedWithEvent"}
  3. Prototypes receiving these messages through ProtoPie Connect will respond accordingly. Some hardware supports bidirectional communication, meaning prototypes can send messages to the hardware. This is only possible if the Bridge App can convert Socket.IO messages into signals that the hardware can interpret.

Connecting to APIs via Bridge Apps

When connecting to APIs via Bridge Apps, the Bridge App converts API responses (e.g., JSON) into individual Socket.IO messages.

For example, if a prototype needs to retrieve weather data dynamically from an API, the Bridge App would do the following:

  1. Convert the JSON response into Socket.IO messages.
    ◦ E.g., {"weather": "sunny", "temperature-celsius": 30.5}
  2. Send Socket.IO messages to ProtoPie Connect that will, in return, relay them to the corresponding prototypes.
    {messageId: "weather", value: "sunny"},
    {messageId: "temperature", value: 30.5}

In the prototype, you need Receive triggers to receive the messages “weather” and “temperature.” Learn more about the Receive trigger.

Running the Bridge App on the Same Machine

By default, most of these Bridge Apps use the IP address http://localhost:9981 as they assume the Bridge App and ProtoPie Connect run on the same machine.

[object Object]

Running the Bridge App on a Different Machine

If the Bridge App and ProtoPie Connect run on different machines, you can change the IP address to match ProtoPie Connect’s server.

  • ProtoPie Connect Desktop: find the server address in the below left corner of the interface.
[object Object]
  • ProtoPie Connect Embedded: find the server address right after launching in the terminal.
[object Object]
Back To Top