Qiachip Smart Switch - BK7231N / CB2S - interior, programming

p.kaczmarek2 19236 215
This content has been translated flag-pl » flag-en View the original version here.
  • p.kaczmarek2
    Level 28  
    Yes it is planned, what exactly format of data do you need, the JSON? Which fields of JSON are you actively using? If just a few, I can add it for you relatively quick, but I need a detailed specs of what you need.
  • ionoleinic
    Level 5  
    For a simple switch i need only: topic = stat/[mqtt_device]/power payload = ON/OFF (not JSON)
    stat/gosund_sp111_1/POWER = ON
    get data for a smart plug with sensor : topic= stat/[mqtt_device]/STATUS8 (STATUS8 is from tasmota but you can put anything you want) and payload JSON format like this:
    stat/gosund_sp111_1/STATUS8 = {"StatusSNS":{"Time":"2022-11-23T21:12:28","ENERGY":{"TotalStartTime":"2022-10-13T16:13:07","Total":4.865,"Yesterday":0.076,"Today":0.077,"Power": 0,"ApparentPower":15,"ReactivePower":15,"Factor":0.01,"Voltage":231,"Current":0.065}}}

    Send req for sensor data of smart plug: topic=cmnd/[mqtt_device]/STATUS payload=8

    And, if you can, i need also connection data like MAC, IP, gateway, etc topic= stat/gosund_sp111_1/STATUS5 payload = JSON
    stat/gosund_sp111_1/STATUS5 = {"StatusNET":{"Hostname":"gosund-sp111","IPAddress":"","Gateway":"","Subnetmask":"","DNSServer1":"","DNSServer2":"","Mac":"C4:4F:33:F7:C4:C7","Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}}
    Send req for conncection data of smart plug: topic=cmnd/[mqtt_device]/STATUS payload=5

    Thank very much!
  • Ipn00tic
    Level 2  
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming Good afternoon friends

    I'm starting now in the world of the smart home, it's the first time I use these devices and I don't understand much about linux but I learn quickly and I have skills to use a soldering iron.

    I bought the first GIRIER branded 16A smart plug device that came with CB2S chip but I just want devices disconnected from the cloud.

    I read several of your topics and managed to write your firmware in GIRIER which is not listed, I wanted to know where I can share photos of the connections I made successfully and help increase compatibility with your firmware and also get help
  • p.kaczmarek2
    Level 28  
    Thanks @Ipn00tic , would you be also able to provide information where the plug was bought and how it looks like from the outside?
    If you can, you can post a separate topic here, but include more info: https://www.elektroda.com/rtvforum/forum507.html
  • kajarit
    Level 6  
    kajarit wrote:
    But I couldn't find any info on these commands:
    - startDriver
    - linkTuyaMCUOutputToChannel
    - setChannelType

    Okay, I found info about the bottom two options, and tried several setting but no success, I always got 0 values (there should be a temperature value, a humidity and battery level also somewhere).

    backlog startDriver tuyaMCU; startDriver tmSensor; setChannelType 1 ReadOnly; linkTuyaMCUOutputToChannel 1 2 1; setChannelType 2 ReadOnly; linkTuyaMCUOutputToChannel 2 2 2; setChannelType 3 ReadOnly; linkTuyaMCUOutputToChannel 3 2 3; setChannelType 4 ReadOnly; linkTuyaMCUOutputToChannel 4 2 4; setChannelType 5 ReadOnly; linkTuyaMCUOutputToChannel 5 2 5;

    Could you advise how to proceed?
  • p.kaczmarek2
    Level 28  
    @kajarit can you please provide more information, at least tell me, do you see anything in OBK logs, is OBK receiving any TuyaMCU packets? Or maybe check with UART to USB converter, are any TuyaMCU packets at all sent to OBK?

    We recently also had a user on Github and everything worked for him, he just reported that tmSensor is missing a "closing" packet, but apart from that, all data is parsed correctly..