New topic: 

First Project Planning

<http://forums.realsoftware.com/viewtopic.php?t=46205>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        dmalyavin          Post subject: First Project PlanningPosted: 
Tue Dec 11, 2012 11:05 am                         
Joined: Tue Dec 11, 2012 10:48 am
Posts: 1                Hello all!

Recent joiner to the Real Studio community, coming from self-taught VBA so lots 
of bad habits to unlearn, and object orientated programming is still something 
I am trying to get to grasps with.

My first Real Studio project is going to involve a new toy I recently bought, 
the Philips Hue (Personal Wireless Lighting- basically an LED light bulb that 
you can control through a wireless hub). The currents web and ios apps are very 
primitive in terms of control but luckily several people already have started 
playing around with the API through the hub.

I have read that in order to control the lights I need to be able to send a GET 
and PUT commands to an HTTP address, I guess I would need the 
HTTPSocket.SendRequest although I am not sure if PUT and POST are the same 
command on web servers.

After that the Hue sends information in JSON format, which I intend to parse 
with JSONItem, and then PUT a JSONItem back to the http socket with the changes 
to be made.

One of the problems with the Hue is that if you turn of the bulb using the 
normal switch it loses all its settings, so what I intend to do is to a) have a 
GUI that I can use to track and set the variable for the various rooms, and b) 
have a job running that checks to see if I a bulb has been activated and 
activate the last used setting automatically.

Please let me know if the HTTPSocket and JSONItem are the right classes to use 
for this.

Thanks!

Denis   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to