Till new I managed to send commands from HA to EventGhost (pc) and to Tasker (android). But I don’t know how to send a command from PC or Android device, to HA to execute something. Can someone please help me with this?
PLEASE, no IFTTT solution, I want to get rid of this service
I don’t understand much from that link, I forgot to specify that i’m maximum noob I am using HA for one day only. Can you please tell me, if you have time, of course, step by step, what I should to on HA and how can I send command from pc to HA? It will really help me
It is in that link but from PC you can use something like curl from the command line. Call that from whatever you want, batch file, eventghost. There are examples in this link.https://developers.home-assistant.io/docs/api/rest/
I use the RESTask plugin with Tasker to send commands to HA from Android. For example, when I put my phone on to charge after 10pm, send the command to initiate the Bedtime scene. I’ve even made it generic using parameters and variables.
RESTask configuration - Settings
Request type: POST
Host: %HASS_URL/api/services/%par1 (%par1 is the service name passed from calling task such as “scene/turn_on”)
Return code: %rtcode
Response: %rtres
Custom body: %par2 (contains json such as “entity_id”:“scene_bedtime”)
RESTask configuration - Headers
Authorization
Bearer %HASS_Token (contains value of long-lived token)