Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Zendure Hyper 2000 #272

Open
maxp1256 opened this issue Jul 3, 2024 · 18 comments
Open

Support for Zendure Hyper 2000 #272

maxp1256 opened this issue Jul 3, 2024 · 18 comments

Comments

@maxp1256
Copy link

maxp1256 commented Jul 3, 2024

Hello!

are there any plans for supporting the new Hyper 2000? I've an Shelly 3EM, a photovoltaik without an hybrid inverter and the awattar.at hourly tariff. I would expect to be able to use the cheap hours in the night (2-5) to load the batteries, skip the rise in the morning hours (6-9) with zero net usage, continue reloading&flatting burst peaks (washing mashine/dishwasher heating or cooking) during the day with pv and skip the next high during 18-21 until batteries are empty.

I don't expect that it's possible to cover this with the standard app so I would be happy to have a very simple possibility to set mode (charge/discharge) and wattage locally, fast, reliable and without cloud/internet demand.

Edit: Another Idea: Do you know how the shelly integration is working? Is it possible to emulate a Shelly 3EM device locally to do every controlling with the power values?

@reinhard-brandstaedter
Copy link
Owner

Servus,
I have no other device available than my own SFHub 1.2k. So I can’t tell you exactly. You might be able to disconnect the Hyper from Zendure Cloud the same way as the SF hubs with the sf-bt-manager and then you would get all data reported to a local MQTT broker, which is also used to relay commands to the Hyper2000 (given it works similar to the other SF products).
It could be though that Zendure has implemented secure MQTT by now which could be an issue.

The shelly integration is likely a data exchange on the zendure backend between their mqtt and shelly cloud. But even so, if your hub is using a local mqtt you likely can also steer it via simulated shelly reporting (smart matching mode)

@ralf-koe
Copy link

ralf-koe commented Jul 9, 2024

Does that

you likely can also steer it via simulated shelly reporting (smart matching mode)

mean, that I can write Shelly (fake) data via MQTT?

@maxp1256
Copy link
Author

maxp1256 commented Jul 9, 2024

Hello,

a local mqtt service/proxy which modifies the real shelly em data sounds very promising. Do you know how it's working currently? (the marketing documents from zendure are talking about a link between shelly and zendure cloud) but I don't think that this would work because of instable internet connectivity and WAN delays.
Probably the "linking" is only the interchange of the local mqtt endpoint (IP+Port)?

@reinhard-brandstaedter
Copy link
Owner

No, the original Zendure/Shelly integration can only happen via the public clouds. So both your devices (shelly & solarflow) have to be online.
For users like me (shellies are only reporting locally) this wouldn't work.
The hub has a input property smartPower which I assume is used to provide the readings of a Shelly (or any other power meter device) which then is used to adjust the outputLimit. Also the smartMode will control in which. mode (smart matching) the hub is working.
image
So if you want to try your approach you'll need to set the smartMode accordingly (check values by setting it from the App) and then publish data via the smartPower property.
If I'm correct the hub will then adjust it's outputLimit.
There are for sure some ramifications, like how often that limit can be updated (the hub was never the fastest in switching), ..

@Raudi1
Copy link

Raudi1 commented Aug 24, 2024

Today I finally had some time to try solarflow-control on my Hyper 2000. Taking it offline worked, but I couldn't really get it to work completely. That's expected, since the device is different from the hub, but I'd really like to have local control of my Hyper 2000. I'm sadly no developer and can only do a bit of coding, so I'd only be able to help.
Ideally this software would control the integrated inverter to charge the Hyper2000 with excess energy and to discharge it when there's power taken from the utility. I'd be happy with being able to set the charge/discharge power via MQTT though. Then I could let EVCC or Home Assistant handle it.
After taking the Hyper2000 offline, there's no MQTT data aside from this:
image
Here's what the log shows

2024-08-24 13:59:55,579:INFO: MQTT Host: 192.168.1.1:1883
2024-08-24 13:59:55,579:INFO: MQTT User: MQTT/secret
2024-08-24 13:59:55,579:INFO: Solarflow Hub: ja72U0ha/xxxxxxx
2024-08-24 13:59:55,579:INFO: Limit via inverter: False
2024-08-24 13:59:55,579:INFO: Control Parameters:
2024-08-24 13:59:55,579:INFO:   MIN_CHARGE_POWER = 10
2024-08-24 13:59:55,579:INFO:   MAX_DISCHARGE_LEVEL = 800
2024-08-24 13:59:55,579:INFO:   MAX_INVERTER_LIMIT = 800
2024-08-24 13:59:55,579:INFO:   MAX_INVERTER_INPUT = 1190
2024-08-24 13:59:55,579:INFO:   SUNRISE_OFFSET = 60
2024-08-24 13:59:55,579:INFO:   SUNSET_OFFSET = 60
2024-08-24 13:59:55,579:INFO:   DISCHARGE_DURING_DAYTIME = True
2024-08-24 13:59:55,691:INFO: IP Address: xxx.xxx.xxx.xxx
2024-08-24 13:59:55,691:INFO: Location: Secret, North Rhine-Westphalia, Germany
2024-08-24 13:59:55,691:INFO: Coordinates: (Lat: xx, Lng: xx)
2024-08-24 13:59:55,693:INFO: No config setting found for option "control_bypass" in section solarflow!
2024-08-24 13:59:55,694:INFO: Publishing Homeassistant templates...
2024-08-24 13:59:55,732:INFO: Published 33 Homeassistant templates.
2024-08-24 13:59:55,732:INFO: Triggering telemetry update: iot/ja72U0ha/xxxx/properties/read
2024-08-24 13:59:55,732:INFO: Using OpenDTU: Base topic: solar/xxxx, Limit topic: solar/xxxx/cmd/limit_nonpersistent_absolute, SF Channels: [3], AC Limit: 1200
2024-08-24 13:59:55,732:INFO: No config setting found for option "scaling_factor" in section smartmeter!
2024-08-24 13:59:55,732:INFO: Using Smartmeter: Base topic: shellypro3em/status/em:0, Current power accessor: total_act_power, Total power accessor: total_aprt_power, Rapid change diff: 500W, Zero offset: 20W, Scaling factor: 1
2024-08-24 13:59:55,732:INFO: Connected to MQTT Broker!
2024-08-24 13:59:55,733:INFO: Hub subscribing: /ja72U0ha/xxxx/properties/report
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/solarInputPower
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/electricLevel
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/outputPackPower
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/packInputPower
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/outputHomePower
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/outputLimit
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/inverseMaxPower
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/masterSoftVersion
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/pass
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/passMode
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/batteries/+/socLevel
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/telemetry/batteries/+/totalVol
2024-08-24 13:59:55,733:INFO: Hub subscribing: solarflow-hub/xxxx/control/#
2024-08-24 13:59:55,733:INFO: Turning hub buzzer OFF
2024-08-24 13:59:55,733:INFO: DTU subscribing: solar/xxxx/0/powerdc
2024-08-24 13:59:55,733:INFO: DTU subscribing: solar/xxxx/0/efficiency
2024-08-24 13:59:55,734:INFO: DTU subscribing: solar/xxxx/+/power
2024-08-24 13:59:55,734:INFO: DTU subscribing: solar/xxxx/status/producing
2024-08-24 13:59:55,734:INFO: DTU subscribing: solar/xxxx/status/reachable
2024-08-24 13:59:55,734:INFO: DTU subscribing: solar/xxxx/status/limit_absolute
2024-08-24 13:59:55,734:INFO: DTU subscribing: solar/xxxx/status/limit_relative
2024-08-24 13:59:55,734:INFO: DTU subscribing: solarflow-hub/+/control/dryRun
2024-08-24 13:59:55,734:INFO: Smartmeter subscribing: shellypro3em/status/em:0
2024-08-24 13:59:55,777:INFO: Taking over bypass control: False
2024-08-24 13:59:55,778:INFO: Updating SUNRISE_OFFSET to 60 minutes
2024-08-24 13:59:55,778:INFO: Updating SUNSET_OFFSET to 60 minutes
2024-08-24 13:59:55,778:INFO: Updating MIN_CHARGE_POWER to 10 W
2024-08-24 13:59:55,778:INFO: Updating MAX_DISCHARGE_POWER to 1200 W
2024-08-24 13:59:55,778:INFO: Updating DISCHARGE_DURING_DAYTIME to True
2024-08-24 13:59:57,964:INFO: Rapid rise in demand detected, clearing buffer!
2024-08-24 13:59:57,966:INFO: HUB: S:-1.0W [ ], B: -1% (-1), V:-1.0V (-1.0), C: 0W, P:False (manual, possible), F:-1.0h, E:-1.0h, H: -1W, L: -1W
2024-08-24 13:59:57,966:INFO: INV: AC:800W, DC:1150.8W (285.2|304.9|290.8|269.9), L:800W (500.0W/channel) [ -1W]
2024-08-24 13:59:57,966:INFO: SMT: T:Smartmeter P:3304.0W [ 3304.0,3304.0,3304.0 ]
2024-08-24 13:59:57,967:INFO: SMT triggers limit function: 3304.0 -> 3304.0: executed
2024-08-24 14:00:14,469:INFO: Determined inverter's max capacity: 2000.0

I

@welli2009
Copy link

welli2009 commented Aug 24, 2024 via email

@Raudi1
Copy link

Raudi1 commented Aug 24, 2024

Hi Vrabetz, Your logs do not contain the necessary informations needed to develop your control. Try using MQTT Explorer to gather the necessary informations and attach screenshots from MQTT Explorer with the topics. welli

I'll try, but currently I can't connect to the Zendure MQTT. Was working earlier this day.
Apparently the Hyper2000 uses the same data as the Hub and extends it: https://github.com/Zendure/developer-device-data-report?tab=readme-ov-file#the-fields-extended-by--hyper2000--ace-1500-based-on-solarflow
The topic is always the same ja72U0ha/"DeviceID"/state and the JSON only contains part of the values. Here's a few examples from the official cloud API:

'{"hubState":0,"remainInputTime":59940,"packState":2,"sn":"xxxxx","remainOutTime":281}'
'{"heatState":0,"sn":"xxxx"}'
'{"hyperTmp":3131,"sn":"xxxx"}'
'{"inverseMaxPower":600,"inputLimit":116,"outputLimit":30,"acMode":1,"sn":"xxxx"}' #acMode 1 is input from the grid; 2 is output
'{"outputHomePower":261,"packInputPower":270,"electricLevel":75,"sn":"xxxx"}'
'{"hyperTmp":3141,"sn":"xxxx"}'

@linuxstony
Copy link

Hi Vrabetz, Your logs do not contain the necessary informations needed to develop your control. Try using MQTT Explorer to gather the necessary informations and attach screenshots from MQTT Explorer with the topics. welli

Which information would be important particularly? Currently i have the Hyper connected to the official global MQTT Server which is bridged to my local one. I would be as willing to assist as @Raudi1 is :)

@jschroeter
Copy link

I'd be happy with being able to set the charge/discharge power via MQTT though

This is also what I'm trying as a first step but I'm running into the same issue. When Hyper is locally connected to my HA MQTT (worked with this) I only receive the register/replay message, nothing else. I tried publishing via iot/${productKey}/${deviceKey}/properties/read or iot/${productKey}/${deviceKey}/properties/write topics but so far nothing happened.
@reinhard-brandstaedter could you maybe explain the local MQTT API a bit further? Which topics to we need to publish to receive more values or to change values? Thanks a lot for all your efforts!

Basically I'd like to have a local smart control for Hyper (AC-only, no panels connected), via Shelly 3EM and HA. The native cloud-based Shelly integration works in general, but it's a bit slow and I would prefer it to work 100% local.

@jschroeter
Copy link

Maybe also helpful as a reference: https://github.com/nograx/ioBroker.zendure-solarflow
From the code it seems like they support controlling the Hyper - but via the cloud API.

@reinhard-brandstaedter
Copy link
Owner

@jschroeter once the hub is registered to the local MQTT it should start sending data to a topic like this:

/${productKey}/${deviceKey}/properties/report

(note the leading "/" which is usually not a standard/valid MQTT topic as it results in an empty top node).
There were cases reported where the hubs aren't reporting immediately after the register switch. (I personally had this once for no obvious reason).
Sometimes a few register retries or a few reboots of the hub helped - with some waiting in between.
I always tried this:

  • register the hub to the own MQTT (make sure your MQTT allows anonymous logins, or ensure you have the correct user/pwd added to MQTT, with the hardcoded user and password)
  • wait and see if data arrives, if not after 15min restart the hub
  • wait again, maybe disconnect the hub from WiFi (force WiFi reconnect from your AP/Router)
  • if that doesn't help, register with the mobile App to zendure, try again.

Once the hub reports via the above topic, solarflow-control will read those and "pretty-print" them to

solarflow-hub/${productKey}/telemetry

@reinhard-brandstaedter
Copy link
Owner

@jschroeter you also might find this useful, i summarized the properties and how the hubs can be controlled directly:
https://github.com/reinhard-brandstaedter/solarflow-control/tree/dev/doc

@MaisonGF
Copy link

@reinhard-brandstaedter not "smartMode" or neither "smartPower" reported here by the Hyper disconnected :

image

And not in control :

Capture d’écran du 2024-10-27 21-59-36

Any idea ? Did i miss a parameter ?

@reinhard-brandstaedter
Copy link
Owner

@MaisonGF we are just unwrapping whatever is reported by the Zendure device via it's native .../properties/report topic.
There is no logic in sf-control to extract anything device specific. It just takes what is coming in and creates a separate topic for it. If you don't see any properties then they are either not sent or not yet sent...

@cmuster
Copy link

cmuster commented Nov 30, 2024

@jschroeter I'm running into the same issue here with my Hyper2000. Did you figure it out in the meantime?

When just connecting via BT I'm getting all the properties, but when connecting to my local MQTT broker
I'm just receiving 2 topics in MQTT explorer (not sure what id gDa3tb is in the 2nd topic):

iot/ja72U0ha/<deviceId>/register/replay

/gDa3tb/<deviceId>/time-sync

{"messageId":9103,"deviceId":"<deviceId>","timestamp":1732979122}

I added a user to my MQTT broker with name <deviceId> and pw generated by this snipped from @reinhard-brandstaedter

@jschroeter
Copy link

@cmuster unfortunately not yet. Only tried it one more time but without success and didn't invest more time yet. But I'm still interested and want to try it again soon.

@reinhard-brandstaedter
Copy link
Owner

@cmuster can you post a full log of bt-manager when just connecting via bluetooth (e.g. via the -i option only).

@cmuster
Copy link

cmuster commented Dec 7, 2024

@reinhard-brandstaedter sorry for the late reply, finally had time to give this another try.
btw: when I try to reconnect back to the Zendure cloud via BT manager script this also fails - have to go through the app in this case. I did push the power button 3 seconds to reset network settings before running the disconnect/connect script, as is the process when doing it via app. Also tried restarting the Hyper afterwards.

Here's the info log via bluetooth:

2024-12-07 10:08:01,694:INFO: scan for: zene
2024-12-07 10:08:02,689:INFO: Found device: <mac> ZenE1_38
2024-12-07 10:08:04,396:INFO: Services:
2024-12-07 10:08:04,397:INFO: 00001801-0000-1000-8000-00805f9b34fb (Handle: 1): Generic Attribute Profile
2024-12-07 10:08:04,398:INFO: 00001800-0000-1000-8000-00805f9b34fb (Handle: 5): Generic Access Profile
2024-12-07 10:08:04,398:INFO: 0000a002-0000-1000-8000-00805f9b34fb (Handle: 12): Vendor specific
2024-12-07 10:08:04,399:INFO: 00112233-4455-6677-8899-aabbccddeeff (Handle: 18): Unknown
2024-12-07 10:08:04,595:INFO: {'method': 'read_reply', 'deviceId': '<deviceId>', 'success': 1, 'properties': {'getAll': 1}}
2024-12-07 10:08:04,833:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'packNum': 2}, 'packData': [{'sn': '<serialN>'}, {'sn': '<serialN>'}]}
2024-12-07 10:08:04,933:INFO: {'messageId': 799606, 'method': 'error', 'deviceId': '<deviceId>', 'timestamp': 1733562476, 'offData': 1, 'data': []}
2024-12-07 10:08:05,073:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'masterSwitch': 1, 'electricLevel': 49, 'buzzerSwitch': 0}}
2024-12-07 10:08:05,355:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'socSet': 960, 'solarInputPower': 0, 'packInputPower': 0}}
2024-12-07 10:08:05,514:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'outputPackPower': 0, 'outputHomePower': 0, 'gridInputPower': 0}}
2024-12-07 10:08:05,693:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'solarPower1': 0, 'solarPower2': 0, 'remainOutTime': 59940}}
2024-12-07 10:08:05,812:INFO: {'deviceId': '<deviceId>', 'method': 'BLESPP'}
2024-12-07 10:08:05,893:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'remainInputTime': 59940, 'packState': 0, 'hubState': 0}}
2024-12-07 10:08:06,173:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'masterSoftVersion': 8465, 'masterhaerVersion': 0, 'inputMode': 0}}
2024-12-07 10:08:06,333:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'blueOta': 1, 'pvBrand': 0, 'VoltWakeup': 0}}
2024-12-07 10:08:06,513:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'minSoc': 150, 'plugState': 0, 'lowTemperature': 0}}
2024-12-07 10:08:06,733:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'autoHeat': 0, 'heatState': 0, 'invOutputPower': 0}}
2024-12-07 10:08:07,013:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'ambientLightNess': 20, 'ambientLightColor': 65280, 'ambientLightMode': 0}}
2024-12-07 10:08:07,173:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'ambientSwitch': 0, 'OldMode': 0, 'pass': 0}}
2024-12-07 10:08:07,373:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'circuitCheckMode': 0, 'chargingTime': 0, 'chargingType': 0}}
2024-12-07 10:08:07,653:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'dspversion': 8453, 'hyperTmp': 2831, 'strength': 3}}
2024-12-07 10:08:07,833:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'socStatus': 0, 'gridReverse': 2, 'priceType': 0}}
2024-12-07 10:08:07,953:INFO: {'deviceId': '<deviceId>', 'method': 'BLESPP'}
2024-12-07 10:08:08,033:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'phaseCheck': 0, 'reverseState': 0, 'outputLimit': 121}}
2024-12-07 10:08:08,293:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'inputLimit': 0, 'acMode': 1, 'gridStandard': 0}}
2024-12-07 10:08:08,473:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'inverseMaxPower': 1200, 'chargingMode': 2, 'energyPower': 0}}
2024-12-07 10:08:08,654:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'lampSwitch': 1, 'BatVolt': 0, 'clusterSw': 0}}
2024-12-07 10:08:08,914:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'autoModel': 0, 'gridOffMode': 0, 'localState': 0}}
2024-12-07 10:08:09,133:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'acconnect': 1}, 'packData': [{'power': 0, 'socLevel': 48, 'sn': '<serialN>'}]}
2024-12-07 10:08:09,313:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {}, 'packData': [{'state': 0, 'maxTemp': 2801, 'totalVol': 4910, 'sn': '<serialN>'}]}
2024-12-07 10:08:09,521:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {}, 'packData': [{'maxVol': 327, 'minVol': 327, 'softVersion': 4113, 'sn': '<serialN>'}]}
2024-12-07 10:08:09,753:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {}, 'packData': [{'power': 0, 'socLevel': 50, 'state': 0, 'sn': '<serialN>'}]}
2024-12-07 10:08:09,954:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {}, 'packData': [{'maxTemp': 2801, 'totalVol': 4920, 'maxVol': 328, 'sn': '<serialN>'}]}
2024-12-07 10:08:10,193:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {}, 'packData': [{'minVol': 327, 'softVersion': 4113, 'sn': '<serialN>'}]}
2024-12-07 10:08:10,374:INFO: {'method': 'getInfo-rsp', 'deviceId': '<deviceId>', 'deviceSn': '<serialN>', 'firmwares': [{'type': 'MASTER', 'version': 8465}, {'type': 'BMS', 'version': -1}, {'type': 'BMS_AB2000', 'version': 4113}, {'type': 'AC', 'version': 8453}]}
2024-12-07 10:08:10,374:INFO: The SF device ID is: <deviceId>
2024-12-07 10:08:10,375:INFO: The SF device SN is: <serialN>
2024-12-07 10:08:10,494:INFO: {'method': 'getInfo-rsp', 'deviceId': '<deviceId>', 'deviceSn': '<serialN>', 'firmwares': [{'type': 'PLC_CCO', 'version': 12556}, {'type': 'PLC_STA', 'version': 12556}]}
2024-12-07 10:08:10,495:INFO: The SF device ID is: <deviceId>
2024-12-07 10:08:10,495:INFO: The SF device SN is: <serialN>
2024-12-07 10:08:49,100:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'electricLevel': 49}}
2024-12-07 10:09:49,919:INFO: {'method': 'report', 'deviceId': '<deviceId>', 'properties': {'electricLevel': 49}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants