logo elektroda
logo elektroda
X
logo elektroda

Xiaomei Fish Feeder WIFI002_V20 Belon BL2028N OpenBK7231N Flash Issue

Nordlicht77 2502 35
ADVERTISEMENT
  • #31 21115935
    p.kaczmarek2
    Moderator Smart Home
    You need to open it via OBK panel:
    BK7231T control panel with configuration options and buttons to launch a web application.
    Then it will work:
    Screenshot of an IoT device configuration page.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #33 21224541
    tahunasky
    Level 2  
    Hi,

    I managed to flash with OpenBK7231M_QIO_1.17.678.bin
    I can connect to the fishfeeder and modify settings etc.

    As with @Nordlicht77 I tried to extract config from tuya binary using bk7231flasher_1.3.3, but I get the error:

    Failed to extract Tuya keys - magic constant header not found in binary


    I have attached the tuya config bin .

    I have since tried to set it up manually.

    Here is the template I copied from @Nordlicht77 here and tried using, but it didn't work for me:
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Full Device Name Here",
      "model": "enter short model name here",
      "chip": "BK7231N",
      "board": "TODO",
      "flags": "-2147483648",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "0": "LED;5",
        "1": "WifiLED;4",
        "4": "WifiLED_n;0",
        "7": "dInput;1",
        "9": "dInput;3",
        "15": "Rel;2",
        "22": "dInput_n;7",
        "23": "LED;6"
      },
      "command": "backlog",
      "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }
    


    And the autoexec.bat .
    setChannelLabel 1 "Endstop"
    setChannelType 1  Toggle
    setChannelLabel 2 "Motor"
    setChannelType 2  Toggle
    setChannelLabel 3 "Button"
    setChannelType 3  Toggle
    setChannelLabel 5 "LED Red"
    setChannelType 5  Toggle
    setChannelLabel 6 "IRRecv"
    setChannelType 6  Toggle
    
    alias buttonevent backlog setChannel 2 1;addRepeatingEvent 10 3 setChannel 3 0
    addChangeHandler Channel1 == 1 backlog setChannel 2 0
    addChangeHandler Channel3 == 1  buttonevent 
    
    setChannelLabel 4 "Wifi Status"
    setChannelType 4  Toggle
    addChangeHandler WiFiState == 4 setChannel 4 1 "Online"
    addChangeHandler WiFiState != 4 setChannel 4 0
    
    alias mode_wifi_on backlog setChannelLabel 4 "Wifi On"
    alias mode_off        backlog setChannelLabel 4 "Wifi Off"
    addChangeHandler WiFiState == 4 mode_wifi_on
    addChangeHandler WiFiState != 4 mode_off
    
    setChannelType 7  Toggle
    alias futterstandleer backlog setChannelLabel 7 "Futter leer";setChannel 5 1;
    addChangeHandler Channel7 == 0  futterstandleer
    alias futterstandok backlog setChannelLabel 7 "Futter ok";setChannel 5 0;
    addChangeHandler Channel7 == 1  futterstandok



    I can toggle the relay on, however it doesn't auto toggle off, when the feed tray has done a complete cycle, so it just keeps on opening and shutting the feed tray endlessly.

    MQTT is working as it should, here is message when I toggle on and off tray:

    root@pi5:~# mosquitto_sub -t 'fishfeeder1/#' -F '@H:@M:@S  %t - %p'
    12:21:29  fishfeeder1/connected - online
    12:21:34  fishfeeder1/2/get - 1
    12:21:47  fishfeeder1/2/get - 0


    I can open and close tray using mqtt:
    root@pi5:~# mosquitto_pub -t 'fishfeeder1/2/set' -m '1'
    root@pi5:~# mosquitto_pub -t 'fishfeeder1/2/set' -m '0'


    Interior view of a fish feeder with electronic components, highlighted switch, and infrared sensor.
    Highlighted in green in the above you can see the switch for feeder tray and infrared sensor for feed level.

    These are the inputs I have figured out from GPIO FINDER in webapp, which match what was in previous posts by @Nordlicht77.
    P0 LED RED (i guess wifi indicator)
    P1 LED BLUE
    P4 Wifi Status ?
    P7 Switch for open/close indicator of feed tray. High is open. Low is shut.
    P9 Rear top button to activate feed tray manually
    P15 activate motor for feed tray.
    P22 Feed bin IR sensor
    P23 IR Sensor enable

    How do I configure them in openbk so that the feed tray stops when P7 switch is activated ?.

    Thanks
  • ADVERTISEMENT
  • #34 21225681
    tahunasky
    Level 2  
    I have managed to get it working mostly. The issue I was having is that the autoexec.bat wasn't being saved between boots. However, after disconnecting / reconnecting to power a few times, then leaving off overnight it seems to be saving the autoexec.bat now.

    The other issue is that the P0 and P1 settings are different from what @Nordlicht77 has. Initially, he had pins "0": "LED;63", and "1": "WIFLED;62", then changed them to pins "0": "LED;5", and "1": "WIFILED;4",
    When I set to pins "0": "LED;5", and "1": "WIFILED;4", the LED has a pink colour as both blue and red LEDs are on.

    In GPIO FINDER:
    When I click on SET OUTPUT HIGH to turn P0 / P1 off it sets it to pins "0": "LED;63", "1": "WIFILED;63", and the LEDs are turned off.
    Screenshot of GPIO Doctor Pins tool showing settings buttons and output status.
    When I click on SET OUTPUT HIGH again the pins are set to "0": "rel;63", "1": "rel;62", and the LEDs stay turned off.
    Screenshot of GPIO Doctor interface with pin settings.
    When I click on SET OUTPUT HIGH for pin 1 it stays "1": "rel;62", and the blue LED is turned on.
    Screenshot of the GPIO Doctor interface showing settings for pins P0 and P1.

    Should I leave as "0": "LED;63", "1": "WIFILED;63", ?
    I am guessing it sets to "0": "rel;63", "1": "rel;62", as that is the default label?

    @Nordlicht77 why did you change the pins to "0": "LED;5", and "1": "WIFILED;4", ?

    Below is my autoexec.bat which mostly works. But I can not work out how to set the setChannelLabel 3 "Button" to red on startup, remove the word toggle from setChannelLabel 40 "Food Sensor" 1 - bHideTogglePrefix of 1 doesn't seem to work, and hide both setChannelLabel 63 "LED Red" 1 and setChannelLabel 62 "LED Blue" 1 from UI - setChannelVisible 63 0 doesn't seem to work.. or have I stuffed it up ?

    I would only like to see Button, Food and Food Sensor on UI.

    // Feed tray position switch
    setChannelLabel 1 "Endstop"
    setChannelType 1  Toggle
    setChannelVisible 1 0
    
    // Feed tray motor enable
    setChannelLabel 2 "Motor"
    setChannelType 2  Toggle
    setChannelVisible 2 0
    
    // Rear manual feed button
    setChannelLabel 3 "Button"
    setChannelType 3  Toggle
    
    // Feed level IR sensor enable
    setChannelLabel 40 "Food Sensor" 1
    setChannelType 40  Toggle
    
    // Red LED
    setChannelLabel 63 "LED Red" 1
    setChannelType 63  Toggle
    setChannelVisible 63 0
    
    // Blue LED
    setChannelLabel 62 "LED Blue" 1
    setChannelType 62 Toggle
    setChannelVisible 62 0
    
    
    alias buttonevent backlog setChannel 2 1;addRepeatingEvent 10 3 setChannel 3 0
    addChangeHandler Channel1 == 1 backlog setChannel 2 0
    addChangeHandler Channel3 == 1  buttonevent 
    
    setChannelLabel 4 "Wifi Status"
    setChannelType 4  Toggle
    setChannelVisible 4 0
    addChangeHandler WiFiState == 4 setChannel 4 1 "Online";setChannel 62 1;
    addChangeHandler WiFiState != 4 setChannel 4 0;setChannel 62 1;
    setChannelVisible 4 0
    
    setChannelLabel 7 "Food"
    setChannelType 7  Toggle
    alias food_out backlog setChannelLabel 7 "Food out";setChannel 63 1;
    addChangeHandler Channel7 == 0  food_out
    alias food_ok backlog setChannelLabel 7 "Food ok";setChannel 63 0;
    addChangeHandler Channel7 == 1  food_ok


    Screenshot of the OpenBK7231N system interface displaying various settings and system information.

    Thanks
  • ADVERTISEMENT
  • #35 21337194
    zhuangruke
    Level 1  
    >>21097045 Hello, have you tried flashing ESPHome firmware? Does it work?

    Thank you.
  • #36 21451117
    divadiow
    Level 34  
    just adding that the firmware from this device boots on XH-CB2S module where efuse key is 00000000 00000000 00000000 00000000

    I was not able to get the backup you posted earlier into pairing mode though, however many times I grounded P9. I notice there are two other dumps in that Discord thread and one of them starts in pairing mode.

    TX2 is silent. TX1:
    Code: Text
    Log in, to see the code


    and paired by the XiaoMei Smart app
    List of smart devices in the app, including the fish feeder WP8621N. Device addition screen with illustration of router and cloud Smartphone app screen showing room selection option. App screen with an intelligent fish feeder Smart fish feeder app settings interface Smart fish feeder app displaying information on last feeding and water cleanliness. Screenshot showing location management with information about room, MAC address, and device firmware version.

    XiaoMei_WP8621N_Fish_Feeder_WIFI002_V20_WP8621NK_03.bin
    https://github.com/openshwprojects/FlashDumps/tree/main/IoT/BL2028N

Topic summary

The discussion centers on flashing and configuring the Xiaomei Fish Feeder device, which uses the BK7231N/BK7231M chip and Belon BL2028N board, with OpenBK7231N firmware. The main challenge is successfully flashing the device with OpenBK7231N_App firmware and achieving WiFi connectivity and device visibility on networks like Fritzbox. Initial attempts using standard OpenBK7231N_QIO binaries report successful flashing but no network presence. The device uses an unusual bootloader (version 1.0.13) and partition layout, requiring a specific kickstart bootloader (bk7231n-kickstart-ota-1.0.13-0x143000-no-encr.bin) to enable OpenBeken firmware compatibility. Tools like ltchiptool and bk7231flasher are used for flashing and backup, with some issues encountered in board recognition and key extraction from Tuya binaries due to missing magic headers. Successful flashing involves merging original bootloader with OpenBK firmware and using correct start addresses (0x0). Configuration challenges include correct pin assignments for LEDs, buttons, IR LEDs, and motor controls, with detailed YAML configurations discussed. Users report issues with LED control persistence after reboot and IR LED activation. MAC address conflicts on multiple devices are addressed by changing MAC in OBK config or flasher tools. The OpenBK7231T_App web interface requires access via the OBK panel to function properly. Some users achieve partial success with ESPHome firmware as an alternative. The community shares firmware builds, bootloader files, and configuration templates, emphasizing the need for correct bootloader versions, key handling (including zeroed keys), and pin role assignments to achieve full device functionality including WiFi connectivity, OTA updates, and peripheral control.
Summary generated by the language model.
ADVERTISEMENT