Author Topic: FOSHKPlugin: get data from a nodered flow  (Read 343 times)

0 Members and 1 Guest are viewing this topic.

Offline Khurram

  • Member
  • *
  • Posts: 23
FOSHKPlugin: get data from a nodered flow
« on: May 27, 2023, 01:52:18 PM »
Is it possible to get data into foshkplugin from a nodered flow? The reason I am asking is that my gw1100 already sends the "custom" data to a nodered flow. I would rather not change this setup.

Thanks

Online olicat

  • Forecaster
  • *****
  • Posts: 1520
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3xx0C
    • FOSHKplugin
Re: FOSHKPlugin: get data from a nodered flow
« Reply #1 on: May 27, 2023, 02:35:55 PM »
Hi!

I would advise you to go the other way - FOSHKplugin as a direct target and distribute from there.
However, FOSHKplugin also accepts messages from any source, as long as they are sent in WU-, Ecowitt- or Ambient Weather format.
Can the Nodered flow simply pass the incoming data to FOSHKplugin?

Success!

Oliver

Offline Khurram

  • Member
  • *
  • Posts: 23
Re: FOSHKPlugin: get data from a nodered flow
« Reply #2 on: May 27, 2023, 02:53:03 PM »
I have already configured the nodered  flow to echo the incoming data to a udp port (nodered is running on my Pi). How can I configure foshkplugin in this case? Thanks

Online olicat

  • Forecaster
  • *****
  • Posts: 1520
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3xx0C
    • FOSHKplugin
Re: FOSHKPlugin: get data from a nodered flow
« Reply #3 on: May 27, 2023, 03:00:38 PM »
Hi!

Quote
echo the incoming data to a udp port
Unfortunately, that's not going to work.
Your Nodred-Flow should behave like a "normal" weather station.
FOSHKplugin expects the messages (see above in WU, Ecowitt or Ambient Weather format) via http. In Ecowitt format via http/POST and for WU and AW via http/GET.
Another form of data transfer is not provided so far.
Sorry!

Oliver

Offline Khurram

  • Member
  • *
  • Posts: 23
Re: FOSHKPlugin: get data from a nodered flow
« Reply #4 on: May 27, 2023, 03:48:56 PM »
Can I use a custom port for the http request in foshkplugin?

Online olicat

  • Forecaster
  • *****
  • Posts: 1520
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3xx0C
    • FOSHKplugin
Re: FOSHKPlugin: get data from a nodered flow
« Reply #5 on: May 27, 2023, 05:00:29 PM »
Hi!

Yes, the port to be used in FOSHKplugin is configurable.

Oliver

Online olicat

  • Forecaster
  • *****
  • Posts: 1520
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3xx0C
    • FOSHKplugin
Re: FOSHKPlugin: get data from a nodered flow
« Reply #6 on: May 28, 2023, 04:12:33 AM »
Hi!

As I wrote before, I would strongly recommend you to go the way weather station --> FOSHKplugin --> additional services.

Before setting up FOSHKplugin for the first time, it is recommended to note down the settings of a possibly already configured custom server target, in order to be able to enter these as a forward in FOSHKplugin.
So you open the app WS View Plus, select the corresponding weather station and open the "Weather Services" via "More" in the upper right corner.
There you swipe to the right to the "Customized" settings.
It is best to take a screenshot or note down the values entered there.
Important are:

Customized: Enable/Disable
Protocol Type Same as: Ecowitt/Wunderground
Server IP/Hostname:
Path:
Port:
Upload Interval:

Sample:
 [ You are not allowed to view attachments ]

To set these sample settings as a forward in FOSHKplugin, create the following forward in foshkplugin.conf:

[Forward]
FWD_CMT = original custom server settings
FWD_ENABLE = true
FWD_TYPE = RAWEW
FWD_URL = http://192.168.15.236:8080/data/report/
FWD_INTERVAL = 30

Thus, there should be no major problems to supply the previous target with the data via FOSHKplugin instead of directly from the weather station.
And you gain the option to add several more forwards to various services.
If, contrary to expectations, problems should occur, you can always go back to the source thanks to the screenshot or the otherwise "remembered" settings.

Oliver

Offline Khurram

  • Member
  • *
  • Posts: 23
Re: FOSHKPlugin: get data from a nodered flow
« Reply #7 on: May 28, 2023, 05:28:56 AM »
Hi!

As I wrote before, I would strongly recommend you to go the way weather station --> FOSHKplugin --> additional services.
.....
Oliver

I believe that this may be the only way to go as I cannot create an http endpoint in nodered on a different port. Thanks for the detailed instructions.

Khurram

Offline Khurram

  • Member
  • *
  • Posts: 23
Re: FOSHKPlugin: get data from a nodered flow
« Reply #8 on: May 28, 2023, 09:22:47 AM »
I have configured foshkplugin as in olicat's post above and my nodered flow is receiving data properly. However I am unable to see the data in PWT. I have configured it for udp listener 12340. My pi shows its listening at this port as well. Is this config not correct?

Online olicat

  • Forecaster
  • *****
  • Posts: 1520
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3xx0C
    • FOSHKplugin
Re: FOSHKPlugin: get data from a nodered flow
« Reply #9 on: May 28, 2023, 11:50:56 AM »
Hi!

You have to configure FOSHKplugin to send the data via UDP:

Code: [Select]
[Forward-46]
FWD_TYPE = RAWUDP                  # EWUDP should also work
FWD_URL = 192.168.15.255:12350     # use broadcast address:port and configure PWT to the same UDP port
FWD_CMT = send the Ecowitt stream via UDP broadcast to multiple PWT instances to broadcastaddress:port

Have a look here.

Oliver

Offline Khurram

  • Member
  • *
  • Posts: 23
Re: FOSHKPlugin: get data from a nodered flow
« Reply #10 on: May 28, 2023, 12:10:53 PM »
Hi!

You have to configure FOSHKplugin to send the data via UDP:

Code: [Select]
[Forward-46]
FWD_TYPE = RAWUDP                        # EWUDP should also work
FWD_URL = 192.168.15.255:12350     # use broadcast address:port and configure PWT to the same UDP port
FWD_CMT = send the Ecowitt stream via UDP broadcast to multiple PWT instances to broadcastaddress:port

Have a look here.

Oliver

Thanks, this worked perfectly  [tup]

Khurram

 

anything