Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: quick easy dimming question. Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
raven77
Groupie
Groupie
Avatar

Joined: January 02 2007
Location: United States
Online Status: Offline
Posts: 44
Posted: July 24 2010 at 12:59 | IP Logged Quote raven77

I am in the process of changing my webpage over to Apache and using Ajax/PHP to update and send info.
Things are going pretty good but I can't figure out the ADIM formula to use with this function. I don't remember where I got it, but its not working.

<% ph_devicecontrol("INSTEON+" + ph_getwebparm("device") + "+ADIM+" ph_getwebparm("dim") %>

I need to use ph_devicecontrol because I need the level sent back to update the exact device level and not just on or off. (well that's what I want anyway)
Thanks for any input!!

Back to Top View raven77's Profile Search for other posts by raven77
 
raven77
Groupie
Groupie
Avatar

Joined: January 02 2007
Location: United States
Online Status: Offline
Posts: 44
Posted: July 31 2010 at 16:43 | IP Logged Quote raven77

Please please someone help!
lol
I made some progress with ph_insteonwithret.
But I cant quite get it! Here is my PH code

<% ph_insteonwithret(ph_getwebparm("device"), ion, int(ph_getwebparm("value")))

%>

I am pretty sure the problem is that getwebparm for value puts quotes around the number and PH doesn't like that.
But I dont know how to pull the "value" variable in from my other server (with PHP) without the quotes.
any ideas?
its probably easy, wheres Dave and Tonyno!!!!
:)
Back to Top View raven77's Profile Search for other posts by raven77
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: August 01 2010 at 13:13 | IP Logged Quote grif091

I have no experience with the web interface but for sure the ph_insteonwithret does not accept a string for the cmd2 value. Try the integer(string) function for converting a string to integer value.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
raven77
Groupie
Groupie
Avatar

Joined: January 02 2007
Location: United States
Online Status: Offline
Posts: 44
Posted: August 01 2010 at 13:34 | IP Logged Quote raven77

grif091 wrote:
I have no experience with the web interface but for sure the ph_insteonwithret does not accept a string for the cmd2 value. Try the integer(string) function for converting a string to integer value.
thanks for the reply!
Isn't that what the "int" does in my code above?
I can make the insteonwithret function work, but I can't get the integer value pulled in with ph_getwebparm.
Thanks again for your input.
Back to Top View raven77's Profile Search for other posts by raven77
 
raven77
Groupie
Groupie
Avatar

Joined: January 02 2007
Location: United States
Online Status: Offline
Posts: 44
Posted: August 01 2010 at 16:26 | IP Logged Quote raven77

Hey you were right!
I changed "int" to "integer" and it works!!
thank you!
I've been struggling with that for about a week...
Back to Top View raven77's Profile Search for other posts by raven77
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum