Open IS512 opened 5 years ago
I'm sorry but I'm missing too much informations to help you.
Where does your server.on("/set", HTTP_POST, handleLogin);
line comes from?
What programming language are you using?
What HTTP framework are you using?
And... uh... why is your function named 'handleLogin' ?
Hey, sorry I thought i was raising an issue for a specific file.
It's the arduino example, I think the arduino side of things is correct but I did just find that Igor mentions modifying a JSON file in another issue. I can't find exactly what he's refrencing.
Oh, my bad.
I've never noticed that this function was named as such.
This Arduino sketch is from Igor.
Sorry, I'm not very familiar with it...
Sorry to ping you, @IgorFX, but if you know what this brave fellow is talking about it would be very nice.
Hi Nicnl
Got it working, I was over thinking it
Instead of '"set_target_position_url": "http://192.168.1.55/set/%position%",'
needs to be'"set_target_position_url": "http://192.168.1.55/set?pers=%position%",'
Hello I edited the sketch. Added comments for config.json
Hello
I've been modifying this code to work with your home bridge plugin. I have modified the current state and current position but cannot get /set working at all
Is this correct for this line?
server.on("/set", HTTP_POST, handleLogin); //Position from Homebridge
and for server.arg(???) what has to be in place for this part??
`void handleLogin() { pers = server.arg("pers"); // Get persentage of position string
int persent = pers.toInt();`
I'm guessing this function 'void handleLogin()' is correct to receive http://x.x.x.x/set/0->100 from the home bridge??