For the first time it says here that this is concrete ... So, here it goes.
I am doing a small project to link Salesforce with my Raspberry Pi. The goal is to make light (think of a lighthouse, a lilac light) when a high priority event comes in the Salesforce customer service. Currently, customers usually send an email to a specific address, and this creates a case. He goes to the "Unallocated queue" and sends an email to the team in which this case is awaiting appointment.
Salesforce uses REST, so I need Pi to accept JSON so that it can easily understand what Salesforce wants to do.
Currently, I think I have won half the battle. I have a web server (Lighttpd) running on a Pi that contains an index page and a Python script. I also use the Python shell, which allows me to easily run a command from the Telldus program that I installed. This program controls the USB radio transmitter that I connected, it is paired with an RF connector that is connected to a power source with the light connected to it.
So, the Python script is called power.py and can be controlled using URL variables, so if I go to power.py?device=1&power=on&time=10&password=hunter2, which turns on device 1 for 10 seconds. I also created a POST form on the index page, which simply adds POSTS to the python script and runs it the same way as URL variables. This all works great.
So all I have to do is connect it to Salesforce. I would like to use REST and JSON, so if I ever switch from Salesforce to another CRM program, it can easily adapt and get instructions from new places.
I published a Python script that I use here:
https://github.com/7ewis/RemotePiControl/blob/master/power.py
Currently Pi is not allowed from the local network, so I need to somehow develop a way to send JSON commands, and also get and convert them to work using the correct variables, etc. I am not a programmer, I am simply exposed to languages from hacking things and learning. Therefore, why do I need to be guided by this.
I have never used REST or JSON before, so what do I need to do to achieve this?