Custom Component: ABB/Power-One/FIMER PV Inverters - SunSpec Modbus TCP

I’ve tried various scenarios and that 40000 is illegal data address for anything I try. BTW I’ve tried to run that scanner tool somewhere above in this chain to scan for slave ID and it seems it doesn’t matter at all. Every ID from 0 to 255 is returning data for 0x04 function and throws errors for anything else. I think protocol is different.
I asked Fimer to provide register map yesterday.

so probably that specific card is translating in a different way. let me know about the register map file they give you so I can check it.

in the worst case scenario, you could always buy a VSN300 card…it’s not expensive. but I hope we can make this work.

I know - it’s not too expensive but what really expensive is installation of it using certified installer who did that 3.5 years ago to keep warranty intact. They are not selling ABB/Fimer products anymore and sometimes really struggling to answer my questions. Probably anything is possible for proper amount of cash :slight_smile:

You don’t need the installer. It’s really easy to install, you put it in the slot, and you close the lid, that’s it. It took 5m of work (mainly unscrewing the screws of the lid), really. :slight_smile:

1 Like

Buonasera,

i’ve recently installed this great component on my venv based HA to run a PVI-3.0-OUTD (VSN300). I’ve used for several years the native modbus component and decided to give your component a try. I’m using the attached configuration and everything works like a charm but sometimes the device goes offline and I got no sensor reading. It happens every 1/2 days and the only way to make it work again is through the configuration panel. I simply open it, click on “Invia” and sensor data appears by magic. Unfortunately I got no log data but I’ll try to add some more info. Thank you and complimenti !


Ciao Antonello,

I recommend you implement the solution I proposed in this post.

Basically, it is based on the connectivity of the VSN300: when the VSN300 is online it means the inverter woke up (sunrise plus some minutes), and the automation will enable the integration. When the VSN300 goes offline (sunset) it will disable the integration.

This should prevent your integration going offline and also prevent spamming in the logs.

In the future, I will restructure the integration so this won’t be necessary, but until that version is ready, this is a good workaround.

I’m also thinking about creating an integration that pulls data directly through REST calls and parsing JSON response of the VSN300, so to bypass completely ModBus. Would you be interested in helping me test it when I start working on it?

Hi.

Installation is easy - I know, but warranty things are the most complicated part. If you touch something yourself, you loose official support.

Another thing, that fimer has no time or mood to answer my requests regarding register map :frowning:

Anyway, thanks for your effort to help me :+1:

Installing the card does not void the warranty, otherwise they wouldn’t sell it to public but just to resellers.

Ciao Alex,

had lot’s of stuff those months and quite no free time :frowning:
This is the output, seems it can’t login, i’m sure user/pw are corrects since i never changed them for the local connection (Admin/00000000).

python3 vsnx00-monitor.py -c vsnx00-monitor.cfg -v
2023-07-05 14:37:50,580 - root - INFO - STARTING VSNX00 data capture
2023-07-05 14:37:50,580 - root - INFO - Capturing live data from ABB VSNX00 logger
2023-07-05 14:37:50,583 - __main__ - INFO - Getting VSNX00 data from: http://192.168.178.105/v1/status
2023-07-05 14:37:50,729 - __main__ - ERROR - HTTP Error 401: Unauthorized
2023-07-05 14:37:50,729 - root - WARNING - No sys_data received from VSNX00 logger. Exiting.
2023-07-05 14:37:50,729 - root - ERROR - Error capturing data. Exiting...
None

F.

What kind of authentication does VSN700 support? I implemented it through basic authentication. Does it need an auth token header? Since you configured it in Node-Red, could you tell me a little about it so I can adapt it…thanks. :slight_smile:

Also, for the vsn300 I’m fetching the urls /v1/status and /v1/feeds. Are these correct also for VSN700?

I updated the python code, if you can do another test just to check if at least basic auth is good it would be awesome, thank you. :slight_smile:

Ciao Alex,
I have a React2 Inverter, the logger should be an embedded VSN700, ATM I’m using Federico Node flow, to grab the JSON the flow uses an http get funciont, with basic auth. See screenshot (I created a dedicated user “reader” for the integration)

I tried your python script and I also get

HTTP Error 401: Unauthorized

the strange thing is I also get an error if I use wget the same error:

--2023-07-23 15:42:55--  http://reader:*password*@192.168.1.102/v1/livedata
Connecting to 192.168.1.102:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Unknown authentication scheme.

Obviously the Node Red flow is wotking correctly…

I see that the url used in NR is /livedata. Is that the only URL used in the flow?

It’s really strange…if I can make the script work also for VS700, I could switch the component to local REST and avoid modbus entirely, so it would work for ALL inverters (but only ones with the VSNx00, not the others).

Yes the flow Federico made grabs the livedata URL, get a json from that url then it’s parsed.
It seems the 401 error code is related to how the auth is done by the client, or so it appears from the first googled pages I’ve seen.

you should try with curl with basic authentication. maybe the problem with my script is that I’m using different URLs, I will modify that for the VSN700 and let you know so you can test it again.

Can you tell me all the URLs called by the flow? Only one?

I already tried bot curl and wget,

curl -u reader:*password* 192.168.1.102/v1/livedata
<html>
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>nginx</center>
</body>
</html>

same as wget

wget --post-data 'username=reader&password=*password*' 192.168.1.102/v1/status
--2023-07-23 19:28:51--  http://192.168.1.102/v1/status
Connecting to 192.168.1.102:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.

and

wget http://reader:*password*@192.168.1.102/v1/
--2023-07-23 19:29:38--  http://reader:*password*@192.168.1.102/v1/
Connecting to 192.168.1.102:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-07-23 19:29:38 ERROR 404: Not Found.
wget -v --user=reader --password=*password* http://192.168.1.102/v1/livedata
--2023-07-23 19:30:49--  http://192.168.1.102/v1/livedata
Connecting to 192.168.1.102:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
**Unknown authentication scheme.**

Username/Password Authentication Failed.

Sorry the /livedata is the only URL grabbed,

BTW this is the JSON grabbed from my REACT2 inverter (5KW + 2 batery pack)

{"116407-3N52-4820":{"device_id":"116407-3N52-4820","device_type":"meter","timestamp":"2023-07-23T19:35:10+0200","points":[{"name":"DynamicFeedInCtrl","value":0},{"name":"HouseIgrid_L1","value":5.601223468780518},{"name":"HouseIgrid_L2","value":0},{"name":"HouseIgrid_L3","value":0},{"name":"HousePgrid_L1","value":1306.4853515625},{"name":"HousePgrid_L2","value":0},{"name":"HousePgrid_L3","value":0},{"name":"HousePgrid_Tot","value":1306.4853515625},{"name":"HousePInverter","value":1302.29541015625},{"name":"MeterVgrid_L1","value":233.25},{"name":"MeterVgrid_L2","value":0},{"name":"MeterVgrid_L3","value":0},{"name":"MeterIgrid_L1","value":1.1740000247955322},{"name":"MeterIgrid_L2","value":0},{"name":"MeterIgrid_L3","value":0},{"name":"MeterPgrid_L1","value":-4.840000152587891},{"name":"MeterPgrid_L2","value":0},{"name":"MeterPgrid_L3","value":0},{"name":"MeterPgrid_Tot","value":-4.840000152587891},{"name":"MeterQgrid_L1","value":229.0399932861328},{"name":"MeterQgrid_L2","value":0},{"name":"MeterQgrid_L3","value":0},{"name":"MeterQgrid_Tot","value":229.0399932861328},{"name":"MeterFgrid","value":49.97999954223633},{"name":"CommissioningFreeze","value":0},{"name":"E3_runtime","value":12740},{"name":"E3_7D","value":49389},{"name":"E3_30D","value":303196},{"name":"E6_runtime","value":17021},{"name":"E6_7D","value":182428},{"name":"E6_30D","value":671270},{"name":"E7_runtime","value":17125},{"name":"E7_7D","value":189724},{"name":"E7_30D","value":689863},{"name":"E8_runtime","value":104},{"name":"E8_7D","value":7296},{"name":"E8_30D","value":18593},{"name":"EGridImport","value":4950797},{"name":"EGridExport","value":5737009}]},"116839-3P72-3921":{"device_id":"116839-3P72-3921","device_type":"battery","timestamp":"2023-07-23T19:35:10+0200","points":[{"name":"BattNum","value":2},{"name":"Iba","value":2.2443361282348633},{"name":"Vba","value":217.27772521972656},{"name":"Pba","value":484.95208740234375},{"name":"Tba","value":38.52122116088867},{"name":"Soc","value":88},{"name":"VcMax","value":3.88100004196167},{"name":"VcMin","value":3.868000030517578},{"name":"TcMax","value":28},{"name":"TcMin","value":26},{"name":"Soh","value":99},{"name":"ShU","value":1689912064},{"name":"PCh","value":1801},{"name":"PDh","value":2193},{"name":"Chc","value":37647632},{"name":"Dhc","value":79406424},{"name":"Fcc","value":19.3439998626709},{"name":"ECt","value":1415847},{"name":"EDt","value":1322501},{"name":"EDischarge_runtime","value":1354},{"name":"EDischarge_7D","value":24536},{"name":"EDischarge_30D","value":76606},{"name":"EDischarge","value":1302485},{"name":"ECharge_runtime","value":2467},{"name":"ECharge_7D","value":27131},{"name":"ECharge_30D","value":82051},{"name":"ECharge","value":1405610},{"name":"CycleNum","value":330}]},"116846-3P72-3921":{"device_id":"116846-3P72-3921","device_type":"battery","timestamp":"2023-07-23T19:35:10+0200","points":[{"name":"BattNum","value":1},{"name":"Iba","value":2.2299740314483643},{"name":"Vba","value":217.8938446044922},{"name":"Pba","value":483.9391174316406},{"name":"Tba","value":38.89822769165039},{"name":"Soc","value":90},{"name":"VcMax","value":3.8949999809265137},{"name":"VcMin","value":3.880000114440918},{"name":"TcMax","value":29},{"name":"TcMin","value":27},{"name":"Soh","value":99},{"name":"ShU","value":1689910656},{"name":"PCh","value":1780},{"name":"PDh","value":2187},{"name":"Chc","value":38148916},{"name":"Dhc","value":79077592},{"name":"Fcc","value":19.363000869750977},{"name":"ECt","value":1439126},{"name":"EDt","value":1345062},{"name":"EDischarge_runtime","value":1351},{"name":"EDischarge_7D","value":22567},{"name":"EDischarge_30D","value":73702},{"name":"EDischarge","value":1295037},{"name":"ECharge_runtime","value":3144},{"name":"ECharge_7D","value":28087},{"name":"ECharge_30D","value":92800},{"name":"ECharge","value":1433134},{"name":"CycleNum","value":336}]},"123668-3P81-3821":{"device_id":"123668-3P81-3821","device_type":"inverter_1phase","device_model":"REACT2-5.0-TL","timestamp":"2023-07-23T19:35:10+0200","points":[{"name":"CountryStd","value":105},{"name":"InputMode","value":0},{"name":"NumOfMPPT","value":2},{"name":"WRtg","value":5050},{"name":"Iin1","value":0.8225939869880676},{"name":"Vin1","value":211.29721069335938},{"name":"Pin1","value":178.12869262695312},{"name":"Iin2","value":0.8267641067504883},{"name":"Vin2","value":211.90716552734375},{"name":"Pin2","value":179.6626739501953},{"name":"Pin","value":356.544189453125},{"name":"Igrid","value":5.558561325073242},{"name":"Pgrid","value":1302.29541015625},{"name":"Vgrid","value":233.72845458984375},{"name":"Qgrid","value":-4.951894283294678},{"name":"Fgrid","value":49.99858474731445},{"name":"Ppeak","value":5069.39013671875},{"name":"cosPhi","value":1},{"name":"SplitPhase","value":0},{"name":"VgridL1_N","value":117.19483947753906},{"name":"VgridL2_N","value":117.68635559082031},{"name":"PacTogrid","value":1301.5526123046875},{"name":"PacStandAlone","value":0},{"name":"Temp1","value":33.6927490234375},{"name":"TempInv","value":44.23076629638672},{"name":"TempBst","value":40.12656021118164},{"name":"VBulk","value":360.9821472167969},{"name":"VBulkMid","value":176.839599609375},{"name":"Riso","value":20},{"name":"IleakInv","value":5874.58935546875},{"name":"IleakDC","value":6047.556640625},{"name":"Vgnd","value":253.16268920898438},{"name":"SysTime","value":743456064},{"name":"GlobState","value":6},{"name":"AlarmState","value":0},{"name":"DC1State","value":2},{"name":"DC2State","value":2},{"name":"InvState","value":2},{"name":"WarningFlags","value":64},{"name":"PACDeratingFlags","value":0},{"name":"QACDeratingFlags","value":0},{"name":"SACDeratingFlags","value":0},{"name":"FRT_state","value":0},{"name":"ClockState","value":0},{"name":"m126Mod_Ena","value":0},{"name":"m132Mod_Ena","value":0},{"name":"Fan1rpm","value":0},{"name":"Fan2rpm","value":0},{"name":"E0_runtime","value":29761},{"name":"E0_7D","value":231817},{"name":"E0_30D","value":974466},{"name":"E0_1Y","value":7717689},{"name":"E1_runtime","value":9},{"name":"E1_7D","value":74},{"name":"E1_30D","value":273},{"name":"E2_runtime","value":29774},{"name":"E2_7D","value":231911},{"name":"E2_30D","value":974914},{"name":"E4_runtime","value":16869},{"name":"E4_7D","value":125524},{"name":"E4_30D","value":520242},{"name":"E5_runtime","value":16833},{"name":"E5_7D","value":123001},{"name":"E5_30D","value":510760},{"name":"E15_runtime","value":0},{"name":"E15_7D","value":0},{"name":"E15_30D","value":0},{"name":"Ein_runtime","value":33702},{"name":"Ein_7D","value":248525},{"name":"Ein_30D","value":1031002},{"name":"Ein","value":14058527},{"name":"ETotal","value":13253545},{"name":"ETotalAbsorbed","value":6080},{"name":"ETotalApparent","value":13262826},{"name":"Ein1","value":7124024},{"name":"Ein2","value":6934503},{"name":"EBackup","value":0},{"name":"DetectedBatteryNumber","value":2},{"name":"PbaT","value":968.8912353515625},{"name":"TSoc","value":89},{"name":"EnergyPolicy","value":1},{"name":"BatteryMode","value":0},{"name":"ETotDischarge_runtime","value":2705},{"name":"ETotDischarge_7D","value":47103},{"name":"ETotDischarge_30D","value":150308},{"name":"ETotCharge_runtime","value":5611},{"name":"ETotCharge_7D","value":55218},{"name":"ETotCharge_30D","value":174851},{"name":"DI0_mode","value":2},{"name":"DI1_mode","value":1},{"name":"DI_status","value":3},{"name":"gridExtCtrlState","value":1},{"name":"gridExtCtrlEna","value":0},{"name":"BattExtCtrlState","value":1},{"name":"BattExtCtrlEna","value":0}]},"----":{"device_id":"----","timestamp":"2023-07-23T19:35:04+0200","points":[]}}

Can you try like this:

curl -u username:password --verbose -i -H 'Accept:application/json' http://example.com

Nope:

curl -v -u reader:*password* -i -H 'Accept:application/json' http://192.168.1.102/v1/livedata
*   Trying 192.168.1.102:80...
* Connected to 192.168.1.102 (192.168.1.102) port 80 (#0)
* Server auth using Basic with user 'reader'
> GET /v1/livedata HTTP/1.1
> Host: 192.168.1.102
> Authorization: Basic cmVhZGVyOnJlYWRlcg==
> User-Agent: curl/7.81.0
> Accept:application/json
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 401 Unauthorized
HTTP/1.1 401 Unauthorized
< Server: nginx
Server: nginx
< Date: Sun, 23 Jul 2023 17:41:45 GMT
Date: Sun, 23 Jul 2023 17:41:45 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 172
Content-Length: 172
< Connection: keep-alive
Connection: keep-alive

< 
<html>
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host 192.168.1.102 left intact

Try this:

curl -u username:password --anyauth --verbose -i -H 'Accept:application/json' http://example.com