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 · 14 comments
Open

Support for Zendure Hyper 2000 #272

maxp1256 opened this issue Jul 3, 2024 · 14 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...

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

8 participants