Communicating with other RPi apps

Hello. New to HA development. I have another app running on my RPi that I want my HA sensor integration to communicate with. Specifically, this app is picking up data from an external server using a protocol, and I would like to make this data available to the HA sensor. What I have come up with is to have this app store the data in a CSV file that gets updated, then have the HA sensor pick it up when it changes. Is there another easier/better way to do this? I have HA running in a container on the RPi.
FYI, the other app is an OpenADR VEN (virtual end node). It seems to be better not to include this in the HA integration, but I suppose you could do it that way.

Any help would be appreciated!

MQTT works well

Can you tell me more, how would I use MQTT here? I’m sorry I’ve never heard of it.

Not sure, but surely there is a api? Or you can get this via ssh?

No, this is a standalone python app that doesn’t have any built-in interfaces. That’s why I was thinking that I could have it just write out what it receives to a file. As I read more about MQTT, maybe that would not be too hard. It looks like there is a python MQTT package on github. I’m reading up about how to use it in the HA docs. Maybe that would work. I assume though that any HA integration could just do file IO, right?

yes
but I believe mqtt would be cleaner/better method

The server end has a REST api according to their docs.

Have to ask: how do you know what it outputs. It must have some output to the user!

This is just a bare bones app that implements the OpenADR message set. When it receives something it just puts it in a XML structure. Nothing is done with it. I will be using it in conjunction with an integration similar to this:

Instead of getting the prices from a REST type interface, I’ll be getting them from this OpenADR VEN app… Hope that makes sense. I have to add the interfacing to the VEN app to pass the prices it receives somehow to the HA integration.

Here is an example of an OpenADR VEN:
https://openleadr.org/docs/client.html

So you want to read an xml file?

The HA integration could read the XML file I guess. The OpenADR messages are XML. The OpenADR virtual end node (client) on the RPi is polling the virtual top node (server) that is sending prices. The OpenADR messages are all XML. When the virtual end node receives a message from the VTN, I need to parse the XML to get the prices and send that to the HA integration. I think that would be a sensor similar to that ComEd hourly pricing integration…

Thanks for getting back to me. I think I’ve decided that the OpenADR functionality can be put into the HA integration itself. So no real need to communicate with another app.

Have you got two accounts?

Hi not sure what you mean. Do you mean two accounts on here?

Yes that’s what I mean.