Getting machine output lines printed in page on ip:port into Nodred

Hi Guys,

For my consulting job I was at an interesting company yesterday where they are trying to reverse engineer the 'communication channel' of a wire EDM machine.

They were pretty limited in their abilities programming wise, so suggested to look into Node-Red as it looked like it would fit their use case perfectly.

Now I am thinking about it and want to help them a little to get up and running.

He showed me what he has so far.. that was an IP:Port in the browser where there were like around 10 lines printed per second (TIMESTAMP) (TYPE) (DETAILS OF THIS TYPE OPERATION like x-y location)

I thought about it and not really sure how to pipe this machine output into node red, as a message per printed line. A http get would make me have to set a grab of the page and this will result me in having the complete page every time I guess.. what node/approach would I use to get tis into Node-Red, is there something like a http streaming input?

Also want to say I love this project and community, really feels like the old days of the internet where people are friendly and helpfull :slight_smile:

First thing is to look at the page and work out how the updates are coming through. That will define how to wire things up.

1 Like

Yes I agree, but they are 2 hours out so can't open dev tools now haha! Was hoping there was some experience or that this was an standard protocol or something. Since it didn't look like a webpage, but just printing lines per timestamp/command output

Will definitely have a closer look if I am on site again.

Yes, there are at least 3 "standard" options I can think of.

  1. It is a simple web page with an auto-reload
  2. It is a web page with JavaScript that grabs the updated data in the background
  3. It is a web page with JavaScript that uses websockets
  4. It is an http2 service that uses push.

My guess would be that option 2 would be most likely. But that means that you still need the pages html and javascript so that you can work out what Node-RED needs to connect to. There may, of course, also be some security such as a token or cookie.

Thank you!

Feel dumb I didn't check closer but was there to get other stuff done.

Definitely looked like it would pipe easy into node red the way it printed per line with timestamping.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.