Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Mobile
 PowerHome Messageboard : PowerHome Mobile
Subject Topic: Android App Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Ktulu
Newbie
Newbie
Avatar

Joined: March 14 2007
Location: United States
Online Status: Offline
Posts: 25
Posted: November 23 2011 at 10:46 | IP Logged Quote Ktulu

Skip, quick update. I have the new version running on my Droid X (Gingerbread). It connects to my websever and queries the uptime, sunset, etc. So, it's working for me.

It's to be some time before I can go any further as far as customizing the config file to get some actual control and feedback. I'll post an update when I do.

__________________
Jeff

"Assiduus usus uni rei deditus et ingenium et artem saepe vincit" - Cicero
Back to Top View Ktulu's Profile Search for other posts by Ktulu
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: November 23 2011 at 10:49 | IP Logged Quote MrGibbage

Thanks for that feedback! I am starting on a user interface for menu editing so that you won't have to write the xml file and upload
it any more. All of the customization would be done on the phone. I think most people will find that a lot easier to work with.

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
Ktulu
Newbie
Newbie
Avatar

Joined: March 14 2007
Location: United States
Online Status: Offline
Posts: 25
Posted: November 23 2011 at 11:41 | IP Logged Quote Ktulu

Excellent.


FYI - I installed the app on my Kindle Fire and it works. I'm getting the same basic functionality as my phone. Just another data point. Ok, enough screwing aroud at work...

__________________
Jeff

"Assiduus usus uni rei deditus et ingenium et artem saepe vincit" - Cicero
Back to Top View Ktulu's Profile Search for other posts by Ktulu
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: January 25 2012 at 08:25 | IP Logged Quote syonker

Hi Gang (and especially Skip),

So I installed the app, pulled the XML File and edited all my info into the header. Loaded to phone and loaded in PH Connector.

I am using a Motorola Triumph - Android v2.2.2

App comes up fine, loads config fine, looks good (not HTML), but is not connecting. Double-checked all the settings, etc.

I have a NAT firewall in between the outside world and the PH server. I have used the appropriate outside address/port for PH web server (which is enabled and has been tested using regular computer). I have also passed port 8500 (PH Socket Server) through to the server as well.

PH SERVER INFO:
Web Server Port: 80
Socket Server Port: 8500

OUTSIDE PORT INFO:
PH Server Port: 8000 (translated to 80 and passed to PH server)
PH Socket Port: 8500 - direct pass.

The PH Connector is showing "Error Connecting to PowerHome Server".

I'm gonna keep mucking with this because I think the value here is HUGE, but wanted to know if there's something obvious I'm missing. Glad to PM you the XML file if you want to try it.

Here is the XML Header (with usernames/passwords removed):

<?xml version="1.0" encoding="utf-8"?>
<Preference
xmlns:android="http://schemas.android.com/apk/res/android"
PhWebServer="http://www.yjprod.com:8000"
PhSocketServerAddress="http://www.yjprod.com:8500"
PhSocketServerPort="8500"
PhWebServerUsername=""
PhWebServerPassword=""
PhWebServerAuthMethod="cookie"
PhSocketServerUsername=""
PhSocketServerPassword=""
version="1.0.0">

-S

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: January 25 2012 at 08:32 | IP Logged Quote syonker

BINGO! It was "basic" authentication versus "cookie".

Alright, gonna play now - will keep you posted on progress.

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: January 25 2012 at 08:32 | IP Logged Quote MrGibbage

Hi syonker,
Try changing your PhWebServerAuthMethod to "basic". Your port forwarding
looks fine.

Let me know if you need any more help.

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: January 25 2012 at 08:33 | IP Logged Quote syonker

Hey Skip - if the app crashes, is there a way I can get you any useful information?

-S

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: January 25 2012 at 08:44 | IP Logged Quote syonker

Yeah, it definitely seems to crash every time I'm doing some sort of socket operation. Is it the ":8500" on the tail end of my sPhSocketServerAddress XML entry? Gonna try removing it to see, but wondering if this is a problem or not.

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: January 25 2012 at 08:44 | IP Logged Quote MrGibbage

Crashes?!? Ugh, there shouldn't be any crashes. I haven't looked at the code
in some time though.
Anyway, there is a lot of system logging to logcat, so if you download the
free alogcat app, you can filter for phca and see what happened.

Iirc, the only problems I saw were with malformed xml configuration files.
If you continue to have problems, send me your config file and I will if I
can figure out what it wrong.

Anyway, glad you got it working! You can continue to post here for support,
or you can email me directly at skip@pelorus.org.

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: January 25 2012 at 08:58 | IP Logged Quote MrGibbage

Yeah, you should not put the port number in the
PhSocketServerAddress setting. But that shouldn't make it
crash either. I will take a look at the code to be sure.

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: January 25 2012 at 09:05 | IP Logged Quote syonker

Hi Skip. I removed the port number - same problem. Captured the log (the portion you care about I suspect) and e-mailed it to you along with a copy of my XML file - which is pretty primitive. Basically your example, plus the server credentials.

It crashes with any socket server operation, and on its own when left alone for a minute or so.

-S

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: January 25 2012 at 09:07 | IP Logged Quote MrGibbage

OK, I will look into it.

Tell me, does the bare-bones sample work? But then it
crashes when you add in the server info?

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: January 25 2012 at 09:13 | IP Logged Quote syonker

The barebones sample throws up a "Error Connecting to PowerHome Server" but does not crash. It was after I added the connection info that it went goofy. Will be interested to see what Android version you're using and whether my config file works in your platform (if you try it, that is - which you are welcome to).

I have a Motorola Triumph with Android v2.2.2

-S

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: January 31 2012 at 08:46 | IP Logged Quote syonker

Hi Gang,

Skip's been doing some really good work on this app - found a few stability/performance issues and tuned them, and got a few glitches out of the way. My guess is you'll see him announce a new version soon, and I encourage you to update and play.

-S

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: January 31 2012 at 11:00 | IP Logged Quote syonker

Ok....now my "PowerHome Greenness" status is about to show. I don't do a lot of work with these things outside of the line editor in PH, but who can tell me what I've done wrong with the following code that's failing?

     <page
      pagename="spencer"
      pagetitle="Spencer Custom"
      statustext="Family Room Sconce: %family_room_sconce% ">
      <refresh>
        <update url="ph_getinsteonstat('FAMILY ROOM SCONCE')" variablename="family_room_sconce"></update>
      </refresh>
      <actions>
        <action label="Turn Family Room Sconce On" url="ph_insteonraw('PLMCTLR1','FAMILY ROOM SCONCE',17,255)" return_type="dialog"></action>
           <action label="Turn Family Room Sconce Off" url="ph_insteonraw('PLMCTLR1','FAMILY ROOM SCONCE',19,255)" return_type="dialog"></action>
      </actions>
    </page>

-S

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: January 31 2012 at 14:37 | IP Logged Quote MrGibbage

Sigh, it was error in my code. I forgot to url encode the
incoming URL here (see the spaces). Anyway, it's fixed now.

Syonker has been helping me troubleshoot and has been quite
helpful. Thanks for being my guinea pig :) And thanks for
the props earlier :)

I wish I wasn't such a lousy programmer. Maybe someday I
will get half of the bugs out of this code.

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: January 31 2012 at 15:37 | IP Logged Quote syonker

We'll get 'er figured out Skip...don't fret. I'll keep testing if you'll keep debugging.   

-S

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: February 01 2012 at 12:11 | IP Logged Quote syonker

Skip has done an awesome job of getting this app pretty rock solid over the past few days, including a few new features and goodies to boot. I am extremely excited and have had a lot of luck getting this thing humming in my environment.

When he comes out with the next version, I strongly recommend everyone who's using it upgrades, and those who haven't tried it yet to give it a shot.

-S

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: February 01 2012 at 17:37 | IP Logged Quote syonker

Anybody know what's wrong with this?

ph_geturl("http://phc-a.net/testsend.php?username={PHCA_USER }&password={PHCA_PASS}&varname=temperature&varvalue=" + ph_htmlescape("{TEMPNOW}"))

I have a devil of a time getting all these syntactical things kneaded out.

-S

__________________
"I will consider myself having succeeded when my house becomes sentient and attempts to kill me."

><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.

·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
Back to Top View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: February 01 2012 at 17:42 | IP Logged Quote MrGibbage

Yeah, you have a space between PHCA_USER and the closing
brace. That part is not html escaped, so nothing after the
space is being sent.

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 

<< Prev Page of 7 Next >>
  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