Http Response not receiving data

#1

Trying to get data out of a linux based system with web server, everything works except this which just puts up the requesting flag and nothing else happens. Node red 17 running on pi3b on a private network.
[{“id”:“12a2a2a5.d1e2fd”,“type”:“inject”,“z”:“382a936f.ff404c”,“name”:“make request”,“topic”:"",“payload”:"",“payloadType”:“date”,“repeat”:"",“crontab”:"",“once”:false,“x”:150,“y”:140,“wires”:[[“42027504.8b570c”]]},{“id”:“42027504.8b570c”,“type”:“http request”,“z”:“382a936f.ff404c”,“name”:"",“method”:“GET”,“ret”:“obj”,“url”:“http://10.0.0.120/bms/streamstate.php/",“tls”:"",“x”:230,“y”:260,“wires”:[[“888fd147.9bcd3”]]},{“id”:“888fd147.9bcd3”,“type”:“debug”,“z”:“382a936f.ff404c”,“name”:"",“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“true”,“x”:410,“y”:260,"wires”:[]}]

The response is a object in Json format. Works if typed into a web browser, even chromium on the pi3b.
I also have it working on a arduino using GET method.
In the above flow i get valid response to the ip address, and with /bms/. I also get a response to /bms/streamstate albeit invalid request as expected. But add .php to the GET request and nothing…no response.
I tried an external web address with .php in it and that works.
As stated, the GET method works in Chrome, Chromium (in same pi3b as Nose-red) and on Arduino.
Any suggestions please.

[ANNOUNCE] node-red-contrib-sse-client
#2

Try it without the trailing / after .php

#3

Have tried without then without that trailing /.
I don’t know if it is significant, but the returned is sent repetitively every 1 or 2 seconds once you send the initial GET.

#4

I have done a bit more experimentation. I have also tried it on a QIOT package on a QNAP NAS (has a cut down Node-Red) with similar results to PI3B.

I have two other .php files on this web server that run in the same directory and they return a Valid response (but response is a single object (no repeats) with only two parameters)

I tried an invalid .php file and get an appropriate Error 404 Not Found response.

So what is different between the .php that works and the one that appears to hang. I see two

  1. IN the non working GET, The response (as seen in a browser) is a repeating response with a new object every Second or so.

  2. The Response starts with a newline then Data: before the first { of the Object. The working .Php response starts with the opening { of the object (as far as I can see in Chrome).

surely a response that starts with a space should stop Node Red (HTTP Request) from recognizing a response to a GET

or

Is Node Red (HTTP Request) waiting for all data to be sent which as this is a ‘stream’ will go on for ever, whilst I want it to receive and process it Object as it is received.

I do not think it is the length of response (about 500 ASCII characters) of the, seen Node Red handle much larger Web pages

Puzzled and having difficulty see what is happening in Node Red.

Thanks for those reading this

#5

I suspect that a leading space is not valid JSON but that’s just a guess. If the response MIME type is JSON though, this might be the problem.

Long time since I used PHP but I remember well that rogue spaces or newlines in responses were a major issue. If it is your PHP, getting rid of the space might well fix the issue.

#6

Afraid it is not my .php so can’t chang it, but that might be invalid Json, but should not stop the node “http request” receiving the string and showing it.
Anyway I can see what is going out and back on the pi3b (raspian) Ethernet?

#7

what happens if you change the HTTP equest node to return ‘a UTF-8 string’?

#8

Same response, it the node just hangs waiting for a response.

#9

Morning Ian,

I see that you are talking about an endless stream. Don’t think you can get that done with the httprequest node. As you already mentioned, the httprequest node will keep appending the receive data until the end:

            res.on('data',function(chunk) {
                ...
                msg.payload.push(chunk);   --> Storing the received data
            });
            res.on('end',function() {
                ...
                msg.payload = Buffer.concat(msg.payload); ---> Appending all the received data
                ...
                node.send(msg);
            });

And indeed the ‘end’ is never received. Or it is received (e.g. by closing the connection), but then you end up with a pile of data that you cannot use …

That is the reason why I wanted to added multipart streaming to the httprequest node last year (see info in this pull request). However due to practical reasons, I ended up creating my own contribution for http streaming: node-red-contrib-multipart-stream-decoder.

Please let me know if this one works for your stream.

Kind regards,
Bart Butenaers

#10

Thanks for that Bart, I will try that.
I have just been using TCPdump to compare the ethernet traffic for NodeRed with Chromium (on Pi3B) and a notable difference is the Chromium GET request sets “connection : keep-alive” whilst NodeRed GET sets “connection : close” . Chromium appears to set all .php and http request to “connection : keep-alive” as far as I can see.

So a few check boxes in Http-Request node setting for connection might help assuming it can handle several response (one per second) to a single GET request.

#11

Ian,

wasn’t aware about the keep-alive in the request. I have also created a node-red-contrib-multipart-stream-encoder, which does the opposite as the decoder: when a request arrives in Node-Red for an endless stream, it sets up the stream. One of the requirements to accomplish that, was setting the keep-alive in the response (not in the request like you mention)…

Not sure whether I have interpreted “assuming it can handle several response (one per second) to a single GET request” correctly? The chunks that arrive are only an (incomplete) part of a single response. E.g. when you do a http request for an image from your IP camera:

  1. Send 1 http request to the camera
  2. N data chunks will arrive in the httprequest node
  3. Those N data chunks will be appended = complete http response
  4. The content of the http response will be send in an output message

So a single image will be transmitted as N data chunks. So the httprequest node will not get multiple responses (as far as I know), but it will only receive multiple chunks.

If you want to get an endless stream of responses (for a single http request) , you will need to use the multipart decoding. That node repeats step 2-3-4 as long as the stream connection stays open …

Bart

#12

I will try that node in the morning. I suspect the “connection” setting is a red herring as I can see the responses in tcpdump output for both a chromium sourced GET and a Node sourced GET.

The server in both cases provides a 200 response with out payload (the object which is 500 characters), and then every second there is a response that has no headers but because of its length must have a payload, but tcpdump doesn’t show it (need to see if there is another switch to enable).

Will work on it in the morning.

Ian

#13

Well, I have set up @BartButenaers multi part Stream Decoder which did not work in this case…but does work a bit more than http-request. It does not hang as if waiting for a response, but does report an error
“A multipart stream should start with content-type containing ‘multipart’” with a red flag on the node when triggered.
But it does receive and pass on the 200 status Code message header from the webserver and a blank Payload (contains just a (which is what the Webserver supplies.
The Node does not pass on any of the subsequent ‘messages’ with the object sent at one second intervals from the webserver.
If there is no fix for this, I will have to resort to plan B, and use an Arduino to receive the Objects (this works), extract the JSON object and use MQTT to publish it into my network through Mosquito, From where Node Red can receive it for breakup and action on the parts (I can progress and get that working at least). If later HTTP Request is fixed for this type of ‘stream’ request, then it should be a quick substitution of the MQTT-in node for new HTTP-Request node.

Thanks .

#14

Hi Ian,

I’m not a http streaming expert, since I have only been implementing multipart streams (which is supported by all IP camera’s). A multipart stream starts with ‘general’ http headers in the response, which should have a.o. "Content-Type: multipart/…". Since that http header is mandatory in the protocol, the node checks and requires it! So I assume you are dealing with some other kind of streaming. Don’t know …

If you can make your stream public (e.g. port forwarding on your router), I can have a look at it if you want. But no guarantees that I can find a solution. And no SLA’s about the timing, because I’m rather short on spare time :wink: You can send the (temporary) public URL/username/password to my bart.butenaers account on gmail.com.

P.S. Does anybody know a way to share this kind of secret information via this Discourse forum ?

Bart

#15

You can send someone a direct message by clicking on their username and then the ‘Message’ button. Where that ends up, I honest don’t know as I’ve not done it before.

#16

“Secret” being a relative term here I would think. The data will be stored in clear text on the server used to host this forum.

If you really need it to be Secret, pre-encrypt using 7zip or whatever with AES256 encryption and send the password via a different channel.

#17

Or use a separate node.js microservice.

#18

I have been looking closer are the TCP traffic on the pi3 hosting NodeRed. At this level the behaviour looks very similar to the Chromium browser interrogating the same url. Notable is that the TCP appears to acknoweldge the 200 response to the initial GET request, and every subsequent delivery of a Object. Yet the HTTP Request Node appears to hang so I suspect that is a bug, but it would be nice in a future NODE-Red update that it can handle ‘streams’ , that is it delivers to the output of the Node, each package of data received.

If it helps, I have attached an extract of the dump from TCPDump (I have only included the first two blocks of data). The text in Bold is my interpretation

I assume this is establishing the connection between client (NodeRed on Pi3 @10.0.0.230 and the Server on Linux @ 10.0.0.120)
09:01:45.380662 IP (tos 0x0, ttl 64, id 53321, offset 0, flags [DF], proto TCP (6), length 60)
10.0.0.230.49494 > 10.0.0.120.http: Flags [S], cksum 0x158c (incorrect -> 0x96e8), seq 2407892063, win 29200, options [mss 1460,sackOK,TS val 545814 ecr 0,nop,wscale 7], length 0
0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 …B…’.l@K…E.
0x0010: 003c d049 4000 4006 5515 0a00 00e6 0a00 .<.I@.@.U…
0x0020: 0078 c156 0050 8f85 845f 0000 0000 a002 .x.V.P…
0x0030: 7210 158c 0000 0204 05b4 0402 080a 0008 r…
0x0040: 5416 0000 0000 0103 0307 T…
09:01:45.381464 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
10.0.0.120.http > 10.0.0.230.49494: Flags [S.], cksum 0xcea2 (correct), seq 4146853035, ack 2407892064, win 14480, options [mss 1460,sackOK,TS val 529878 ecr 545814,nop,wscale 6], length 0
0x0000: b827 eb6c 404b 0019 b801 4289 0800 4500 .’.l@K…B…E.
0x0010: 003c 0000 4000 4006 255f 0a00 0078 0a00 .<…@.@.%
…x…
0x0020: 00e6 0050 c156 f72b f4ab 8f85 8460 a012 …P.V.+….. 0x0030: 3890 cea2 0000 0204 05b4 0402 080a 0008 8............... 0x0040: 15d6 0008 5416 0103 0306 ....T..... 09:01:45.381778 IP (tos 0x0, ttl 64, id 53322, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.230.49494 > 10.0.0.120.http: Flags [.], cksum 0x1584 (incorrect -> 0x3518), seq 1, ack 1, win 229, options [nop,nop,TS val 545815 ecr 529878], length 0 0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 ....B..'.l@K..E. 0x0010: 0034 d04a 4000 4006 551c 0a00 00e6 0a00 .4.J@.@.U....... 0x0020: 0078 c156 0050 8f85 8460 f72b f4ac 8010 .x.V.P....+…
0x0030: 00e5 1584 0000 0101 080a 0008 5417 0008 …T…
0x0040: 15d6 …
The Client requesting data from Server
09:01:45.391478 IP (tos 0x0, ttl 64, id 53323, offset 0, flags [DF], proto TCP (6), length 126)
10.0.0.230.49494 > 10.0.0.120.http: Flags [P.], cksum 0x15ce (incorrect -> 0xa1ae), seq 1:75, ack 1, win 229, options [nop,nop,TS val 545816 ecr 529878], length 74: HTTP, length: 74
GET /bms/streamstate.php HTTP/1.1
Host: 10.0.0.120
Connection: close

    0x0000:  0019 b801 4289 b827 eb6c 404b 0800 4500  ....B..'.l@K..E.
    0x0010:  007e d04b 4000 4006 54d1 0a00 00e6 0a00  .~.K@.@.T.......
    0x0020:  0078 c156 0050 8f85 8460 f72b f4ac 8018  .x.V.P...`.+....
    0x0030:  00e5 15ce 0000 0101 080a 0008 5418 0008  ............T...
    0x0040:  15d6 4745 5420 2f62 6d73 2f73 7472 6561  ..GET./bms/strea
    0x0050:  6d73 7461 7465 2e70 6870 2048 5454 502f  mstate.php.HTTP/
    0x0060:  312e 310d 0a48 6f73 743a 2031 302e 302e  1.1..Host:.10.0.
    0x0070:  302e 3132 300d 0a43 6f6e 6e65 6374 696f  0.120..Connectio
    0x0080:  6e3a 2063 6c6f 7365 0d0a 0d0a            n:.close....

09:01:45.392214 IP (tos 0x0, ttl 64, id 57723, offset 0, flags [DF], proto TCP (6), length 52)
10.0.0.120.http > 10.0.0.230.49494: Flags [.], cksum 0x34ce (correct), seq 1, ack 75, win 227, options [nop,nop,TS val 529879 ecr 545816], length 0
0x0000: b827 eb6c 404b 0019 b801 4289 0800 4500 .’.l@K…B…E.
0x0010: 0034 e17b 4000 4006 43eb 0a00 0078 0a00 .4.{@.@.C…x…
0x0020: 00e6 0050 c156 f72b f4ac 8f85 84aa 8010 …P.V.+…
0x0030: 00e3 34ce 0000 0101 080a 0008 15d7 0008 …4…
0x0040: 5418 T.
Server 200 acknowledgement of the GET, NB there is no Data with the Ack but it does inform it will be text/event-stream
09:01:45.393749 IP (tos 0x0, ttl 64, id 57724, offset 0, flags [DF], proto TCP (6), length 338)
10.0.0.120.http > 10.0.0.230.49494: Flags [P.], cksum 0x3b0d (correct), seq 1:287, ack 75, win 227, options [nop,nop,TS val 529879 ecr 545816], length 286: HTTP, length: 286
HTTP/1.1 200 OK
Date: Mon, 04 Jun 2018 23:01:46 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.9
Cache-Control: no-cache, must-revalidate
Expires: Sat, 26 Jul 1997 05:00:00 GMT
Content-Length: 1000000000
Connection: close
Content-Type: text/event-stream

    0x0000:  b827 eb6c 404b 0019 b801 4289 0800 4500  .'.l@K....B...E.
    0x0010:  0152 e17c 4000 4006 42cc 0a00 0078 0a00  .R.|@.@.B....x..
    0x0020:  00e6 0050 c156 f72b f4ac 8f85 84aa 8018  ...P.V.+........
    0x0030:  00e3 3b0d 0000 0101 080a 0008 15d7 0008  ..;.............
    0x0040:  5418 4854 5450 2f31 2e31 2032 3030 204f  T.HTTP/1.1.200.O
    0x0050:  4b0d 0a44 6174 653a 204d 6f6e 2c20 3034  K..Date:.Mon,.04
    0x0060:  204a 756e 2032 3031 3820 3233 3a30 313a  .Jun.2018.23:01:
    0x0070:  3436 2047 4d54 0d0a 5365 7276 6572 3a20  46.GMT..Server:.
    0x0080:  4170 6163 6865 2f32 2e34 2e37 2028 5562  Apache/2.4.7.(Ub
    0x0090:  756e 7475 290d 0a58 2d50 6f77 6572 6564  untu)..X-Powered
    0x00a0:  2d42 793a 2050 4850 2f35 2e35 2e39 2d31  -By:.PHP/5.5.9-1
    0x00b0:  7562 756e 7475 342e 390d 0a43 6163 6865  ubuntu4.9..Cache
    0x00c0:  2d43 6f6e 7472 6f6c 3a20 6e6f 2d63 6163  -Control:.no-cac
    0x00d0:  6865 2c20 6d75 7374 2d72 6576 616c 6964  he,.must-revalid
    0x00e0:  6174 650d 0a45 7870 6972 6573 3a20 5361  ate..Expires:.Sa
    0x00f0:  742c 2032 3620 4a75 6c20 3139 3937 2030  t,.26.Jul.1997.0
    0x0100:  353a 3030 3a30 3020 474d 540d 0a43 6f6e  5:00:00.GMT..Con
    0x0110:  7465 6e74 2d4c 656e 6774 683a 2031 3030  tent-Length:.100
    0x0120:  3030 3030 3030 300d 0a43 6f6e 6e65 6374  0000000..Connect
    0x0130:  696f 6e3a 2063 6c6f 7365 0d0a 436f 6e74  ion:.close..Cont
    0x0140:  656e 742d 5479 7065 3a20 7465 7874 2f65  ent-Type:.text/e
    0x0150:  7665 6e74 2d73 7472 6561 6d0d 0a0d 0a0a  vent-stream.....

09:01:45.394011 IP (tos 0x0, ttl 64, id 53324, offset 0, flags [DF], proto TCP (6), length 52)
10.0.0.230.49494 > 10.0.0.120.http: Flags [.], cksum 0x1584 (incorrect -> 0x33a6), seq 75, ack 287, win 237, options [nop,nop,TS val 545816 ecr 529879], length 0
0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 …B…’.l@K…E.
0x0010: 0034 d04c 4000 4006 551a 0a00 00e6 0a00 .4.L@.@.U…
0x0020: 0078 c156 0050 8f85 84aa f72b f5ca 8010 .x.V.P…+…
0x0030: 00ed 1584 0000 0101 080a 0008 5418 0008 …T…
0x0040: 15d7 …
The first data block from the Server to Client (data starts with data: so is not correct JSON format, but that can be fixed once I have it in NodeRed)
09:01:45.756732 IP (tos 0x0, ttl 64, id 46495, offset 0, flags [DF], proto TCP (6), length 653)
10.0.0.120.http > 10.0.0.230.49488: Flags [P.], cksum 0x1451 (correct), seq 2688096208:2688096809, ack 1388210686, win 243, options [nop,nop,TS val 529915 ecr 545523], length 601: HTTP
0x0000: b827 eb6c 404b 0019 b801 4289 0800 4500 .’.l@K…B…E.
0x0010: 028d b59f 4000 4006 6d6e 0a00 0078 0a00 …@.@.mn…x…
0x0020: 00e6 0050 c150 a039 17d0 52be 69fe 8018 …P.P.9…R.i…
0x0030: 00f3 1451 0000 0101 080a 0008 15fb 0008 …Q…
0x0040: 52f3 6461 7461 3a20 7b22 7379 7374 656d R.data:.{“system
0x0050: 5f70 6d72 223a 2031 312e 3735 3033 3939 _pmr”:.11.750399
0x0060: 3939 3939 3939 3939 392c 2022 7063 5f73 999999999,.“pc_s
0x0070: 7973 7465 6d5f 7374 6174 655f 6f66 5f63 ystem_state_of_c
0x0080: 6861 7267 6522 3a20 342e 3337 3138 3430 harge”:.4.371840
0x0090: 3935 3832 3837 3432 312c 2022 7379 7374 958287421,.“syst
0x00a0: 656d 5f74 656d 7065 7261 7475 7265 223a em_temperature”:
0x00b0: 2031 382e 3931 3636 3636 3636 3636 3636 .18.916666666666
0x00c0: 3636 382c 2022 7379 7374 656d 5f76 6d72 668,.“system_vmr
0x00d0: 223a 2035 372e 362c 2022 7379 7374 656d “:.57.6,.“system
0x00e0: 5f69 6d72 223a 2032 3034 2e30 2c20 2273 imr":.204.0,.“s
0x00f0: 7973 7465 6d5f 706f 7765 7222 3a20 302e ystem_power”:.0.
0x0100: 3237 3833 3233 3534 3230 3030 3030 3030 2783235420000000
0x0110: 332c 2022 7379 7374 656d 5f67 726f 756e 3,.“system_groun
0x0120: 645f 6661 756c 745f 766f 6c74 6167 6522 d_fault_voltage”
0x0130: 3a20 302e 302c 2022 7379 7374 656d 5f63 :.0.0,.“system_c
0x0140: 7572 7265 6e74 223a 2035 2e37 3839 3030 urrent”:.5.78900
0x0150: 3030 3030 3030 3030 3031 2c20 2265 7374 0000000001,.“est
0x0160: 6f70 5f65 6e61 626c 6564 223a 2074 7275 op_enabled”:.tru
0x0170: 652c 2022 7379 7374 656d 5f62 6174 7465 e,.“system_batte
0x0180: 7279 5f76 6f6c 7461 6765 223a 2034 382e ry_voltage”:.48.
0x0190: 3037 382c 2022 7379 7374 656d 5f72 6174 078,.“system_rat
0x01a0: 6564 5f65 6e65 7267 7922 3a20 3330 2e30 ed_energy”:.30.0
0x01b0: 2c20 2273 7973 7465 6d5f 696d 6422 3a20 ,.“system_imd”:.
0x01c0: 2d31 3430 2e37 3639 3833 3134 3939 3436 -140.76983149946
0x01d0: 3438 392c 2022 7379 7374 656d 5f66 6175 489,.“system_fau
0x01e0: 6c74 5f63 6f64 6573 223a 2030 2c20 2273 lt_codes”:.0,.“s
0x01f0: 7973 7465 6d5f 766d 6422 3a20 3338 2e30 ystem_vmd”:.38.0
0x0200: 2c20 2273 7973 7465 6d5f 7374 6174 655f ,."system_state

0x0210: 6f66 5f68 6561 6c74 6822 3a20 3932 2e39 of_health”:.92.9
0x0220: 3334 3736 3934 3130 3931 3434 372c 2022 3476941091447,.”
0x0230: 7379 7374 656d 5f70 6d64 223a 202d 362e system_pmd”:.-6.
0x0240: 3730 3333 3536 3837 3031 3036 3136 312c 703356870106161,
0x0250: 2022 7379 7374 656d 5f73 7461 7465 5f6f .“system_state_o
0x0260: 665f 6368 6172 6765 223a 2032 312e 3338 f_charge”:.21.38
0x0270: 3132 3334 3935 3038 3431 3236 342c 2022 1234950841264,."
0x0280: 7379 7374 656d 5f77 6172 6e69 6e67 5f63 system_warning_c
0x0290: 6f64 6573 223a 2030 7d0a 0a odes":.0}…
The response from the client (TCP), note that it acknowledges it [.] at this level so the server will deliver the next block in 3 seconds
09:01:45.756897 IP (tos 0x0, ttl 64, id 7588, offset 0, flags [DF], proto TCP (6), length 52)
10.0.0.230.49488 > 10.0.0.120.http: Flags [.], cksum 0x1584 (incorrect -> 0xb92d), seq 1, ack 601, win 1323, options [nop,nop,TS val 545852 ecr 529915], length 0
0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 …B…’.l@K…E.
0x0010: 0034 1da4 4000 4006 07c3 0a00 00e6 0a00 .4…@.@…
0x0020: 0078 c150 0050 52be 69fe a039 1a29 8010 .x.P.PR.i…9.)…
0x0030: 052b 1584 0000 0101 080a 0008 543c 0008 .+…T<…
0x0040: 15fb …
The next periodic block of data, this continues on with more blocks I have not copied here
09:01:46.661738 IP (tos 0x0, ttl 64, id 57725, offset 0, flags [DF], proto TCP (6), length 631)
10.0.0.120.http > 10.0.0.230.49494: Flags [P.], cksum 0x85a8 (correct), seq 287:866, ack 75, win 227, options [nop,nop,TS val 530006 ecr 545816], length 579: HTTP
0x0000: b827 eb6c 404b 0019 b801 4289 0800 4500 .’.l@K…B…E.
0x0010: 0277 e17d 4000 4006 41a6 0a00 0078 0a00 .w.}@.@.A…x…
0x0020: 00e6 0050 c156 f72b f5ca 8f85 84aa 8018 …P.V.+…
0x0030: 00e3 85a8 0000 0101 080a 0008 1656 0008 …V…
0x0040: 5418 6461 7461 3a20 7b22 7379 7374 656d T.data:.{“system
0x0050: 5f70 6d72 223a 2031 312e 3735 3033 3939 pmr":.11.750399
0x0060: 3939 3939 3939 3939 392c 2022 7063 5f73 999999999,.“pc_s
0x0070: 7973 7465 6d5f 7374 6174 655f 6f66 5f63 ystem_state_of_c
0x0080: 6861 7267 6522 3a20 342e 3337 3331 3033 harge”:.4.373103
0x0090: 3030 3637 3335 3538 3035 2c20 2273 7973 0067355805,.“sys
0x00a0: 7465 6d5f 7465 6d70 6572 6174 7572 6522 tem_temperature”
0x00b0: 3a20 3138 2e39 3339 3939 3939 3939 3939 :.18.93999999999
0x00c0: 3939 3938 2c20 2273 7973 7465 6d5f 766d 9998,.“system_vm
0x00d0: 7222 3a20 3537 2e36 2c20 2273 7973 7465 r”:.57.6,.“syste
0x00e0: 6d5f 696d 7222 3a20 3230 342e 302c 2022 m_imr”:.204.0,."
0x00f0: 7379 7374 656d 5f70 6f77 6572 223a 2030 system_power":.0
0x0100: 2e32 3934 3935 3739 362c 2022 7379 7374 .29495796,."syst
0x0110: 656d 5f67 726f 756e 645f 6661 756c 745f em_ground_fault

0x0120: 766f 6c74 6167 6522 3a20 302e 302c 2022 voltage”:.0.0,."
0x0130: 7379 7374 656d 5f63 7572 7265 6e74 223a system_current":
0x0140: 2036 2e31 3232 2c20 2265 7374 6f70 5f65 .6.122,.“estop_e
0x0150: 6e61 626c 6564 223a 2074 7275 652c 2022 nabled”:.true,."
0x0160: 7379 7374 656d 5f62 6174 7465 7279 5f76 system_battery_v
0x0170: 6f6c 7461 6765 223a 2034 382e 3138 2c20 oltage":.48.18,.
0x0180: 2273 7973 7465 6d5f 7261 7465 645f 656e “system_rated_en
0x0190: 6572 6779 223a 2033 302e 302c 2022 7379 ergy”:.30.0,.“sy
0x01a0: 7374 656d 5f69 6d64 223a 202d 3134 302e stem_imd”:.-140.
0x01b0: 3737 3438 3136 3837 3438 3938 3638 2c20 77481687489868,.
0x01c0: 2273 7973 7465 6d5f 6661 756c 745f 636f “system_fault_co
0x01d0: 6465 7322 3a20 302c 2022 7379 7374 656d des”:.0,.“system
0x01e0: 5f76 6d64 223a 2033 382e 302c 2022 7379 _vmd”:.38.0,.“sy
0x01f0: 7374 656d 5f73 7461 7465 5f6f 665f 6865 stem_state_of_he
0x0200: 616c 7468 223a 2039 322e 3933 3437 3639 alth”:.92.934769
0x0210: 3431 3039 3134 3437 2c20 2273 7973 7465 41091447,.“syste
0x0220: 6d5f 706d 6422 3a20 2d36 2e37 3033 3634 m_pmd”:.-6.70364
0x0230: 3232 3237 3433 3338 3336 2c20 2273 7973 2227433836,.“sys
0x0240: 7465 6d5f 7374 6174 655f 6f66 5f63 6861 tem_state_of_cha
0x0250: 7267 6522 3a20 3231 2e33 3831 3732 3034 rge”:.21.3817204
0x0260: 3035 3139 3535 312c 2022 7379 7374 656d 0519551,.“system
0x0270: 5f77 6172 6e69 6e67 5f63 6f64 6573 223a _warning_codes”:
0x0280: 2030 7d0a 0a .0}…
09:01:46.662056 IP (tos 0x0, ttl 64, id 53325, offset 0, flags [DF], proto TCP (6), length 52)
10.0.0.230.49494 > 10.0.0.120.http: Flags [.], cksum 0x1584 (incorrect -> 0x305c), seq 75, ack 866, win 246, options [nop,nop,TS val 545943 ecr 530006], length 0
0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 …B…’.l@K…E.
0x0010: 0034 d04d 4000 4006 5519 0a00 00e6 0a00 .4.M@.@.U…
0x0020: 0078 c156 0050 8f85 84aa f72b f80d 8010 .x.V.P…+…
0x0030: 00f6 1584 0000 0101 080a 0008 5497 0008 …T…
0x0040: 1656 .V

#19

[/quote]

Or use a separate node.js microservice.
[/quote]

Thanks Julian, but as I am a newby to NodeRed and Java script. Although programming in JS is not a issue (I am a z80 assembler and Pascal programmer of old, with recent C++ and Arduino experience), the struggle usually is finding or working out what functions/methods/object are in the environment that allow me to access hardware/ OS specifics like the Ethernet port or TCP/IP handler.
Once I find that then yes a Node.js microservice would be good (and I can reclaim the hardware thus used), for the moment Arduino solution I know will work (already received, and MQTT already working).
A pointer to a similar implementation (Node.js microservice accessing TCP/IP port) would help.

#20

Thanks Nick, but I can’t see a Message button, maybe because I am a newbie on this forum I don’t have access.
PS, thanks for PubSub, it is the core of MQTT access on my Arduino based things.