Author |
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 29 2012 at 19:04 | IP Logged
|
|
|
On startup, probably no. Once you get a feel for the lifecycle of an android app, you will see that
startup could mean a few different things. For instance, if you "start" phca (say, right after a
reboot), then hit your home button and come back to it, was that a "start up" again? What if it was
an hour later? Or if you ran a couple of apps in between. Startup would be hard to define and
really make it work the way you want to.
If you are trying to update variables by polling, and hoping that an update at startup would sync
them up, that is the reason to go with C2DM instead. The variables will always be up to date. And
it takes practically no battery power.
I was just looking into ways to sync up the global variables. I think this would be a great idea,
by the way. I see that you cannot make a trigger that would fire on ANY global variable updating.
So far, that is the only way I can think of to have the value pushed to a phone any time any
variable is updated. I do need to be careful with this approach. If I want to push every global
variable update to the phone over C2DM, then I may hit quota limits, depending on how many updates
there are a day. I currently have 200,000 updates per day. For all users of the app. Total. So, if
you have a global variable that is updated every minute (or even more often than that!), that is a
lot of pushes.
Maybe Dave can answer this. What if we had a PH plugin that we can set up filters to say what
variables we want auto pushed to a phone and which ones we don't? And maybe we can hard code in a
daily quota per user so I don't exceed my overall app quota? It might also be helpful for users to
be able to see which global variables are updated the most often.
__________________ Skip
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: May 29 2012 at 19:20 | IP Logged
|
|
|
Skip,
Can we update xml from the previous version ?
also about PHCA still shows ver 2.1.04 ? (just downloaded)
Thanks
Nick
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 29 2012 at 19:29 | IP Logged
|
|
|
Automatic updating of the xml from versions prior to 2.1 is not possible. Way too many changes. However, I do have
a tutorial on editing the xml up on my site:
http://skipstechtalk.net/phca-editing-xml-backup-files/
And thanks for the note about the wrong version on the site. 2.1.06 has just been uploaded.
There will be a couple of small maintenance releases over the next few days. I will try to keep everyone up-to-
date here.
__________________ Skip
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 29 2012 at 20:41 | IP Logged
|
|
|
One thing I am considering is ditching all web commands and requiring Socket Server commands
instead. Would that be a problem for anyone? There's a lot of extra stuff I have to do to deal
with http networking, and I'd rather just do Socket Server, if that is ok with everyone.
__________________ Skip
|
Back to Top |
|
|
syonker Senior Member
Joined: March 06 2009 Location: United States
Online Status: Offline Posts: 212
|
Posted: May 29 2012 at 21:29 | IP Logged
|
|
|
Skip is MrGibbage? I should have known you were a super on the PH forum. I would be fine with Socket - it's faster, and more powerful.
Programming the tar out of the new PHCA now...play play play, fun fun fun. It's really great so far Skip. I'm finding a few small bugs in my general macros.
I am going to draw a "halo" around the devices in the rooms (3D graphical versions), just to highlight where devices in rooms, rooms on floors, floors in building, zones for sprinklers, hvac, etc. Any other suggestions are greatly appreciated on better ways to manage this.
LOVE LOVE LOVE the Slider! Instant response - very cool!
Haven't figured out how to get the C2DM working but haven't really played with it in depth. As you may recall, I have some macroparamret functions I used in the prior version to return the C2DM variable directly such as:
<update url="ph_macroparmret('PHCA_UPDATE_VARIABLE','HVAC','HVAC_MOD E_SP',0,0,0)" variablename="hvac_mode"></update>   ;
Or a macro that would just push the variable back to me such as:
<action label="Front Coach Lights On" url="ph_macroparm('PHCA_SET_APPLIANCE','FRONT PORCH',1,'outside_front_coach_lights',0,0)"></action&g t;
Haven't looked into how this looks in the new system yet - still building out the framework/devices/variables.
I noticed that the variable names complain about camelCase....reason? I also name the pages for the devices with the same camelCase name - is this going to cause any problems?
This week's hands-on projects including wiring in the garage door control, and the Insteon sprinkler controller (going to piggy-back it into the original timer with a patch panel). If there are any ideas on how that might work, I'm open - although I'm just thinking "on/off" macros for now so I can kick them on and off manually - wait for the door-to-door salesmen to come up while I'm sitting on the porch (too much fun). Seriously though I'll let PH control the "schedule" and do manual from PHCA for fun and "extra" water if needed.
-S
__________________ "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 30 2012 at 05:53 | IP Logged
|
|
|
Yes, I am Skip :)
I like the gucci image screens, but for usability, I actually prefer the menu pages and widgets. I do
have a couple of image pages that I use to show off, and they just control lighting. As for drawing
halos around your targets, if you have photoshop skills, it should be pretty easy.
I wish the C2DM setup process was easier. I am going to think about this a lot, play with other C2DM
apps in the market, and see what I can do to make it easier. I really think it is worth the trouble,
and I rely on it quite a lot. I think C2DM is what really makes the app stand out. Many of us are used
to having PH send text messages for that instant feedback. C2DM allows you to do the same thing, but
with a lot more flexibility.
camelCase??? Heh, never heard of that. I think I recall it being named something like hungarian
something something??? ButIKnowWhatYouMean. I always make all of my variables lower case, so I hadn't
noticed that. And I tolower() most of the calls to make everything case insensitive. I wouldn't have
thought the app would complain about having mixed case variables. Or are you just saying that once you
create the variable with mixed case, I remove all of the mixed case so you can't see it any more. If
that is the case, I think I can keep the mixed case, but still keep the logic case insensitive. For
instance, if you have a variable named garageDoor, and you have a PH macro that updates the value for
garagedoor, it will do the right thing and update garageDoor. But when you are editing menus and
whatnot, you will still see garageDoor, as you entered it.
Of course, this might all change if I can think of a good way to synchronize all PH global variables
with PHCA.
I'll leave the last paragraph on sprinklers to someone else. :)
__________________ Skip
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 30 2012 at 08:32 | IP Logged
|
|
|
version 2.1.07 was uploaded this morning. Another fix for http networking. :( I have had more
problems with http networking than everything else put together. I think the next release is going
to disable all http networking, so if you are a user of this app, please look at the socket server
in your PowerHome settings. The performance is much better, and you will enjoy it much more than
http.
__________________ Skip
|
Back to Top |
|
|
syonker Senior Member
Joined: March 06 2009 Location: United States
Online Status: Offline Posts: 212
|
Posted: May 30 2012 at 08:41 | IP Logged
|
|
|
I can vouch for that - the Socket Server approach is vastly superior. Speed, reliability and power.
-S
__________________ "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 30 2012 at 12:59 | IP Logged
|
|
|
syonker,
I can make the variables accept any mix of upper and lower case letters. But it looks like everything will be
case sensitive then. If you want, you could have a variable named aaa and another named AAA. What's more, if
you want to update the variable over C2DM, then you will have to use the correct case when you send it. So
long as you are careful with your upper & lower case, all should be fine. Do you still want this feature?
Anyone opposed to it?
__________________ Skip
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 30 2012 at 16:39 | IP Logged
|
|
|
Sorry for all of the rapid-fire updates. I am getting a LOT of good feedback. Please stick with
me. It will be worth it.
Version 2.1.13 has been released. Biggest change here is there is no more HTTP networking. If you
have any actions, or action commands that use http, then you should change them over to socket
server BEFORE installing this version.
Also, variables are now case sensitive. This will mean that if you are updating a variable with
C2DM, you will need to have to correct case.
__________________ Skip
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: May 30 2012 at 21:15 | IP Logged
|
|
|
version 2.1.13
C2DM : in configure C2DM even after register , no other Tab will turn on. like "Receive C2DM Notification" is still gray. Yet I am receiving updates and my variables value get changed. (of course no notification bar).
also is there a log file , when restoring XML some of the notification will go fast - have to do it twice just to read it.
I am using XLM notepad 2007 and it works great.
Thanks
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 30 2012 at 21:40 | IP Logged
|
|
|
Thanks for the feedback, Nick. So it looks like you got it working, but I need to tweak the logic
for what buttons are enabled and what buttons aren't and when they change.
The log file is the standard android logcat. I have a tutorial on getting a log:
http://skipstechtalk.net/phca-support/
For many of us, editing the xml is the way to go. Especially if you are setting up a lot of actions
and pages.
By the way, you can long press on some of the screens to get an option to make a copy of that item.
For instance, when you are looking at the list of objects on a page, long press on one of the
objects and you can make a copy of it on that page, or on another page.
Finally, I have uploaded version 2.1.15. It fixes a situation where an action will repeat over and
over again (that is, a runaway). It also adds visual feedback when you click on a menu item so you
know you hit it.
__________________ Skip
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 30 2012 at 22:56 | IP Logged
|
|
|
Link is to 13, not 15. ;)
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 31 2012 at 04:05 | IP Logged
|
|
|
Thanks for letting me know. 2.1.15 is up now. :)
__________________ Skip
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: May 31 2012 at 05:08 | IP Logged
|
|
|
Well, I have caught up with you guys ;) I have corrected all of the outstanding bugs. I
just uploaded ver 2.1.16, which corrects the C2DM registration buttons getting confused.
The C2DM configuration page has also been simplified, so hopefully more of you will get it
going now.
I do have a few more enhancements in mind, but they will take a few days to get going. Such
as full global variable synchronization, and some improvements to the global settings page.
__________________ Skip
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: May 31 2012 at 18:39 | IP Logged
|
|
|
ver 2.1.17
getting stuck into popup.
if you have action item with return type Dialog, it will return data correctly, but at that point if you press the home button of phone or turn screen off, next time you will get stuck into that popup and you cant get to the main page or config . only way to come out is to reboot even killing the task does not help.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 31 2012 at 21:24 | IP Logged
|
|
|
I think I saw something like that with .15.
Also, link on web page is to .16.
Edited by TonyNo - May 31 2012 at 21:26
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: May 31 2012 at 23:57 | IP Logged
|
|
|
getting stuck into popup.
okay , I did more testing .
when you go back using quick launch, that's when you are lock into popup, but if you re-run the application thru application menu then it goes to main page. which is suppose to.
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: June 01 2012 at 05:05 | IP Logged
|
|
|
I have not been able to recreate this yet. What do you mean
by quick launch? Do you mean widget? Are you PIN protecting
anything? Was the action executed by a widget, menu-type
page, or an image-type page? If you are using a widget, is
the widget a pagelink or an action?
__________________ Skip
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: June 01 2012 at 07:22 | IP Logged
|
|
|
I did see a problem where non-PIN protected pagelink
widgets would ever work. I don't know if it is the same
problem as what you reported here, but it might be. Check
out ver 2.1.18 which I just uploaded and see if it fixes
the problem.
__________________ Skip
|
Back to Top |
|
|