logo elektroda
logo elektroda
X
logo elektroda

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

p.kaczmarek2 198 0
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    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.
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    Multilingual manual:
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 Multilingual manual.
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    Screws and insulating collar included:
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    There is a seal between the two parts of the housing to protect against humidity.
    Markings, as in the title - OR-SH-17405:
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    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.
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    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.
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    The power section has a non-isolated KP15052SP inverter and a 3.3V LDO powering the WiFi module:
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    The WiFi module itself is a CB3S - or BK7231N. View from underneath:
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    In addition, there is a circuit on the board from energy measurement:

    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    Now you can change the firmware. .
    A USB to UART converter is useful:
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    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:
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    We program according to the flasher instructions:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    Read the batch first - the flasher will recognise the GPIO configuration this way:
    External WiFi controlled socket for Home Assistant - OR-SH-17405 IP55 .
    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? .

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 11793 posts with rating 9911, helped 563 times. Been with us since 2014 year.
  • ADVERTISEMENT
ADVERTISEMENT