🖥️ Local Server API Setup with SoifGo

💡 Can't connect? Most issues are caused by the Windows Firewall. Jump to the Troubleshooting section.

1 Download and Start the Server

📦 Prerequisite: Install Node.js

⚠️ Important: Before starting, make sure Node.js is installed. Without Node.js, the server cannot run.

You can install it using the file provided in your folder:

📦 Download Node.js v22.17.1 (MEGA)

Or download the latest version from the official website:

🌐 Node.js Official Download

✅ Already included — no setup needed:
  • All required npm packages have already been installed.
  • You do not need to run npm install again.
  • Everything needed to run the server is inside the folder:
    • server.js
    • node_modules/ (all dependencies)
    • Start server.bat (for easy launch)
  • Simply extract the ZIP file and double-click on Start server.bat.
  • The server will start immediately without any extra setup.

Download the following ZIP file and extract it:

📦 Download Local_Server.zip (MEGA)

After extraction, click on Start server.bat to launch the Local Server on your computer.

If successful, you will see a message like this:

{"level":30,"time":1761753122527,"pid":9856,"hostname":"ssm","msg":"Server listening at http://192.168.224.1:3000"}
Server start screenshot showing Server listening message

2 Sending Data from SoifGo

Open SoifGo and create a button. Set its behavior to Send Server.

In play mode, clicking this button will send the value 1234 to the server.

You can verify the result by visiting the following address in your browser:

http://192.168.224.1:3000/mydata

You should see:

{"key3":"1234"}
✅ Upload successful.
Send Server screenshot showing data upload

3 Receiving Data in SoifGo

Create another button and set its behavior to Receive Server Text.

If your server response includes extra characters, you can use the Start Filter and End Filter fields to extract the desired part.

If no filtering is needed, leave those fields empty.

Receive Server screenshot

4 Using Effects with Received Values

If you want to trigger visual effects based on received values, set the button behavior to Receive Server Value and specify the Maximum Value.

Once configured, effects will appear in the menu.

To learn more about applying effects to buttons, visit the following link:

🎨 Effects Tutorial

5 Advanced Filtering

If extracting an API key does not work due to malformed data, simply leave the key field empty to receive the entire dataset. Then specify the word or phrase that comes before and after the desired value.

The system will filter the data between those markers and display the extracted result.

🧩 Bonus: Send & Receive via WebView (HTML)

Besides the classic method above, you can also send and receive data using an HTML page running inside SoifGo's WebView. This gives you full control over the layout, parsing, and behavior — perfect for dashboards and custom UIs.

💡 How it works: Inside the WebView, a JavaScript object called window.soifgo is automatically injected. You can call native functions directly from JavaScript:
// Send data (POST)
window.soifgo.CallSub('api_send', true, address, key, value);

// Receive data (GET) — response arrives in api_rx()
window.soifgo.CallSub('api_recive', true, address, key);

function api_rx(value) {
    // handle the value here
}
window.api_rx = api_rx;

The WebView method also lets you combine API + Bluetooth + MQTT + Sensors + Storage on a single page. For complete documentation, examples, and ready-to-use code, see the full HTML guide:

📘 Open the Full HTML Guide
✅ Tip: You can copy the entire HTML guide page and paste it into an AI assistant (like DeepSeek) and simply describe what you want — the AI will build the HTML page for you.

6 Troubleshooting Connection Issues

❌ "ERR_CONNECTION_TIMED_OUT" or nothing happens

If the browser on your PC opens the server address fine, but SoifGo on your phone cannot connect, the most common cause is the Windows Firewall blocking the port.

⚠️ Symptoms:
  • Server is running and shows Server listening at http://192.168.x.x:3000
  • Browser on the same PC opens the URL without problems
  • But SoifGo on the phone shows ERR_CONNECTION_TIMED_OUT or nothing happens

🛠️ Fix on Windows

  1. Open Command Prompt as Administrator
    (Right-click → Run as administrator)
  2. Run this command (replace 3000 with your server port if different):
netsh advfirewall firewall add rule name="Local Server 3000" dir=in action=allow protocol=TCP localport=3000
  1. You should see Ok.
  2. Restart your server (close and run Start server.bat again)
  3. Test again from SoifGo

🔍 Additional checks

💡 Why does this happen?

Windows Firewall blocks incoming connections on non-standard ports by default. Even though localhost works on your PC, other devices on your local network (like your phone) are blocked until you allow the port.

📌 IP address changed?

Your PC's IP address may change after a router restart. If the server URL worked before but now doesn't, check the current IP:

ipconfig

Look for IPv4 Address and update the address in SoifGo if needed. For a permanent solution, set a Static IP for your PC in the router settings or in Windows network settings.

📊 Quick Reference

Problem Cause Fix
Connection Timeout Firewall blocks port netsh command
Data not found Key not saved yet Send data first
Works on PC, not on phone Firewall or AP Isolation Open port, disable isolation
Worked before, now doesn't PC IP changed Check ipconfig

Important Note

This example is configured using a local Node.js server in public and free mode. For better security, it is recommended that you create your own private path with a username and password, and then apply those credentials in Soifgo as well.


⬅ Back to Home