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.
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?
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.
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.