Author |
|
raven77 Groupie
Joined: January 02 2007 Location: United States
Online Status: Offline Posts: 44
|
Posted: July 24 2010 at 12:59 | IP Logged
|
|
|
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 |
|
|
raven77 Groupie
Joined: January 02 2007 Location: United States
Online Status: Offline Posts: 44
|
Posted: July 31 2010 at 16:43 | IP Logged
|
|
|
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 |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: August 01 2010 at 13:13 | IP Logged
|
|
|
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 |
|
|
raven77 Groupie
Joined: January 02 2007 Location: United States
Online Status: Offline Posts: 44
|
Posted: August 01 2010 at 13:34 | IP Logged
|
|
|
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 |
|
|
raven77 Groupie
Joined: January 02 2007 Location: United States
Online Status: Offline Posts: 44
|
Posted: August 01 2010 at 16:26 | IP Logged
|
|
|
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 |
|
|