rlindner / node-red-contrib-sma-webconnect

Node-RED node to query the web interface of SMA inverters
MIT License
13 stars 9 forks source link

Behaviour Anomalies, ETIMEDOUT, EHOSTUNREACH #8

Closed WombatHollow closed 7 months ago

WombatHollow commented 4 years ago

I have been trying (of and on over last 6 months) this Node to connect to my two SB3000TL-21 Solar inverters with no luck so far. I am connecting over speedwire over my home Network with the inverters having fixed IP 10.0.0.124 and 10.0.0.125. They do connect to Sunny Portal, and I have finally just managed to get them connected using SBFSpot.

Although it may be these SB3000 may not be compatible with this Node, I have noticed a few strange Anomolies that might need attention. They could even provide clues as to my problem.

  1. When you deploy the NODE, in the Debug window you get a single ETIMEDOUT error message, even though there was no trigger input to the Node. I would have expected the Node to do nothing until it is triggered.

  2. Then I trigger the Node (it is sent just a timestamp), I get a short pause, then three Error Messages (with several seconds between (as I would expect from retries). The first and last message is the ETIMEDOUT but the second one is Error: connect EHOSTUNREACH 10.0.0.85:443 or to port :80 if I turn off HTTPS.
    I get the same message for both inverters. I do not know where the Node gets the idea to connect to 10.0.0.85 from. It is within the subnet of my LAN but the address is not used (it is fairly high in the range available to DHCP) so is somewhat a puzzle. A clue is when I was using Node-red V1.0.x I just saw three ETIMEDOUT, I only started to see the EHOSTUNREACH after I upgraded to NR V1.1.2

New Note: Correction re item 2, I found a missing decimal in the IP address (I entered 1.0.0125) and when corrected then we get 3 ETIMEDOUT messages. So there is no format check on IP address and results in this behaviour

Otherwise thanks for the effort to provide connection into SMA Solar inverters. I would have liked to use NR to access the data from SB3000, but for the moment I will go back to SBFSpot as that is working over MQTT (to get data into NR).

rlindner commented 4 years ago

Do you have shell access or any other linux system on the same network to run the following curl command?

curl --insecure 'https://10.0.0.124/dyn/sessionCheck.json' -X 'POST' --data-binary '{}'

For this node to be compatible the inverter should answer with a JSON response like following:

{
  "result": {
    "cntFreeSess": 2,
    "cntDwnLogin": {
      "usr": 0,
      "istl": 0,
      "svc": 0,
      "dvlp": 0
    },
    "typ": [
      {
        "tag": 9348
      }
    ],
    "lng": [
      {
        "tag": 778
      }
    ],
    "InstPwdCh": true,
    "UsrPwdCh": true,
    "smartSess": true
  }
}
HoLo85 commented 4 years ago

The manual of your SB3000TL-21 does not mention a webinterface, so this node should not be compatible with your inverter. I think the speedwire in the node description is a bit misleading because this node only communicates over port 80 or 443 and reads json messages from the units and does not use the speedwire interface or protocol.

For SBFspot you could try using this flow https://forum.iobroker.net/topic/1197/sma-wechselrichter-flow-%C3%BCber-sbfspot as an example on how to read values directly into NR.

WombatHollow commented 4 years ago

Thanks, that document I have seen but only provides detail of the multicast to find devices, no more.

I have SBFspot now working nicely and that get the JSON object for each inverter into Node Red using MQTT every 5 minutes which is usable.

It uses UDP into port 9255 as you said, and using TCPDump you can see every 5 minutes there are about 5 exchanges.  The UDP Packages contained are in hex, with no clear ASCII to help decode.  That might be in the feildbus or modbus documents that may use the same packages.

I also see in Sunny Explorer the SB have a few server built in but not enabled (one I think was TCP   can't check until I reinstall Sunny Explorer as it broke!).

To enable those servers I need installer access which also doesn't work until I go back to SMA to reset it.

Again, thanks for your help.

Get Outlook for Android

On Sat, Aug 15, 2020 at 1:45 AM +1000, "HoLo85" notifications@github.com wrote:

The manual of you SB3000TL-21 does not mention a webinterface, so this node should not be compatible with your it.

I think the speedwire in the node description is a bit misleading because the protocol by default uses port 9522.

https://www.sma.de/fileadmin/content/global/Partner/Documents/sma_developer/SpeedwireDD-TI-en-10.pdf

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.