Good Afternoon
I'm attempting to control a home automation system (SimpleControl) via HTTP JSON.
I would like to have a wall panel by the light switches in each room which would have six buttons e.g. TV ON, Volume UP, Volume DOWN, Mute etc. I already have the JSON commands sorted and working from "Simple REST Client" in Google chrome. I have network cable everywhere in the house with PoE so using Arduino with PoE ethernet Shield
What I need to know now is how to get a JSON command statically linked to a particular button.
I don't need the Arduino to get any info as it would all be included in the sketch. The SimpleControl doesn't have any security tokens etc.
Examples;
- When you press button ONE which is a HIGH/LOW on Digital 2, the JSON command is sent relating to that button. The below is the working command from Simple REST Client for starting an activity;
URL - http://192.168.1.11:47147/api/v1/runactivity
Method - POST
Data - {"activity_uuid" : "B3BE9EB5-2771-4FE8-ADD1-A3140B6E01A6" } - Button TWO is on Digital 3.
URL - http://192.168.1.11:47147/api/v1/sendcommands
Method - POST
Data - {"commands":[ { "type" : "command", "params" : { "command" : "CURSOR ENTER" , "device" : "BC5918A0-2B18-4922-82A4-D7CBDA406606" }}] }
This would then be repeated for the additional activities or commands for up to 6 buttons.
I have got the Arduino on the network and done a few networking projects but can't find anything relating to a simple button creating the JSON commands.
Any thoughts are welcome.
Thank You