HomeHome AutomationSonoff SPM: 2560Amps!

Sonoff SPM: 2560Amps!

More amped than me

What do you do when you have a massive electrical installation to control, monitor and protect? It looks like ITEAD has got you covered. One of their latest devices: Sonoff SPM comes with support for 128 channels rated 20A each, for a total of 2560 Amps. That’s a lot of channels to control and a lot of amps to send through each relay. Is Sonoff SPM still made for home automation enthusiasts or made for industrial application? Let’s give it a go.

Sonoff SPM – relay array

Sonoff SPM system
Sonoff SPM system

To use the Sonoff SPM system, you need 2 devices. A Sonoff SPM control unit and at least one (up to a possible 32) SPM relay. They are connected with a 2 core wire. The one included in the package is short, but you can extend it for up to 100m. That leaves a lot of room for configuration.

It’s not the smallest relay array I had in my hands. If you think the latest Sonoff 4CH R3 & 4CHPRO R3 were big, you may not like the footprint Sonoff SPM takes. It’s DIN-rail mountable and aims to reside in an electrical cabinet. Despite a similar look, Sonoff SPM can’t be used instead of RCD fuses. It comes with OCP, OVP implemented software-wise – way too slow to provide relevant protection. Thanks to the high (20A) rating of each channel, it can be installed in line with your existing fusebox. If you are tempted to add this to your automation, refer the installation to a professional.

Each channel monitors power use and the data is sent to the eWeLink app, with a local backup stored on a micro SD card to access in DIY mode.

Sonoff SPM Control unit

It’s nice to see a mix of WiFi (2.4GHz) and Ethernet on Sonoff products again. While the Sonoff SPM control unit isn’t PoE compatible, you will be able to choose the connection type for your device. The paring process uses Bluetooth, which reveals the information about, hidden inside, microcontroller. It’s ESP32 driven.

The unit has to be powered by mains and comes with a 2 terminal socket to connect a slave relay unit. The only button on the device is used to trigger pairing with relay units and to put the Sonoff SPM into Sonoff DIY mode. Each added slave unit is listed as a subdevice. and will show up separately (and as a subdevice) in the eWeLink app.

An SD card slot can take SDHC cards up to 32GB and it is used to store the power use data.

Inside

Sonoff SPM is made out of 2 PCB connected together with a cable linking header of the main board with the extension board hosting buttons and terminals for RS485.

Bluetooth already indicated the presence of the ESP32 to handle most of the work. In Sonoff tradition, the dev pads are exposed and available for tinkering with the most important ones broken down as a header: GND, TX, RX, 3V3 and pad: GPIO00

A new is the inclusion of the RTC indicated by the presence of the CR1220 battery connected to GD32F103 IC.

Sonoff SPM relay

These are 4 channel relays rated for 20A each. As you probably guessed, the familiar form factor means that the unit is also DIN-rail compatible. Each channel is also equipped with an independent power meter to measure the current consumption.

Devices can be chained together using the RS485 protocol. The first unit connects to the Sonoff SPM control unit, and to the next slave unit in series. The last slave unit is defined by toggling the slave switch into the ON position to communicate the end of the chain. It’s interesting to see the adoption of the RS485 protocol which is present in industrial applications – an indication of what is the designated customer for this product.

One thing to bear in mind is the RS485 requirement. ITEAD recommends 2 core RVVSP cables of 0.2 mm max and the max length of not more than 100m. It’s probably not a limiting factor for homes but industrial setups can easily reach these distances.

Inside

Inside the box, you will see massive relays rated for 20A to assure operation with mains voltage. The relays feel solid and terminals are made to accommodate large gauge wires. In the same manner, as with Sonoff 4CH and 4CHPRO, the power usage data is available thanks to 4 current clamps soldered to the PCB.

The relay connects to the low voltage board via 8 pin headers. All buttons and IC responsible for RS485 is also located on that smaller PCB. There are a plethora of exposed pads on the PCB, but it’s unlikely that anyone will be poking around this part of the device to hack it.

In action

Sonoff SPM in action

Both SPM units have to be connected to mains in order to be detected. Please forgive my wiring schema in these pictures. My electrical box is sealed, so I was not able to fit the unit in place without calling out the electrician for a day. If you are planning on installing this at the house, consider the same. This unit is too important to mess it up.

I rigged the demo at home, which means I’m feeding mains from the same circuit to all 4 channels. In a proper installation, each relay would handle a separate circuit in your house – as my setup splits supplied circuit (16A) into 4 channels.

One of the things I noticed, is that while subdevice pairing is quick, it needs to be done again if you disconnect subdevices and power these off. The re-paired unit shows up as a new device completely wiping off custom names assigned to it.

SONOFF DIY is back

I thought it will never make the appearance again. I personally miss the Sonoff DIY control. It’s a great solution for anyone who wants local network integration without going nuclear with Tasmota. Sonoff SPM joins the small list of devices with a DIY control scheme ( BASICR3RFR3MINIR2 and D1).

To use DIY mode, the unit has to be set up in ethernet mode. Hold the pair button on the Sonoff SPM control unit for 5 seconds, navigate to the device’s IP and enter the WiFi credentials. Sonoff SPM will connect wirelessly (optional) and you will be able to issue commands via REST protocol.

Sonoff also made the provision for storing and accessing the history of power consumption. In the cloud mode, data is stored and displayed thanks to the eWeLink app, but if you switch to the DIY mode, the power consumption history can be accessed via HTTP calls as it’s stored on an SD card. It’s a nice touch, as it saves you from creating your own database solution to store and plot power measurements.

Just remember to query the device list first to obtain the deviceID for each Sonoff SPM relay unit connected to your control device. Everything else follows Sonoff DIY documentation.

Using DIY

Sonoff SPM relay
Sonoff SPM is pretty big

Before you get started, take a note of the deviceID as you will need this to control Sonoff SPM in the DIY mode. You can find it in the device settings in the eWeLink app.

To access and configure the DIY mode, pair it first with the eWeLink app, then connect the Sonoff SPM via Ethernet cable and hold the pairing button for 5 sec. Find the IP of the Sonoff using the Fing app or your router interface and configure the WiFi credentials by navigating to the configuration page (Sonoff SPM IP address). If you are not able to access the page, make sure you are paired with Sonoff first.

Node-RED

To control individual settings and obtain the data from relays, you will need a subdeviceID for each relay SPM you have in your network. You can do so by calling this flow:

Get subdeviceID flow
[{"id":"ec4e10ebfb1285ac","type":"inject","z":"44c00cfdc29f7b2f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"deviceid\":\"1001431eca\",\"data\":{}}","payloadType":"json","x":130,"y":140,"wires":[["308a300d41a69f6d"]]},{"id":"308a300d41a69f6d","type":"http request","z":"44c00cfdc29f7b2f","name":"","method":"POST","ret":"obj","paytoqs":"ignore","url":"http://10.0.0.233:8081/zeroconf/subDevList","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":370,"y":140,"wires":[["4a74b6970a35781f"]]},{"id":"4a74b6970a35781f","type":"debug","z":"44c00cfdc29f7b2f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":140,"wires":[]},{"id":"e742d63b09e5f64e","type":"comment","z":"44c00cfdc29f7b2f","name":"Get subdeviceID","info":"","x":240,"y":100,"wires":[]}]

Now that you have the subdeviceID you can send commands and receive data using the following REST structure:

http://[ip]:8081/zeroconf/switches  // control switches
http://[ip]:8081/zeroconf/iAmHere   // locate unit
http://[ip]:8081/zeroconf/time      //set time
http://[ip]:8081/zeroconf/historicalData  //get historical data (SD card required)
http://[ip]:8081/zeroconf/monitor   // use real time power monitor
http://[ip]:8081/zeroconf/wifi     // reconfigure WiFI
http://[ip]:8081/zeroconf/upgrade   //flash OTA firmware
http://[ip]:8081/zeroconf/record     // device operation record/stats
http://[ip]:8081/zeroconf/getState  // get device/subdevice state 
http://[ip]:8081/zeroconf/ops_mode   // revert back to cloud control

REST post request must be made with a JSON body specifying the deviceID and subdeviceID followed by the data parsed to the request. If you are new to JSON, I have a 5 min guide to the structure in this article. Here is a sample of the JSON request to turn on all the switches in a subdevice:

Inject Node JSON
{
    "deviceid": "1001431eca",
    "data": {
        "subDevId": "8b363237393734134b353637",
        "switches": [
            {
                "switch": "on",
                "outlet": 0
            },
            {
                "switch": "on",
                "outlet": 1
            },
            {
                "switch": "on",
                "outlet": 2
            },
            {
                "switch": "on",
                "outlet": 3
            }
        ]
    }
}

For detailed information and samples, please see the documentation. If you want to use the NodeRED flow from my example, feel free to try it out:

NodeRED example
[{"id":"44c00cfdc29f7b2f","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"ec4e10ebfb1285ac","type":"inject","z":"44c00cfdc29f7b2f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"deviceid\":\"1001431eca\",\"data\":{}}","payloadType":"json","x":130,"y":140,"wires":[["308a300d41a69f6d"]]},{"id":"308a300d41a69f6d","type":"http request","z":"44c00cfdc29f7b2f","name":"REST POST","method":"POST","ret":"obj","paytoqs":"ignore","url":"http://10.0.0.233:8081/zeroconf/subDevList","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":370,"y":140,"wires":[["4a74b6970a35781f"]]},{"id":"4a74b6970a35781f","type":"debug","z":"44c00cfdc29f7b2f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":140,"wires":[]},{"id":"b545d38155999f7c","type":"inject","z":"44c00cfdc29f7b2f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"deviceid\":\"1001431eca\",\"data\":{\"subDevId\":\"8b363237393734134b353637\",\"switches\":[{\"switch\":\"on\",\"outlet\":0},{\"switch\":\"on\",\"outlet\":1},{\"switch\":\"on\",\"outlet\":2},{\"switch\":\"on\",\"outlet\":3}]}}","payloadType":"json","x":130,"y":320,"wires":[["8fd9c98d2e1b082b"]]},{"id":"8fd9c98d2e1b082b","type":"http request","z":"44c00cfdc29f7b2f","name":"","method":"POST","ret":"obj","paytoqs":"ignore","url":"http://10.0.0.233:8081/zeroconf/switches","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":370,"y":320,"wires":[["b44177f336149cad"]]},{"id":"b44177f336149cad","type":"debug","z":"44c00cfdc29f7b2f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":320,"wires":[]},{"id":"e742d63b09e5f64e","type":"comment","z":"44c00cfdc29f7b2f","name":"Get subdeviceID","info":"","x":240,"y":100,"wires":[]}]

ON and OFF

Whether you are using eWeLink Cloud controls, LAN or DIY – the device is easy to operate and responsive. Relays make satisfying clicky noise when toggled and additional buttons on the relay unit allow for quick manual control and troubleshooting.

When connected to the cloud, individual channels will be available in Alexa and Google Home apps (support is coming soon), so take your time and name the channels appropriately if you are planning on using voice controls. It would be nice to have a selector which enables/disables individual channels from cloud control so they don’t clog up the list (just like SwitchBot does it). It’s not a big issue if you have 4 relays, but as the list can be 128 positions long, you probably don’t want all of them to show up in Alexa and Google Home by default.

Final thoughts

I don’t know where Sonoff SPM will end up. Even for my 3D printing “farm”, I’m working on as we speak, is way too much. The fact is, I like the scalability of the unit, the inclusion of DIY mode and the fact that the relay comes with a power meter. If you have plans, then ITEAD has the controller unit available for $29.99 and the relay units for $59.99. Let me know what would you use it for in your automation in this Reddit thread.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

0
To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

0
Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Nora – Google Assistant in NodeRED

0
Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

DIY Smart Washing Machine – for about 15 bucks!

0
Learn how to add washing machine notifications to your Google Home on the cheap

Sonoff Zigbee Bridge – review

0
Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

Smart Home

Remotes aren’t done with us yet: SwitchBot Remote

0
If you hate having 20 remotes hidden in your sofa, or your parents despise talking to Alexa to turn the lights on - SwitchBot Universal Remote is here to deal with all this!

We’ve seen this before: SwitchBot K10+ PRO

0
This is an odd one. Building on the success of SwitchBot K10+ they released SwitchBot K10+ PRO - but is the experience actually better?

Is this the smart panel we have waited for?

0
ITEAD has released a new smart panel: Sonoff NSPanel Pro 120 - have they learned the lesson from the terrible launch of the original Pro? Let's see what's new.

Aqara FP1E detects motionless humans

0
This isn't exactly a new device, it's an interaction of the original Aqara presence sensor. Aqara FP1E brings Matter, ZigBee and new triggers to your smart home

SwitchBot S10: cleaning re-imagined!

0
SwitchBot S10 promises unattended vacuuming and mopping so you can focus on things you love and care for. Does it deliver?