Welcome everybody,
I would like to ask if anyone can help me with this problem. I start by saying I’m a bit new to the home assistant world and I’d like to understand how it works, but I’m missing some details from the official guide.
I try to explain my problem. On the netatmo denveloper site there is the possibility of sending instructions by sending curl commands to the home thermostats (via login), to set them in various ways.
I have the complete string to send in the curl command, but I don’t know how to insert it in the home assistant.
I would like to create a button(helpers), so that when I press it it sends this string to the thermostat.
end. The problem that I don’t know where to write this string curl…
Yes,
i tried to use the netatmo integration, but i get errors when i go to use the devices. basically I can only read them.
i read all the guide for the restful command but i don’t understand how to do it. if i send the string through terminal with curl command, it works fine.
thanks
I write this because I search online for something and I arrived at this point. but doesn’t work. anything succeed… I think I need to send a curl command…
‘’’
rest_command:
my_request:
url: https://api.netatmo.com/api/setstate
method: POST
headers:
authorization: Bearer 123456
accept: “application/json”
payload: ‘{“home”:{“id”:“6102d03ca2fdf66640410c26”,“rooms”:[{“id”:“4133547889”,“therm_setpoint_mode”:“manual”,“therm_setpoint_temperature”:25}]}}’
content_type: ‘application/json’
Yes, but if I write this command “shell_command:
call_remote: curl -X POST “https://api.netatmo.com/api/setstate” -H “accept: application/json” -H “Authorization: Bearer 610180d3bb250e48711f6a14|15ee83a0f7fad07bd1b966edda1c2170” -H “Content-Type: application/json” -d “{“home”:{“id”:“6102d03ca2fdf66640410c26”,“rooms”:[{“id”:“4133547889”,“therm_setpoint_mode”:“manual”,“therm_setpoint_temperature”:20}]}}””
the verify of configuration i recive an error “Error loading /config/configuration.yaml: mapping values are not allowed here”
what can i do?
Your rest command can be tested from a button or from the call-service panel in the dev-tools. The results will show inside the homeassistant logs. When I tried your code, I got a 403 permission denied from netatmo.
Also: Please don’t post authorization tokens on the forum
You will need to put single-quotes around the curl command.
sorry for post a token on the forum. Right now i put the single-quote around the command and thats is ok, but i can found any file about homessistant log. where i found a log file? i use Studio core editor for write in the configuration file.
i found it, but i don’t have any message of log about shell command… nothing. but i can understand if the command works fine on my application about Control Home on my phone. if i try from netatmo site that’s work. here not.
if you want to help maybe is better to read here, Netatmo Connect | Legrand API Documentation
for example i don’t know where i found my o2auth to inser in application credential on home assistant for netatmo integration
Sorry, I don’t have any experience with oauth inside the restful components.
Actually, I was under the impression that you wanted to directly connect to the the thermostats locally, without the cloud app.