Receiving data via incoming HTTP GET / POST request

Hello everybody, it’s my first post here!

I’m switching from another home automation soft and I’m stuck at a problem.

I have a device that can only send his data via an HTTP request.
So, in the config of this device, I put :
http://LAN_ADDRESS_OF_OLD_SERVER:80/api.php?apikey=XXXXX&sensorID=42&sensorValue1=“My output string 1”&sensorValue2=“My second output string”

I read the documentation about REST and other similar topics but in my case it’s the opposite, it’s the device that has to send a request containing its data to home assistant server.

Is it possible ? Otherwise I will be obliged to keep my old server and use it to receive the HTTP request and send the data to home assistant via my MQTT broker, very wobbly and slow solution.

Thank you all and have a great day!
RatonLaveur

You can do POST’s with https://www.home-assistant.io/integrations/api/

Hey, did you get anywhere with this? I’ve got a similar use case…

Yeah I’m on the same problem. I send data and I want to use it. Right now I am using an automation that is triggered on a state change to then send MQTT. That MQTT then has a sensor defined. There must be a better way!

Really I just want to receive and parse json and treat the parsed json key/values as sensor entities. Seems simple…

https://community.home-assistant.io/t/received-sensor-json-values-updating-other-sensors/306321/2

1 Like

I agree and would also like to see home assistant have better handling of “virtual” sensors. Hoping for improvement!

Try PyScript from HACS. With this integration you are able to create persistent states & sensors.