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:
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!
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 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.
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
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!
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!
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
The integration calls /v1/device/bindSn automatically during setup. If it fails with error 500, please check the following:
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
Make sure your device is visible and online in the Dyness app
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.
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.
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?