In the past, when updating HA sensor values, etc I have been sending HE device info to a php page on a Raspberry PI.
URL example: xxx.xxx.x.180/Dev/setHASensor.php?entity=sensor.sensor_name&fname=what_ever&unit=c&icon=icon-type&state=25
This PHP page convert this info into the properly formatted CURL statement such as:
Has worked this way for years but I want to get rid of the PI and send this HE info directly to HA preferably though a RM Send POST I can not for the likes of me get this to work. How would I include this long HA token in such POST?
I have tried to create this rule without the token and by adding username and password (i.e http://username:password@192......) but HA keeps throwing an authentication error.
I am out of ideas and looking for help. Much appreciated in advance.
Let's see a screenshot of your rule machine rule; the "action" part where you are defining the http post request (blur out any personal info). Also, are you receiving any errors on the hubitat side (for the rule) when sending the request?
Well that's just it. I dont even know where to begin with RM send POST. The only options I have is URL and Body. I know for the Token to be passed the POST request needs a HEADER option.
In the URL field I have: http://192.168.1.190:8123/api/states/sensor.ecowitt_ch2_backyard_temp
In the BODY field I have: "state": "45" ,"attributes": {"unit_of_measurement": "c", "icon": "mdi:thermometer","friendly_name": "xxxxxxxxxxxxx"
The integration HA -> HE actually works pretty good but, for most part, its a one way street. In the case of temperature sensors I can not update HA with HE data.
I use both the HA maker api integration for HE -> HA and Home Assistant Device Bridge for HA -> HE. they both work well, till matter makes this unnecessary.