Solar battery Dyness Junior Mqtt help

Hi guys,

I have a battery storage device from Dyness. I’d like to integrate it into Home Assistant to read the data (battery status, etc.). If I understand correctly, it’s all cloud-based. On the Dyness monitoring page, I saw the following: Under Developer Center, there are two submenus: API Management and Data Forwarding (MQTT). Can anyone help me with the setup? Or is anyone already using it? Thanks a lot for your help.
Mqtt:

Api:

api :https://web-static.dyness.com/doc/DYNESS%20Open%20API%20interface%20protocol%20document.pdf

Hi. I worked up a solution. I must admit I have limited coding experience and used help from AI. Developed a custom component that polls this Dyness API. In my case, the API URL is (http://open-api.dyness.com) global/European API for Dyness DL5.0C. I do have a universal version, but no way to check it. Attaching a zip folder. There is a readme inside, please make sure to follow that and let me know how it goes!

Link to ZIP Folder: https://drive.google.com/file/d/1FyL6uYLqsDHlWSV3zQ17eiFXscgIA2xo/view?usp=drive_link




Hi, I’ve followed all the instructions in the readme. Unfortunately, I can’t get a connection (see photo). I’ve also updated the API again, but without success.

Do you perhaps have any other ideas?

Do I need to do anything else in the Dynes interface? I’ve already activated the API and I can see the values. I have the feeling it’s not establishing a connection to the API.

Do I need to subscribe to anything else in the Dyness Portal, or anything like that?

Did you select the right API Url (region)?

Try both

Hi UsamaM97,

thank you for sharing your integration! I am trying to set up the same for my Dyness Junior Box but I keep getting the error:

{"code":"500","info":"Some device serial numbers are not bound. Please bind the devices first"}

I have created an API key in the Developer Center, but I cannot find any option in the portal to bind the device to the API key.

API Url (region) is Global / Europe.

Could you tell me how you solved this? Did you have to do anything special to bind the device, or did it work automatically for you?

Thank you!

I contacted Dyness about this. I have the same problem. However, there are no further options in the settings.

1 Like

Unfortunately, this error is consistent across every Junior Box I have tested. Will need to wait for Dyness responce.

You have to use the /v1/device/bindSn endpoint to bind your device and then you can use other endpoints to query information about your device.

Dyness wrote me this today: Good day, the 401 | ACCESS_DENIED error usually occurs when the device has not yet been linked to your account via the API. Please first perform the bind process using the following API endpoint: /bind/deviceSn. After the device has been successfully bound, further API queries (e.g., /v1/device/household/storage/detail) should work. Best regards, Daryl

Hi Marko, do you have instructions on how I should do this? Sorry, I’m a beginner.

Hi everyone,

I wanted to share some progress on integrating the Dyness Junior Box with Home Assistant via the Dyness Open API.

A big thank you to @markoeltermann — your hint about the /v1/device/bindSn endpoint was the key that got everything working for me!

And thank you to @xADDRx for sharing the response from Dyness Support regarding the /v1/device/household/storage/detail endpoint — I will be testing this tonight and it may provide even more sensor data.

I have been working on a custom Home Assistant integration using the Dyness Open API and will be publishing it on GitHub soon. It currently supports the Dyness Junior Box with the following sensors: State of Charge, Power, Current, Battery Capacity, Installed Power, and Last Update.

I will post the GitHub link here once it is available. Hopefully it will be useful for others with Dyness devices!

Best regards

1 Like

As promised, the integration is now available on GitHub:

:point_right: GitHub - shopf/dyness_battery: Home Assistant Community Integration for Dyness Battery Storage · GitHub

It can be installed via HACS as a custom repository.

Tested with: Dyness Junior Box
Available sensors:

  • State of Charge (%)
  • Power (W) — positive = charging, negative = discharging
  • Current (A)
  • Battery Capacity (kWh)
  • Installed PV Power (kW)
  • Communication Status (Online/Offline)
  • Work Status (e.g. RunMode, StandBy)
  • Firmware Version
  • Last Update / Data Timestamp

If you have a different Dyness model, please run the included test script (tools/dyness_test.py) and open an issue on GitHub with the output — I would love to expand support to other models!

1 Like

Hi Osiris,
Thanks for the integration! I tried it out. Unfortunately, it still shows me that the devices are not bound:

Einrichtungsfehler, wird erneut versucht: Dyness API Fehler (Code 500): Some device serial numbers are not bound. Please bind the devices first – deviceSn=R07E86466814010C-BMS

Do you have instructions on how I can bind it?

Hi Ben,

The integration calls /v1/device/bindSn automatically during setup. If it fails with error 500, please check the following:

  1. Make sure your API credentials (App ID and Secret) are correct — they can be found in the Dyness portal at ems.dyness.com under Developer Center → API Management
  2. Make sure your device is visible and online in the Dyness app
  3. Make sure the device serial number (deviceSn) and collector serial number (collectorSn) are correct — you can find them in the Dyness app under device details

During setup the integration asks for deviceSn and collectorSn — did you enter both correctly?

  • deviceSn: the serial number of the BMS (e.g. R07E8546681A00F9-BMS)
  • collectorSn: the serial number of the WiFi dongle (e.g. R07E8546681A00F9)

If you are unsure about your serial numbers, you can use the included test script tools/dyness_test.py from the repository. It will help you identify your device and collector serial numbers.

Best regards

Hi, thanks. But it didn’t work. The serial numbers are correct; I’m copying them directly into the form. I’m also copying the API data exactly as it is. The Junior Box is online. I’m really getting desperate. :frowning:

Did you change anything in version 1.1? I just reloaded it in HACS and now it works. Thank you so much!!

Glad v1.1.0 already worked for you! Since then I have improved the bindSn handling and added clearer hint messages during setup to help future users.

If you haven’t done so already, please update to the latest version v1.1.1 via HACS, restart Home Assistant and verify everything works correctly.

Enjoy! :battery:

Hey @Osiris09 ,
thanks for the integration.
This is also working for Dyness Tower (non pro) models.
New Device Dyness Tower Txx · Issue #1 · shopf/dyness_battery

Issue is raised in german, but we may swich to english.

And sorry, I did not do the last action " * Which fields return values and which return null". This is too much at the moment.

What I was wondering and trying is to get a call on /v1/one/realTime. There seems to be a lot of nice information in there. We might even get cell voltages from there?

Thanks again and have a great weekend,
Thomas