Internet friends, do any of you have a Fronius Gen24 series solar inverter on the same network as a Linux computer?

EDIT: Thanks everyone, I've got a few solid samples back now! Much appreciated

If so, could I trouble you to please run the following two commands and send me back the output?

avahi-browse -rv _Fronius-SE-Inverter._tcp

avahi-browse -rv _Fronius-SE-SmartMeter._tcp

(If you've not got the "Smart Meter" addon then the second command might not do anything, not to worry if so.)

Is all in the aid of reverse engineering for interoperability. If what I'm trying to do works then it'll be open sourced. 💪

Boosts for reach appreciated!

@projectgus does it help if it's a Fronius Primo inverter, or you only need for Gen24 ?
@fvichot Thanks, I appreciate it - I also have a Primo and they use a proprietary discovery protocol instead of mDNS. Looks like only the latest range have firmware with mDNS.
@fvichot (proprietary discovery protocol sounds scary but it's actually way simpler than mDNS, lol!)
@projectgus intrigued to see what you're up to, good luck !
@projectgus @fvichot mdns is simple if you ignore all the complicated parts 😂
@projectgus I have a Gen24 and just installed avahi on a Linux VM. I don’t see anything back from either of those commands and there’s nothing vaguely Fronius looking in “avahi-browse -a” either?
@projectgus Fwiw: Web interface is showing as Symo GEN24
10.0 GEN24 Software Version 1.38.7-1
@projectgus Looks like it takes a while to advertise. Just the Inverter so far, no SmartMeter yet: https://pastebin.com/W99tb4JM
$ avahi-browse -rv _Fronius-SE-Inverter._tcpServer version: avahi 0.8; Host na - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Pastebin

@spudly Amazing, thank you! It's that big blob of pseudo-JSON in the txt record that I was hoping to get a sample of.

It's possible not all of them advertise the SmartMeter service, I don't really know

@spudly huh, I just managed to notice that somehow the response cuts "Manufacturer" in half (some at the top and some near the end.)

So maybe this isn't pseudo-JSON but actually longer JSON that's been somehow mangled by Avahi, lol.

(Anyway, that's not your problem! Thanks again)

@projectgus @spudly I'm hopefully getting a Gen24 next month or so

@spudly I worked out why the JSON looks mangled. It's cursed:

DNS-SD TXT records are optionally KEY=VALUE pairs. But Fronius want to pack a JSON object in there instead for some reason, and there's a length limit on each TXT record.

So the format Fronius picked for TXT records is:

00={<first part of JSON blob>
01=<second part of JSON blob>}\n

avahi-resolve reasonably prints the TXT records in an arbitrary order, which is why it looks like the output got mangled. 😆

@projectgus @spudly add a constraint and someone always finds a shitty workaround for it.
@projectgus I've got a Gen24, but not a Linux computer at the moment, just macOS. Let me know if I can still help somehow.

@layoutSubviews Hey, thanks! I think the equivalent for MacOS is first "dns-sd -B _Fronius-SE-Inverter._tcp" which will resolve the service to its instance name(s) and then "dns-sd -L <name> _Fronius-SE-Inverter._tcp" which will (I think) list some info including any TXT records associated with the service, which is the info I'm trying to find out.

@spudly kindly sent me some linux output already, but it does look like either the inverter or avahi-resolve tool is corrupting the TXT string - so if you were feeling generous I'd be very interested to see if you can get anything back!

@projectgus @spudly Will do when I'm home later today!
@projectgus are you trying direct access over tcp instead of going through tcp + modbus ?

@deepfryed Not exactly. We have a fronius wattpilot EV charger, which polls the web API of the Fronius inverter to do solar charging and also to prevent tripping the main breaker if the grid draw is too high.

We're about to get a different solar setup installed. So I want to make a little server that presents power data from home assistant as if it was a fronius inverter, enough to keep the wattpilot happy.

Our inverter is old so it uses their simple UDP broadcast discovery system, but I thought I might have a crack at implementing mDNS instead. But all I knew was what mDNS services the wattpilot sends queries for, and that's not enough for it to show up.

@projectgus I don't have an EV, but I have a mixed battery household. Old powerwall and new sigen, I have setup home assistant to monitor grid use and balance the battery charging appropriately in the 3hr free window so total draw doesn't exceed 58A. Can't you control watt pilot from HA, invert responsibility ?

Nevertheless, interesting "middleware" to work on.

@deepfryed Probably possible, but the controls that way seem a bit clunky compared to how it works now. Will see though, that might end up being the way.
@projectgus here my avahi-browse output:
E Ifce Prot Name Type Domain
+ enp0s25 IPv4 Fronius Symo GEN24 6.0 Plus _Fronius-SE-Inverter._tcp local
= enp0s25 IPv4 Fronius Symo GEN24 6.0 Plus _Fronius-SE-Inverter._tcp local
hostname = [fronius.local]
address = [192.168.1.164]
port = [80]
txt = ["01=anedo9\"},\"MPPT\":[{\"MPPT_ID\":1,\"Wattpeak\":5250},{\"MPPT_ID\":2,\"Wattpeak\":1500}],\"Network\":{\"PrimaryNetworkInterface\":\"eth0\"}},\"ZeroconfMetaVersion\":\"1.0\"}\010" "00={\"DeviceMeta\":{\"Device-Information\":{\"ArticleNumber\":\"4,210,153,002\",\"CommonName\":\"pilot-0.6a-1155245686794290397_1651567800\",\"DeviceGroup\":\"S10RW\",\"DeviceSerialNumber\":\"33147067\",\"NominalPower\":\"6000\",\"SoftwareBundleVersion\":\"1.34.6-1\",\"Systemname\":\"c" "FSEI-DID=V 1|P JSON|PFC 2"]
: Cache exhausted
: All for now