logo elektroda
logo elektroda
X
logo elektroda

External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55

p.kaczmarek2  Cool? (+4)
📢 Listen (AI):
Interior of the OR-SH-17405 WiFi smart socket showing the CB3S (BK7231N) module and energy measurement components. .
Here is a short presentation of the interior and the procedure for changing the firmware of an external WiFi-controlled socket, model OR-SH-17405. The product shown here additionally offers voltage, current and power measurement and normally works with Tuya, but after uploading the new software it will be possible to run it 100% locally and connect it to Home Assistant. The whole thing can be bought for around £80, although you could probably get it cheaper imported from overseas.
We get a box like this. The markings alone (WiFi + BT and Tuya) suggest the presence of the BK7231.
Inside view of the OR-SH-17405 WiFi socket showing the CB3S (BK7231N) module, measurement ICs, and power converter. Close-up view of the OR-SH-17405 device’s circuit board with the CB3S (BK7231N) module and other electronic components visible. Electronic board with WiFi module CB3S (BK7231N) and measurement circuits inside OR-SH-17405 socket. .
Multilingual manual:
Close-up of the OR-SH-17405 socket PCB with visible CB3S WiFi module and energy measurement circuit. Multilingual manual.
CB3S electronic module with metering circuit on a PCB, used in the OR-SH-17405 WiFi socket. WiFi-controlled socket OR-SH-17405 with CB3S module, opened to show internal electronics. Close-up view of the interior of the OR-SH-17405 WiFi outdoor socket, showing the CB3S module and measurement components on the PCB. .
Screws and insulating collar included:
Close-up of the PCB with a CB3S (BK7231N) module and energy measuring components inside the OR-SH-17405 socket. Printed circuit board of the OR-SH-17405 socket with WiFi CB3S module and energy measurement system. .
There is a seal between the two parts of the housing to protect against humidity.
Markings, as in the title - OR-SH-17405:
View of the inside of the WiFi socket OR-SH-17405 with visible CB3S (BK7231N) module and power section. WiFi module CB3S (BK7231N) mounted on the PCB inside the OR-SH-17405 smart socket. A PCB with a CB3S WiFi module (BK7231N) removed from the OR-SH-17405 outlet housing. .
On the casing of the product there is a button with which the relay can also be switched in an emergency, even without access to WiFi.
Let's take a look inside.
Close-up of CB3S (BK7231N) WiFi module installed on the PCB inside the OR-SH-17405 socket. Interior of the OR-SH-17405 outdoor WiFi socket showing the CB3S (BK7231N) module, electronics, and power measurement components. Interior of the OR-SH-17405 outdoor WiFi socket showing the CB3S WiFi module and power converter. .
You can already see at this stage that the whole thing is based on the WiFi+BT CB3S module (BK7231N). I will soon show how to upload new software to it.
The interior of a CB3S (BK7231N) WiFi+BT module installed in the OR-SH-17405 smart outdoor socket. Close-up of the OR-SH-17405 socket’s PCB showing connected wires and electronic components, including a FANHAR relay. .
The power section has a non-isolated KP15052SP inverter and a 3.3V LDO powering the WiFi module:
Two application diagrams for the KP1505X converter, showing pin designations and components. .
The WiFi module itself is a CB3S - or BK7231N. View from underneath:
Technical drawing of the CB3S module bottom view with pin labels and dimensions. .
In addition, there is a circuit on the board from energy measurement:

Close-up of a PCB with electronic components and a BL0937 integrated circuit. .
Now you can change the firmware. .
A USB to UART converter is useful:
View of a disassembled WiFi outdoor socket OR-SH-17405 with exposed electronics and wires. .
The WiFi module requires a 3.3V supply, but there is already a 3.3V LDO on the board, so you can feed 5V into its input to get 3.3V. For this you need RX and TX:
CB3S (BK7231N) WiFi module on a PCB with soldered wires for UART programming. CB3S (BK7231N) module with programming wires attached on the circuit board of a WiFi socket. .
We program according to the flasher instructions:
https://github.com/openshwprojects/BK7231GUIFlashTool
WiFi socket OR-SH-17405 PCB connected to a USB-UART adapter and power wires. .
Read the batch first - the flasher will recognise the GPIO configuration this way:
Screenshot of the Tuya configuration tool displaying exported GPIO configuration in JSON format with a textual description. .
Tuya JSON detected:
Code: JSON
Log in, to see the code
.
Verbal description:

Device seems to be using CB3S module, which is BK7231N chip.
- Relay (channel 1) on P8
- WiFi LED on P9
- Button (channel 1) on P7
- BL0937 ELE on P6
- BL0937 VI on P24
- BL0937 SEL on P26

OBK template:
Code: JSON
Log in, to see the code

Instructions for importing the template:



HA Discovery Instructions:



Other related material on YT Elektroda.com:
https://www.youtube.com/@elektrodacom
Project repository:
https://github.com/openshwprojects/OpenBK7231T_App

For this device, calibration still needs to be done. We connect a 60W bulb, measure exactly what the power consumption is, what voltage, current and enter them with the commands VoltageSet, CurrentSet, PowerSet.


In summary , this was another low cost device offering a simple firmware change. It can be easily disconnected from Tuya and run 100% locally, with Home Assistant, in a fully customisable way.
Some time ago I showed a similar hardware based on ESP8266:
External ATLO-S1IP5-TUYA socket on ESP8266 - interior, firmware change .
Only that it was without energy measurement. Apart from that the construction is quite similar, you can compare on your own.
Do you use this type of external, remote-controlled socket, and if so, how long have such sockets served you faultlessly? .

About Author
p.kaczmarek2
p.kaczmarek2 wrote 12307 posts with rating 10195 , helped 582 times. Been with us since 2014 year.

Comments

%}