logo elektroda
logo elektroda
X
logo elektroda

EAMPDW-TY63 Alternative Firmware: Access Measurement Data with OpenBeken via TuyaMCU

xury 13935 80
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #61 20975848
    njhuiz
    Level 5  

    The device with firmware version 2.0.3 (response to "uartSendHex 55 aa 00 01 00 00 00") seems to have pretty much the same dpIDs like the TOMPD-63 minus the Prepaid functions. Also the reset times can't be set (and there is only one). Other than that, we can use the autoexec.bat and the REST html of @angelofdeath

    There is just a minor problem with the current FW version 1.17.480. The bool to clear the Energy is on dpID 12, which does not show up with "tuyaMcu_sendQueryState". When I set dpID 12 in the autoexec.bat like in the TOMPD-63 example, the "/cm?cmnd=Dp" page delivers a malformed JSON:

    {"id":12,"type":2,"data":0}

    Which crashes the JavaScript code on the html page.

    My observation is also in other cases, that if a dpID is assigned in autoexec.bat, but does not show in QueryState, the JSON has an extra " at the end of the corresponding field, which obviously results in an invalid JSON expression. I had a short look at the sources, but did not find the corresponding code.
  • ADVERTISEMENT
  • #62 20975915
    p.kaczmarek2
    Moderator Smart Home
    Can you show exactly how the malformed JSON look like?
    Helpful post? Buy me a coffee.
  • #63 20976537
    njhuiz
    Level 5  
    Using the TOMPD-63 autoexec, I get the following response to /cm?cmnd=dp

    {"id":105,"type":2,"data":0"},{"id":104,"type":2,"data":0"},{"id":17,"type":2,"data":67174430},{"id":14,"type":2,"data":0"},{"id":13,"type":2,"data":0},{"id":18,"type":0,"data":"0101000C03010100040100800801000109000000"},{"id":9,"type":0,"data":"00"},{"id":15,"type":2,"data":2},{"id":6,"type":201,"data":"08F70004140000D0"},{"id":1,"type":2,"data":0},{"id":12,"type":1,"data":1},{"id":11,"type":1,"data":1},{"id":16,"type":1,"data":1},{"id":19,"type":3,"data":0"}]
    


    The result has extra " for almost all dpIDs, which are not listed in QueryState: 105, 104, 14, 19. But somehow with this autoexec.bat dpID 12 is the exception, it has no extra " and also does not appear in QueryState. Maybe I can solve the problem of accessing dpID 12 in another way. But in general, it would probably be best, if any request produces a valid JSON.

    EDIT: If I delete the definitions for dpID 104 and 105 from the autoexec.bat, I get the extra " in dpID12. Strange error.
    [{"id":17,"type":2,"data":67174430},{"id":14,"type":2,"data":0"},{"id":13,"type":2,"data":0},{"id":18,"type":0,"data":"0101000C03010100040100800801000109000000"},{"id":9,"type":0,"data":"00"},{"id":15,"type":2,"data":2},{"id":6,"type":201,"data":"08F700040D0000CE"},{"id":1,"type":2,"data":5},{"id":12,"type":1,"data":0"},{"id":11,"type":1,"data":1},{"id":16,"type":1,"data":1},{"id":19,"type":3,"data":0"}]
    


    The result of tuyaMcu_sendQueryState is given below.

    nfo:TuyaMCU:Received: 55 AA 03 07 00 08 01 02 00 04 00 00 00 02 1A 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 1 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 2
    Info:TuyaMCU:Received: 55 AA 03 07 00 0C 06 00 00 08 08 F5 00 04 11 00 00 CF 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 19
    Info:TuyaMCU:ParseState: id 6 type 0-raw len 8
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 09 05 00 01 00 1D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 9 type 5-bitmap len 1
    Info:TuyaMCU:ParseState: byte 0
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 0B 01 00 01 01 1C 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 11 type 1-bool len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 0D 02 00 04 00 00 00 00 24 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 13 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 0
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 10 01 00 01 01 21 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 16 type 1-bool len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 00 26 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 15 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 0
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 11 00 00 04 04 01 00 1E 49 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 17 type 0-raw len 4
    Info:TuyaMCU:ParseState: int32 67174430
    Info:TuyaMCU:Received: 55 AA 03 07 00 18 12 00 00 14 01 01 00 0C 03 01 01 00 04 01 00 80 08 01 00 01 09 00 00 00 F2 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 31
    Info:TuyaMCU:ParseState: id 18 type 0-raw len 20
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 0F 02 00 04 00 00 00 02 28 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 15 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 2
  • #64 20976543
    p.kaczmarek2
    Moderator Smart Home
    Oh sure, I can see a problem, here's a fix:
    https://github.com/openshwprojects/OpenBK7231...mmit/7da0682c76a9a5d2cd54d61f08b70101b50545fd
    or at least I hope that's a fix! can you update and recheck?
    Helpful post? Buy me a coffee.
  • #65 20976576
    njhuiz
    Level 5  

    Perfect! With this change we can in principle also use the rev6.1 html of @Angel0fDeath for this device. But I'll also make a reduced version for this device, or maybe a common one for both. EAMPDW-TY63 has no breaker ID, and therefore it is easy to tell both apart.
  • #66 20976582
    p.kaczmarek2
    Moderator Smart Home
    Please post it as a separate topic in the Tutorials section, and maybe add some generic information on the script. This is a good work and it deserves to have separate topic so more people can see it.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #67 20977895
    Angel0fDeath
    Level 13  

    @njhuiz Sorry, was busy last few weeks and didn't visit the forum, but it seems my script works for you also, which I am glad to hear :)
    Feel free to change whatever you want in my script in order to fulfill your needs :)

    EDIT:

    Important: In order for the script to work correctly, all dpID's which you want to receive SHOULD be mapped with CORRECT data type. It doesn't matter on which channel dpID's will be mapped but should be mapped, since OBK works with only mapped dpID's - that's what we agreed with @p.kaczmarek2 . Data type - if something doesn't work as you expect, change data type in mapping to raw and handle received bytes from the script.

    I hope the above will help to make the script better for your needs.

    PS: As I said in another post, the script shows how you can do something with the device. Since flash of the device is limited and we already have a solution, do not expect all these additional features to be included in firmware. Make a module for your home automation server. I'm using FHEM and a lot of my script already incorporated
  • ADVERTISEMENT
  • #68 20978054
    njhuiz
    Level 5  

    Actually, the EAMPDW-TY63 is pretty similar to the TOMPD-63. Mainly just without Prepaid, BreakerID, the two settable timeouts. It has two additional values in dpID 18, whose effect I don't yet know. We can even use your autoexec.bat, if buttons without function on the main page are of no concern.

    I'll try to make an html page for both devices. The TOMPD-63LW also seems similar. Maybe with some JavaScript it would be possible to write a unified html for this class of devices.
  • #69 20978183
    Angel0fDeath
    Level 13  
    @njhuiz
    Quote:
    The TOMPD-63LW also seems similar.


    Correct. Breaker2.html for that device will be published next week, I'm working on that. As I said was busy last few weeks...

    Quote:
    I'll try to make an html page for both devices.

    Everybody likes common solutions, but intention of the script was to host it on the device's LFS. I also have thoughts about making a unified web page, but for now this is a background issue for me - more important things to do... Of course, feel free to make it... For all 3 devices now :)

    EDIT: The latter device (63LW) has 2 more buttons and dpID 104 & 105 are read only.
  • #70 20978775
    njhuiz
    Level 5  

    This device is strange. It has indeed some prepaid functionality, which can be toggled by dpID 11 and works just like in TOMPD-63. Prepaid energy can be read on dpID 13 and added to by writing to dpID 14. The energy used is then automatically subtracted from the prepaid energy.

    In dpID 18 there are two more variables compared to TOMPD-63.

    If the first is set to be bigger than zero and the prepayment toggle is on and the prepaid energy (dpID 13) is also bigger than zero, then a "Not Enough Credit" fault will be triggered, and can be used to turn off the breaker by setting the corresponding protection byte. Maybe there is some dpID to which some "Credits" can be written.

    The value of the second one will always be read as zero, but the protection byte can be written. If the protection is on, the breaker turns off when the prepaid energy is less than zero.

    This can be used to turn off the breaker after a certain amount of energy has been used. I'm still missing some information, to be able to use the first variable. But since I don't need the prepaid functionality, I won't investigate further. Probably.
  • #71 20979622
    njhuiz
    Level 5  
    The breaker also signals the "No Prepaid Energy" fault, during the shutdown due to that reason. That's to my knowledge the only fault which will not be raised, when the corresponding protection byte is 0. All other faults will be signaled whenever their condition is satisfied.


    Added after 7 [hours] 13 [minutes]:

    Here are my current files for operating this device. You have to modify "baseURL" in the html file to your needs. This is just a minor mod of the files of @angelofdeath for the TOMPD-63.

    This should cover pretty much all of the functionality of the device. I just haven't found a way to set the recovery time.

    Is there a way to read the product information (response to uartSendHex 55 aa 00 01 00 00 00) via JavaScript, like cm?cmnd=status ? This would be useful to be able to compare firmware versions and to warn people, if their version hasn't been tested yet. Or to implement patches for different versions.
  • #72 20985011
    njhuiz
    Level 5  

    The leakage seems to be measured correctly on my devices. I just measured 4mA with 56KOhm and 8mA with 27KOhm at 230V. I've just been curious, because someone in this thread reported the leakage measurement in his devices to be way off. Maybe that's been a flaw in earlier devices.
  • #73 20988172
    Angel0fDeath
    Level 13  
    @njhuiz I just posted updated script for TOMPD-63-LW here:

    https://www.elektroda.com/rtvforum/topic3995777-60.html#20988137

    You can check it if something could be used in your script.

    Quote:
    This should cover pretty much all of the functionality of the device. I just haven't found a way to set the recovery time.

    On which dpID in your device is recovery time? I don't see this dpID mapped in your autoexec.bat file and therefore the script will never receive this dpID. Dp command works only with mapped dpID's. It doesn't matter on which channel dpID's will be mapped, but should be mapped. I also don't see any attempt to read this dpID in html file...
    If you post here response of tuyaMcu_sendQueryState for this dpID (recovery time) probably will be able to assists you to set this.

    Added after 5 [hours] 32 [minutes]:

    @njhuiz I updated your html script to match the rest scripts, I issued today.
    The reason of update is descried here:

    https://www.elektroda.com/rtvforum/topic4022907-90.html#20988474

    There is also new release of the script for TOMPD-63-LW here:

    https://www.elektroda.com/rtvforum/topic3995777-60.html#20988663

    In your script, I didn't altered anything else, except some comments and of course synchronization with the other scripts, so it should work. Now all scripts should behave and look identically (with necessary differences :) ). Please test and send feedback.

    If you change something - be sure to follow file naming convention - there is a comment inside the script.

    If you need help for something - just let me now :) . Regards.

    PS: Since I tested the script as long as I can with my device, do not forget to change IP/URL address with the address of your device :)
  • ADVERTISEMENT
  • #74 20989290
    njhuiz
    Level 5  

    Thanks for looking at my version of the scripts. This device probably does not have a way to set the response time. I did map all dpIDs that the devices reports and two more (12 and 14), which I took from your scripts. Maybe that is an error in the firmware. Also the official Tuya App does not have an option to set the time.

    I called the two registers unique to this device initially U1 and U2, since I had no idea, what they were for. I should have given them a proper name before uploading though. U1 is still kind of a mystery. It triggers a "Not enough Credit" fault, even though in the Tuya App there is no way to set credits. Another peculiarity of the firmware.

    I've got one suggestion for the UI. There should be a button to stop updates of the settings to the device. The other day I accidentally touched the under voltage slider on my smartphone, which easily could have led to an unwanted shutdown of the breaker.

    I've also ordered a TOMPD-63-LW on sale for 15 Euros on March 1st. It's a new version with color display. Let's hope that they did not change anything else.
  • #75 20989505
    Angel0fDeath
    Level 13  
    Quote:
    I've got one suggestion for the UI. There should be a button to stop updates of the settings to the device. The other day I accidentally touched the under voltage slider on my smartphone, which easily could have led to an unwanted shutdown of the breaker.

    @njhuiz Exactly due to this reason the settings are hidden when you load the page...

    Quote:
    U1 is still kind of a mystery. It triggers a "Not enough Credit" fault, even though in the Tuya App there is no way to set credits. Another peculiarity of the firmware.


    In the other 2 devices - 'Not enough credit' is triggered only when you turn on Prepaid Energy Toggle and no prepaid energy is set in the device. Btw, this also turns off the main relay. So if this is the case with your device this definitely is Prepaid Energy Switch. I don't know how you can set prepaid energy. Maybe really peculiarities of the firmware. If so, I can recommend you just to forget about this feature and to use the device without it. After you finish all adjustments - clean your autoexec.bat and html script from what is not necessary and submit them on Github page. Also submit them here:

    https://www.elektroda.com/rtvforum/topic4040354.html
  • Helpful post
    #76 21612824
    vincenzoernst1
    Level 8  
    just for the google search

    Alternative names for the
    * EARU EAMPDW-TY63
    are
    * SMTONOFF Tuya WiFi 2P 63A
    * TOMZN TOMPD-63 (LW or SW) or  TOVA-63T
    * DIYGO DGC-63T
    * TANELE TVP51-63T
    * UNKAS WIFI Function Protector
    * TNCE Automatic Reclosing Protector

    *there is also a brand sold in russia....cant find it right now

    @xury
    can you plz add the vendor to the topics subject?
    can you add the alternative names to your first post
    and
    can you add the current working config to your fist post, so i can easily be found?


    just in case attached is also a backup of the orig fw and a pdf of the "manual" from my device

    @p.kaczmarek2

    p.kaczmarek2 wrote:
    xury wrote:

    How can you upload Openbeken without soldering? If you have dump flash from one, can you use it for others? I'm asking because in the case of, for example, Sonoff, you need to have the original backup.

    To program other devices without soldering, you need a full dump of flash memory (2MB) from a device from the same series and with the same build version. Then it's handed over to the Cutter team to add support, but that's what I can do now - just do a full 2MB read and post the dump.


    could u send the attached backup orig fw to the cloudcutter team?
  • #77 21613612
    morgan_flint
    Level 14  
    Zogdan wrote:
    Just a small warning on quality:

    I bought a few more of these devices, and they all have the same problem with measuring leak current.

    The RCD function (Residual Current Device) of the EAMPDW-TY63 is unusable and you should not rely on that as a protection device, since it consistently reads too high values, tripping the set protection. If readings are so much all over the place you might wonder if it is reading anything useful, so I just switch it off...

    For completeness or those searching : the printed sticker says EARU EAMPDW-TY-63


    Hello @Zogdan and rest of topic followers.

    I understand the quoted post is old, but just in case you didn't solve the problem and/or others are having the same.

    From the photos in your previous post:
    Interior of an electrical device with a current transformer and power wires

    I can see the current transformer for leakage current (toroidal yellow part top left of the photo) is only measuring one of the poles, so, logically, it is showing a very high current (in fact, it's measuring the phase current). To measure leakage current (i.e., the difference between the phase and neutral currents), it should encompass the two poles: the one that goes through the relay and the other one, which has the current shunt (the one in the lower part of the case in your photo).

    I'm not sure if it came mounted like that from the factory or if it was due to your teardown. As you mentioned, you bought and tested a few more, and if you tested them before opening, I understand it's the first possibility, which would indicate very poor quality control. From the photos, it may be a bit tricky to put it correctly, but it should surely be possible.

    Hope this helps if you're still monitoring the thread.

    Regarding using this as a protection device, I'd rather trust my life to a "traditional" RCD, approved for use by local regulations (in my country it's mandatory to have a 30 mA unit upstream every 5 circuits), but this kind of device could still be useful to measure residual currents in individual circuits and/or tripping at lower levels than the one upstream, if you want to have a more sensible protection for some reason (e.g., a test panel in a lab).

    EDIT: in the second photo of your teardown here:
    Interior of disassembled meter with ribbon cable and electronic components

    You can see how the residual current transformer (black in this one) is surrounding both poles, This is the correct way to install it to measure the difference between input and output currents.
  • #78 21753382
    dmacost17
    Level 3  
    Hi everyone. I've bought a few EARU EAMPDW-TY-63 devices, and it seems like there's a new revision with T1-3S module instead.

    T1-3S Wi-Fi module mounted on a PCB of a power control device
    Everything else remains the same. I've managed to successfully flash OBK for BK7238(T1). Attaching the backup of the original firmware to the post.

    This is my first experience with OBK and smart homes in general. So after some time researching the topic I began to dig into the dpIDs for this device as I couldn't find complete breakdown. Here's my autoexec.bat with everything I've managed to decode:
    
    clearIO
    
    SetFlag 46 1
    
    startDriver TuyaMCU
    tuyaMcu_setBaudRate 9600
    
    tuyaMcu_defWiFiState 4
    
    linkTuyaMCUOutputToChannel 1 val 1
    setChannelType 1 EnergyTotal_kWh_div100
    setChannelLabel 1 "Total Energy"
    
    linkTuyaMCUOutputToChannel 6 RAW_TAC2121C_VCP
    setChannelType 2 Voltage_div10
    setChannelLabel 2 "Voltage"
    setChannelType 3 Power
    setChannelLabel 3 "Power"
    setChannelType 4 Current_div1000
    setChannelLabel 4 "Current"
    
    linkTuyaMCUOutputToChannel 9 raw 9
    setChannelType 9 ReadOnly
    setChannelLabel 9 "Fault"
    
    linkTuyaMCUOutputToChannel 11 bool 11
    setChannelType 11 toggle
    setChannelLabel 11 "Prepayment"
    
    linkTuyaMCUOutputToChannel 12 bool 12
    setChannelType 12 toggle
    setChannelLabel 12 "Clear Energy Counters"
    
    linkTuyaMCUOutputToChannel 13 val 13
    setChannelType 13 EnergyTotal_kWh_div100
    setChannelLabel 13 "Total Prepaid Energy"
    
    linkTuyaMCUOutputToChannel 14 val 14
    setChannelType 14 TextField
    setChannelLabel 14 "Purchased Energy [kWh*100], i.e. 1kWh = 100"
    
    linkTuyaMCUOutputToChannel 15 val 15
    setChannelType 15 Current_div1000
    setChannelLabel 15 "Leakage Current"
    
    linkTuyaMCUOutputToChannel 16 bool 16
    setChannelType 16 toggle
    setChannelLabel 16 "Breaker"
    
    linkTuyaMCUOutputToChannel 17 val 17
    setChannelType 17 TextField
    setChannelLabel 17 "Leakage Current Protection Settings"
    
    linkTuyaMCUOutputToChannel 18 raw 18
    setChannelType 18 ReadOnly
    setChannelLabel 18 "UVP, OVP, OVC"
    
    linkTuyaMCUOutputToChannel 102 val 19
    setChannelType 19 TextField
    setChannelLabel 19 "E-C"
    
    linkTuyaMCUOutputToChannel 103 val 20
    setChannelType 20 Temperature
    setChannelLabel 20 "Temperature, C"
    
    linkTuyaMCUOutputToChannel 104 bool 21
    setChannelType 21 toggle
    setChannelLabel 21 "E-C Enable"
    
    linkTuyaMCUOutputToChannel 105 val 22
    setChannelType 22 TextField
    setChannelLabel 22 "Toggle with delay (-2s), i.e. 10 = toggle in 8s"
    
    linkTuyaMCUOutputToChannel 106 val 23
    setChannelType 23 TextField
    setChannelLabel 23 "106"
    
    linkTuyaMCUOutputToChannel 107 val 24
    setChannelType 24 TextField
    setChannelLabel 24 "Reclose delay time"
    
    linkTuyaMCUOutputToChannel 109 val 25
    setChannelType 25 TextField
    setChannelLabel 25 "109"
    
    linkTuyaMCUOutputToChannel 110 val 26
    setChannelType 26 TextField
    setChannelLabel 26 "110"
    
    linkTuyaMCUOutputToChannel 111 enum 27
    setChannelType 27 TextField
    setChannelLabel 27 "111"
    
    linkTuyaMCUOutputToChannel 134 enum 28
    setChannelType 28 TextField
    setChannelLabel 28 "Power On State: 0=OFF, 1=ON, 2=Last State"
    
    tuyaMcu_sendQueryState
    


    So,
    1) dp 15 (leakage current enable and value) are "write-only". They're always being read as 0, however writing to the dp has immediate effect.
    2) there's some setting in the device which isn't present in the manual. Screen says "E-C" and possible values are 0-99. Channel 102 sets this value and channel 104 is true if the value is not zero. Couldn't manage to find out what does it do.
    3) dp 105 acts strangely - it sets a countdown timer and toggles the relay when timer reaches value 2. So if I set 10s, it begins to decrement, toggles the relay and remains 2.
    4) dp 103 is temperature
    5) dp 107 sets power on delay time
    6) dp 134 defines default power-on state (off, on or last active state)
    7) 106, 109, 110, 111 behavior is unknown

    What's more, it seems like this device has less Flash memory and it's impossible to upload the custom html page shared previously in this topic. Thus I've removed all the prepaid functionality (as I won't use it anyway), removed all the visibility toggling logic and used html minifier before uploading. Attaching non-minified version of the page as well.

    If someone could suggest what other dp's are doing that would be great.

    On a side note, during the debug I've encountered an issue when the device was not responding on the network several times. I couldn't ping it and it did not load any webpages. The only cure was power reset. I'm wondering, how common is this? Has someone else encountered similar issue?
    I'm asking as I'm planning to use it for some power automations for my off-grid power station and after installation it would be quite hard to reset the power in case of freezing like this.
  • #79 21753400
    insmod
    Level 29  
    >>21753382
    In stock, there is not enough space for this HTML file.
    You have 2 ways of fixing it.
    First - upload it as gzip (via a button in web app).
    Second - expand littlefs via lfs_size (Like "lfs_size 0x10000"). Filesystem will be erased then, make sure to backup it beforehand.
  • #80 21758649
    dmacost17
    Level 3  
    Hello!
    I'm facing an issue changing my MAC address on the updated Earu with T1-3S module. I have 3 of these devices, and after flashing OBK all of them have this mac address: c8:47:8c:42:88:48.
    Trying to change the MAC address from the device webpage (when only one of them is connected to my local network) just causes it to disconnect. And after a reboot it still shows the old MAC.
    1. I've found this hex string in the configdata. Tried changing it there and then writing config from the webapp - no luck, still old mac after rebooting (and config data gets rewritten with old mac as well).
    2. I've tried editing firmware (found 2 places in the firmware binary with this hex string). Edited it, saved, successfully flashed via uart. However, couldn't manage to boot. So I connected usb-uart monitor on RX1/TX1 and the following was printed during startup:
    
    go os_addr(0x10000)..........
    BK7238_1.0.15
    REG:cpsr        spsr        r13         r14
    SVC:0x000000D3              0x00401C1C  0x000033A0
    IRQ:0x000000D2  0x00000010  0x00401E0C  0x10030091  
    FIR:0x000000D1  0x00000010  0x00401FFC  0x80829A10  
    SYS:0x000000DF              0x0040192C  0x00000158  
    ST:0x00010000
    [I/FAL] Fal(V0.4.0)success
    [I/OTA] RT-Thread OTA package(V0.2.8-beken-1133282d-20220604) initialize success.
    [E/OTA] (ota_main:178) App verify failed! Need to recovery factory firmware.
    


    3. I then reflashed the original unmodified OBK, got it up and running and connected to the RX2/TX2. Then monitored the output during changing mac address request. Here're some interesting lines from the output (I've stripped lines that seemed to be unrelated):
    
    // Booting
    bk_misc_init_start_type 0 0
    prvHeapInit-start addr:0x416560, size:170656
    [Flash]id:0x852015
    [Flash]init over
    sctrl_sta_ps_init
    SDK Rev: 3.0.78 b099007
    OSK Rev: F-3.0.51 b099007
    cset:0 0 0 0
    No TLV header found in flash
    ...
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 1 changes count.
    Error:CMD:lfs is absent
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    ...
    // Actual get request from the config page
    No TLV header found in flash
    bk_wlan_stop_scan
    scan_send_cancel_cfm_fail
    sending broadcast_deauth:5
    sta_ip_down
    WARN: TCPIP mutex is NOT locked (1) caller 73407
    
    [net]remoVif_idx:0
    sm_disconnect no txdesc
    Total txl frames:
      [0] 0x410ca4, type 21841, postponed 0, keep_desc 0
      [1] 0x410d18, type 21841, postponed 0, keep_desc 0
      [2] 0x410d8c, type 21841, postponed 0, keep_desc 0
    Free frames:
    sm_disconnect_process reason=3
    me_set_ps_disable:978 0 0 1 0 10
    me_set_ps_disable_req_handler 10!!
    sta_mgmt_unregister: sta_idx 0, mac 50:ff:20:a2:d1:be
    mm_set_vif_state_req_handler
    mm_set_vif_state pass
    bad_channel vif_idx=0
    SM_DISCONNECT_IND
    mhdr_disconnect_ind reason_code=3
    deassoc_evt_cb
    wpa_handler_signal err failed
    Info:MAIN:Time 43, idle 171486/s, free 108312, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/24 
    hapd_intf_del_key: mac ff:ff:ff:ff:ff:ff, hw key idx 65
    hapd_intf_del_key: mac ff:ff:ff:ff:ff:ff, hw key idx 1
    wpa S: COMPLETED -> DISCONNECTED
    wpa S: DISCONNECTED -> DISCONNECTED
    Cancelling scan request
    scanu completed
    hapd remove_if:0
    mm_remove_if_req_handler remove vif0
    no_enter_monitor_in_the-remove-if-routine
    released_scan_results
    low_level_output: invalid vif:255!
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=c8:47:8c:42:88:48
    


    @p.kaczmarek2 could you please assist with this?

    Added after 9 [minutes]:

    >>21758649
    Literally minutes after posting this came across this issue on the GitHub. So I've restored the RF partition from the backup and the device got its own MAC address.

    Sorry for the disturbance. And as a suggestion would be to automatically restore MAC address for the BK7238
  • #81 21758807
    vincenzoernst1
    Level 8  
    @p.kaczmarek2

    this would be in gerneral a good addition to the flash instructions.

    dmacost17 wrote:
    Literally minutes after posting this came across this issue on the GitHub. So I've restored the RF partition from the backup and the device got its own MAC address.

    Sorry for the disturbance. And as a suggestion would be to automatically restore MAC address for the BK7238

Topic summary

The discussion revolves around the EAMPDW-TY63 device, focusing on the implementation of alternative firmware, OpenBeken, to access measurement data via TuyaMCU. Users share experiences with flashing the device, configuring it to read voltage, current, and power data, and troubleshooting issues related to data accuracy and communication. Key points include the need for specific commands to enable data reporting, the importance of MQTT configuration, and the challenges faced with leakage current measurements. The conversation also touches on the device's firmware capabilities, including the mapping of dpIDs to channels for effective data retrieval and control.
Summary generated by the language model.
ADVERTISEMENT