Software Setup

Complete guide for configuring Wala Works devices and integrating with automation platforms.

Initial WiFi Configuration

Step 1: Enter Setup Mode

When powered on for the first time, devices automatically enter setup mode:

  • LED Status: Blinking rapidly (2-3 times per second)
  • WiFi AP: Device creates network named MotorWala-XXXX or RelayWala-XXXX

If device doesn't enter setup mode:

  1. Press and hold reset button for 10 seconds
  2. LED will blink rapidly
  3. Release button

Step 2: Connect to Device

  1. Open WiFi settings on your phone/computer
  2. Look for network: MotorWala-XXXX or RelayWala-XXXX
  3. Connect (no password required)
  4. Wait for connection to establish

Step 3: Configure Network

  1. Browser should auto-open to http://192.168.4.1
  2. If not, manually navigate to http://192.168.4.1
  3. You'll see the WiFi configuration page

Configuration form:

┌──────────────────────────────────┐
│  Wala Works - WiFi Setup         │
├──────────────────────────────────┤
│                                  │
│  Select Network:                 │
│  ┌────────────────────────────┐  │
│  │ HomeNetwork      [*****]    │  │
│  │ Office-5G        [****]     │  │
│  │ Guest-WiFi       [***]      │  │
│  └────────────────────────────┘  │
│                                  │
│  Password: [________________]   │
│                                  │
│  Device Name: [MotorWala-01 ]   │
│                                  │
│  [ Connect ]                     │
└──────────────────────────────────┘

Step 4: Connect to Your Network

  1. Select your WiFi from the list
  2. Enter password carefully
  3. Set device name (optional but recommended)
  4. Click Connect

Device will:

  • Attempt connection (takes 10-30 seconds)
  • Show success/failure message
  • Reboot and join your network

Step 5: Find Device IP

After connecting, find the device on your network:

Option 1: Check Router

  • Log into router admin panel
  • Look at DHCP leases
  • Find device by name (e.g., "MotorWala-01")

Option 2: Network Scanner

# Using nmap
nmap -sn 192.168.1.0/24 | grep -i wala

# Using arp-scan
sudo arp-scan --localnet | grep -i wala

Option 3: mDNS

# Try hostname (if mDNS enabled)
ping motorwala-01.local
ping relaywala-01.local

Option 4: Serial Monitor

  • Connect via USB
  • Open serial monitor (115200 baud)
  • IP will be printed during boot

Device Configuration

Access Web Interface

Navigate to device IP in browser:

http://[DEVICE-IP]

You'll see the device control panel.

Configuration Menu

Click Settings or navigate to:

http://[DEVICE-IP]/settings

Basic Settings

# Device Information
Device Name: "Living Room Blinds"
Location: "Living Room"
Firmware: 1.2.0

# Network Settings
WiFi SSID: HomeNetwork
IP Address: 192.168.1.100 (DHCP)
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1

# API Settings
HTTP Port: 80
WebSocket: Enabled
API Auth: Disabled (change for security!)

MotorWala Specific Settings

# Motor Configuration
Motor Type: Tubular Motor
Voltage: 12V
Direction: Normal (or Reversed)
Speed: 50 (10-100)

# Position Tracking
Calibration Status: Not Calibrated
Full Travel Time: 0 seconds (calibrate to set)
Current Position: Unknown

# Limits
Upper Limit: 100%
Lower Limit: 0%

To calibrate position tracking:

  1. Click Calibrate button
  2. Motor will run full open
  3. Then full close
  4. Position tracking will be accurate

RelayWala Specific Settings

# Relay Configuration
Relay 1:
  Name: "Living Room Light"
  Mode: Normal
  Power-on State: Off
  Interlock: None

Relay 2:
  Name: "Kitchen Fan"
  Mode: Normal
  Power-on State: Last State
  Interlock: None

Relay 3:
  Name: "Garage Door Open"
  Mode: Momentary (1 second)
  Interlock: Relay 4

Relay 4:
  Name: "Garage Door Close"
  Mode: Momentary (1 second)
  Interlock: Relay 3

Interlock mode:

  • Prevents two relays from being ON simultaneously
  • Essential for reversible motors
  • Safety feature for mutually exclusive loads

Security Settings

Enable API Authentication:

Authentication:
  Enabled: Yes
  Token: [Generate New Token]

Generated Token:
  ww_1a2b3c4d5e6f7g8h9i0j

Using authenticated API:

curl -H "Authorization: Bearer ww_1a2b3c4d5e6f7g8h9i0j" \
  http://192.168.1.100/api/status

MQTT Configuration

Enable MQTT for integration with automation platforms:

MQTT Settings:
  Enabled: Yes
  Broker: 192.168.1.50
  Port: 1883
  Username: wala-devices
  Password: ****************
  Client ID: motorwala-01

Topics:
  Command: motorwala/living-room/set
  State: motorwala/living-room/state
  Position: motorwala/living-room/position

Connection:
  Status: Connected
  Last Message: 2 seconds ago

Setting up MQTT broker (Mosquitto):

# Install on Raspberry Pi or server
sudo apt-get update
sudo apt-get install mosquitto mosquitto-clients

# Create password file
sudo mosquitto_passwd -c /etc/mosquitto/passwd wala-devices

# Edit config
sudo nano /etc/mosquitto/mosquitto.conf

Add to config:

listener 1883
allow_anonymous false
password_file /etc/mosquitto/passwd

Restart broker:

sudo systemctl restart mosquitto

Integration with Home Assistant

Method 1: MQTT Auto-Discovery

Easiest method - devices automatically appear in Home Assistant.

Enable in device settings:

MQTT Discovery:
  Enabled: Yes
  Discovery Prefix: homeassistant

Devices will appear in:

  • Configuration → Devices & Services → MQTT
  • Automatically configured entities
  • Ready to use in automations

Method 2: Manual MQTT Configuration

Add to configuration.yaml:

MotorWala as Cover:

cover:
  - platform: mqtt
    name: "Living Room Blinds"
    command_topic: "motorwala/living-room/set"
    state_topic: "motorwala/living-room/state"
    position_topic: "motorwala/living-room/position"
    set_position_topic: "motorwala/living-room/set_position"
    position_open: 100
    position_closed: 0
    payload_open: "OPEN"
    payload_close: "CLOSE"
    payload_stop: "STOP"

RelayWala as Switches:

switch:
  - platform: mqtt
    name: "Living Room Light"
    command_topic: "relaywala/living-room/relay/1/set"
    state_topic: "relaywala/living-room/relay/1/state"
    payload_on: "ON"
    payload_off: "OFF"

  - platform: mqtt
    name: "Kitchen Fan"
    command_topic: "relaywala/living-room/relay/2/set"
    state_topic: "relaywala/living-room/relay/2/state"
    payload_on: "ON"
    payload_off: "OFF"

Restart Home Assistant:

# Via UI: Developer Tools → Restart
# Or via CLI:
hassio homeassistant restart

Method 3: REST Commands

For direct HTTP control without MQTT:

rest_command:
  open_living_room_blinds:
    url: "http://192.168.1.100/api/motor/open"
    method: POST

  close_living_room_blinds:
    url: "http://192.168.1.100/api/motor/close"
    method: POST

  set_blinds_position:
    url: "http://192.168.1.100/api/motor/position"
    method: POST
    content_type: "application/json"
    payload: '{"position": {{ position }}}'

Use in automations:

automation:
  - alias: "Close blinds at sunset"
    trigger:
      - platform: sun
        event: sunset
    action:
      - service: rest_command.close_living_room_blinds

Integration with Node-RED

Step 1: Install Node-RED

# On Raspberry Pi
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

# Start Node-RED
node-red-start

Access at: http://[PI-IP]:1880

Step 2: Install MQTT Nodes

In Node-RED:

  1. Menu → Manage Palette
  2. Install tab
  3. Search: node-red-contrib-mqtt-broker
  4. Click Install

Step 3: Configure MQTT Broker

  1. Drag mqtt in node to canvas
  2. Double-click to edit
  3. Add new mqtt-broker
  4. Configure:
    • Server: 192.168.1.50:1883
    • Username: wala-devices
    • Password: your-password

Step 4: Create Flow

Example: Button to Control Blinds

[Inject: Open] → [MQTT Out: motorwala/living-room/set]
[Inject: Close] → [MQTT Out: motorwala/living-room/set]
[MQTT In: motorwala/living-room/position] → [Debug]

Flow JSON:

[
  {
    "id": "open-button",
    "type": "inject",
    "name": "Open Blinds",
    "topic": "motorwala/living-room/set",
    "payload": "OPEN",
    "payloadType": "str"
  },
  {
    "id": "mqtt-out",
    "type": "mqtt out",
    "broker": "mqtt-broker",
    "topic": "motorwala/living-room/set"
  }
]

Step 5: Deploy

Click Deploy button to activate flow.

Integration with OpenHAB

Add MQTT Binding

  1. Settings → Bindings
  2. Search: MQTT
  3. Install MQTT Binding

Add MQTT Broker Thing

UID: mqtt:broker:mosquitto
Label: Mosquitto Broker
Type: MQTT Broker

Properties:
  Host: 192.168.1.50
  Port: 1883
  Username: wala-devices
  Password: your-password

Add MotorWala Thing

UID: mqtt:topic:motorwala-living
Label: Living Room Blinds
Type: Generic MQTT Thing
Bridge: mqtt:broker:mosquitto

Channels:
  - Position (Number)
    - State Topic: motorwala/living-room/position
    - Command Topic: motorwala/living-room/set_position

  - Control (String)
    - Command Topic: motorwala/living-room/set

Add Items

Rollershutter LivingRoomBlinds "Living Room Blinds" {channel="mqtt:topic:motorwala-living:position"}

Advanced Configuration

Static IP Address

Option 1: Router DHCP Reservation

  • Most reliable method
  • Configure in router settings
  • Bind MAC address to IP

Option 2: Device Static IP In device settings:

Network Mode: Static
IP Address: 192.168.1.100
Subnet: 255.255.255.0
Gateway: 192.168.1.1
DNS: 8.8.8.8

Custom MQTT Topics

Change default topic structure:

Device settings:

MQTT Topics:
  Base: custom/blinds
  Command: custom/blinds/cmd
  State: custom/blinds/status
  Position: custom/blinds/pos

Firmware Updates

Check for updates:

  1. Settings → System → Firmware
  2. Current: 1.2.0
  3. Click "Check for Updates"

Update methods:

OTA (Over-The-Air):

# Device will download and install automatically
# Or manually:
curl -X POST http://192.168.1.100/api/system/update

Manual Upload:

  1. Download firmware from GitHub releases
  2. Settings → Firmware → Upload
  3. Select .bin file
  4. Click Update

USB/Serial (Advanced):

esptool.py --port /dev/ttyUSB0 write_flash 0x10000 firmware.bin

Backup Configuration

Export settings:

# Download configuration
curl http://192.168.1.100/api/config/export > config-backup.json

# Restore configuration
curl -X POST http://192.168.1.100/api/config/import \
  -H "Content-Type: application/json" \
  -d @config-backup.json

Factory Reset

Soft reset (via web):

  1. Settings → System → Factory Reset
  2. Confirm action
  3. Device reboots to defaults

Hard reset (via button):

  1. Press and hold reset button for 30 seconds
  2. LED will blink rapidly, then steady
  3. Release button
  4. Device resets to factory defaults

Troubleshooting

Can't connect to WiFi setup page:

  • Verify connected to device AP
  • Try different browser
  • Clear browser cache
  • Disable mobile data (on phone)
  • Try http://192.168.4.1 directly

Device won't connect to WiFi:

  • Verify WiFi password is correct
  • Ensure 2.4GHz network (5GHz not supported)
  • Check signal strength (move closer to router)
  • Disable MAC filtering temporarily
  • Check router logs for connection attempts

MQTT not connecting:

  • Verify broker IP and port
  • Test with mosquitto_sub/pub
  • Check username/password
  • Review broker logs: sudo tail -f /var/log/mosquitto/mosquitto.log
  • Ensure firewall allows port 1883

Home Assistant not discovering devices:

  • Verify MQTT integration is configured
  • Check discovery prefix matches (default: homeassistant)
  • Restart Home Assistant
  • Check MQTT broker logs for discovery messages

Device not responding:

  • Check power supply
  • Verify network connection (ping device)
  • Check device logs (Settings → System → Logs)
  • Try rebooting device

Next Steps


Configuration issues? Check FAQ or contact support

Previous

Next