logo elektroda
logo elektroda
X
logo elektroda

How do I free the PJ-MGW1103 energy meter from the cloud and connect it to Home Assistant?

p.kaczmarek2 4344 34
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 21548085
    p.kaczmarek2
    Moderator Smart Home
    Almost, there is one more step needed - you need to check SEL pin state to see if it's set to UART or SPI. Change it if needed.
    Table showing pin configuration and functions of the BL0942 IC, with highlighted SEL and SCLK_BPS pin descriptions.
    Quote:

    7 SEL UART/SPI mode selection (0: UART 1: SPI), internal pull-down resistance,
    connected to GND is 0 level (UART), connected directly to VDD is high level (SPI)

    You also need to pay attention to SCLK_BPS:
    Quote:

    8 SCLK_BPS Serial Clock input for SPI. If using UART, this pin is used to config baud rate of
    UART
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 21548717
    ghimpe--
    Level 10  
    Last night I tried your firmware and the device still showed weird readings so I proceed to a proper visual inspection of the PCB, using the microscope this time. It didn't take long until I found the culprit: resistor and capacitor on one input of the BL0942 is cracked. It's possible I somehow cracked them when I first open the device to flash it. Embarrassing, never happened to me until now...

    I will try to replace these components and see if the calibration is still accurate. It's a shame I don't have 0402 smd components in my inventory

    At least I am happy I found out why it was behaving like this... it drove me crazy not understanding why...

    Thank you very much for your time and support and for the whole "open beken project", it's amazing!
  • ADVERTISEMENT
  • #33 21549570
    ghimpe--
    Level 10  
    Just to confirm, I have replaced the broken components and the device is working great now!
    And for reference the resistors are 470R and capacitors are 68nF - (on the input pins 2 and 3 of the BL4092)
  • ADVERTISEMENT
  • #34 21549615
    p.kaczmarek2
    Moderator Smart Home
    That's good to know, I didn't consider that. So now it also works good with OBK?
    Helpful post? Buy me a coffee.
  • #35 21549619
    ghimpe--
    Level 10  
    Yes, now it works good with open beken.

    Added after 9 [minutes]:

    Yes, now it works good with open beken.

Topic summary

The discussion revolves around freeing the PJ-MGW1103 energy meter from the Tuya ecosystem and connecting it to Home Assistant using OpenBeken firmware. Users share experiences with the TuyaMCU protocol, the BK7231N WiFi module, and the challenges faced during the transition. Issues such as overheating components after flashing OpenBeken, GPIO configuration, and the extraction of JSON data from the device are addressed. Solutions include setting GPIO roles correctly, using power-saving commands, and utilizing available drivers for bistable relay control. Participants also inquire about the metering chip and temperature sensor integration, comparing the device to similar models like the TO-Q-SY2-JWT and SY1.
Summary generated by the language model.
ADVERTISEMENT