Hi,
there are several scripts around to read out a Solarmax inverter, no integration in HA though so far.
I was using a Spacelynk Controller from Schneider with a lua script and am now switching over to HA.
It’s still early stage: Install node-red for HA and create a flow to periodically send a TCP-request to the inverter, parse the response and update a state using a hass-post-node. Example flow below.
The query strings contain a checksum, which is some work to generate. In the node you find example queries, you can just go with one of them. In the ‘decode’ node there’s a list of query, status and error codes. Just send a query string to the inverter and observe what is coming back. Then extract what you need from the response and send it to HA. node-red has the advante of being able to debug every step of the flow.
best, Valentin
[{"id":"42a5d63b.36e0c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"c72dd8a6a98f5a10","type":"tcp request","z":"42a5d63b.36e0c","server":"192.168.8.222","port":"12345","out":"time","ret":"string","splitc":"1000","name":"Solarmax","x":300,"y":220,"wires":[["ea88b20808b4d104","8ee586d73de7eb03"]]},{"id":"b460e626df5316ec","type":"inject","z":"42a5d63b.36e0c","name":"","props":[{"p":"payload"}],"repeat":"600","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{FB;01;36|64:PAC;KLD;KLM;IL1;KDY;KMT;KLY;KT0;ADR|0cff}","payloadType":"str","x":120,"y":220,"wires":[["c72dd8a6a98f5a10"]]},{"id":"ea88b20808b4d104","type":"debug","z":"42a5d63b.36e0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":490,"y":120,"wires":[]},{"id":"8ee586d73de7eb03","type":"function","z":"42a5d63b.36e0c","name":"decode","func":"/*\n\nFollowing info is not JavaScript yet, just for informational purposes.\nThe query codes are:\n\nquery_codes = {\n [\"ADR\"] = '', -- Device Address (z.B. 1)\n [\"BDN\"] = '', -- ???\n [\"CAC\"] = '', -- ???\n [\"DDY\"] = '', -- Date day\n [\"DIN\"] = '', -- ???\n [\"DMT\"] = '', -- Date month\n [\"DD00\"] = '', -- date,total watt,peak watt,houres sunshine , all on day base\n [\"DM05\"] = '', -- DM05 ansers : idem on month base\n [\"DYR\"] = '', -- Date year\n [\"E11\"] = '', -- Error 1, number\n [\"E1D\"] = '', -- Error 1, day\n [\"E1h\"] = '', -- Error 1, hour\n [\"E1m\"] = '', -- Error 1, minute\n [\"E1M\"] = '', -- Error 1, month\n [\"E21\"] = '', -- Error 2, number\n [\"E2D\"] = '', -- Error 2, day\n [\"E2h\"] = '', -- Error 2, hour\n [\"E2m\"] = '', -- Error 2, minute\n [\"E2M\"] = '', -- Error 2, month\n [\"E31\"] = '', -- Error 3, number\n [\"E3D\"] = '', -- Error 3, day\n [\"E3h\"] = '', -- Error 3, hour\n [\"E3m\"] = '', -- Error 3, minute\n [\"E3M\"] = '', -- Error 3, month\n [\"FDAT\"] = ' ', -- ???\n [\"IDC\"] = 'dc_current', -- DC Current (mA)\n [\"IL1\"] = 'current_phase1', -- current phase 1 (mA)\n [\"KDY\"] = '', -- Energy today (Wh)\n [\"KHR\"] = '', -- Operating hours\n [\"KLD\"] = '', -- Energy yesterday (Wh)\n [\"KLM\"] = '', -- Energy last month (kWh)\n [\"KLY\"] = '', -- Energy last year (kWh)\n [\"KMT\"] = '', -- Energy this month (kWh)\n [\"KT0\"] = 'total_yield', -- total yield (kWh)\n [\"KYR\"] = '', -- Energy this year (kWh)\n [\"LAN\"] = '', -- Language (1)\n [\"MAC\"] = '', -- ???\n [\"PAC\"] = 'power_output', -- AC power being generated * 2 (W)\n [\"PIN\"] = '', -- ???\n [\"PRL\"] = 'relative_ouput', -- relative output (%)\n [\"SAL\"] = '', -- ???\n [\"SDAT\"] = '', -- ???\n [\"SWV\"] = 'Software Version', -- Software Version\n [\"SYS\"] = 'sys', -- 4E28 = 17128\n [\"THR\"] = '', -- Time Hours\n [\"TKK\"] = 'inverter_temp', -- inverter operating temp\n [\"TMI\"] = '', -- Time Minutes\n [\"TNF\"] = 'frequency', -- generated frequency (Hz)\n [\"TYP\"] = '', -- ???\n [\"UDC\"] = 'dc_voltage', -- DC voltage (mV)\n [\"UL1\"] = 'voltage_phase1', -- AC Voltage Phase 1 (mV)\n}\n\n status_codes = {\n 20000: 'No Communication',\n 20001: 'Running',\n 20002: 'Not enough solar radiation',\n 20003: 'Starting up',\n 20004: 'Running with MPP',\n 20005: 'Fan running',\n 20006: 'Running on max power',\n 20007: 'Temperature limit reached',\n 20008: 'Connected to grid',\n }\n\n alarm_codes = {\n 0: 'No error',\n 1: 'External error 1',\n 2: 'Isolation error DC side',\n 4: 'Residual current to ground',\n 8: 'Fuse break to star point',\n 16: 'External alarm 2',\n 32: 'Long time temperature limit reached',\n 64: 'Error AC connection',\n 128: 'External alarm 4',\n 256: 'Fan defect',\n 512: 'Fuse break',\n 1024: 'Failure temperature sensor',\n 2048: 'Alarm 12',\n 4096: 'Alarm 13',\n 8192: 'Alarm 14',\n 16384: 'Alarm 15',\n 32768: 'Alarm 16',\n 65536: 'Alarm 17',\n }\n\nExamples:\nQueries:\nquery = \"{FB;01;32|64:PAC;IL1;KDY;KDL;KYR;KLY;KMT;KT0|2943}\"\nquery = \"{FB;01;4E|64:E1D;E11;E1h;E1m;E1M;E2D;E21;E2h;E2m;E2M;E3D;E31;E3h;E3m;E3M|126C}\"\nquery = \"{FB;01;3E|64:IDC;UL1;TKK;IL1;SYS;TNF;UDC;PAC;PRL;KT0;SYS|0F66}\\n\"\nExample answer of inverter:\n{01;FB;62|64:UL1=8DA;TKK=24;IL1=19B;SYS=4E28,0;TNF=1387;PAC=1690;PRL=10;KT0=1096F;SYS=4E28,0|16C0}\n\nThe response values of the inverter can be extracted from the response string using regular expressions.\n\n*/\n\n// Example: Extract PAC, AC Power\nvar code = \"PAC\";\nconst pattern1 = new RegExp(code + \"=(.*?);\");\nconst pattern2 = new RegExp(code + \"=(.*?)|\");\nvar found = msg.payload.match(pattern1);\n\nreturn { payload: { state: parseInt(found[1],16) } };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":220,"wires":[["16b44c0756d8d413","31e17bd387bc14f5"]]},{"id":"16b44c0756d8d413","type":"debug","z":"42a5d63b.36e0c","name":"Power","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":690,"y":120,"wires":[]},{"id":"31e17bd387bc14f5","type":"hass-post","z":"42a5d63b.36e0c","endpoint":"6e4958c82c66dfe6","entityid":"sensor.solar_actual_power","name":"sensor.solar_actual_power","x":760,"y":220,"wires":[]},{"id":"6e4958c82c66dfe6","type":"hass-config","host":"http://192.168.8.12","port":"8123"}]