Premise [download] JQM

Motorola Premise
C

chucklyons

Guest
index.php
File Name: JQM
File Submitter: chucklyons
File Submitted: 27 Jun 2013
File Category: Premise
Author: chucklyons
Contact: chucklyons

The Jquery Mobile version of the Minibrowser. Hopefully, I have included everything; my instructions are correct, and it will work for you.
 
Hat's off to 123. This was a HARD effort.
 
What's in it...
1.       Heavy use of .css and javascript (obviously)
2.       I removed the ‘CDN’ dependency of javascript libraries for JQM, jQuery, etc. Created local files for faster loading and in the event the internet is done, Premise jqm still works.
3.       The Home layout is vertical vs grid. This makes it easier for using on a touch device, primarily a phone
4.       Status lists the Home objects in an ‘accordion’ fashion for both IP and jqm versions. This uses less real estate on a device, allowing the user to focus on a specific area
5.       Status stays true to Minibrowser 2.1 but in addition to object name and state, adds a third field ‘Description’. In my setup, I add status, date and time to the object’s description field, which then is displayed in the object status. Useful for identifying times of actions (such as when a door or gate opened)
6.       Time is client side. This may change in the future. I travel a lot and want to know what time it is at my house vs where I am currently located. It’s included, but is sporadic with regard to loading.
7.       Custom Buttons are automatically generated as jqm buttons. No development action required.
8.       AV_Components are exposed. The next release will include TV, Stereo, and Tivo MB modules, otherwise you will get the Premise ‘Server Method Not Found’
9.       Lights are realtime. W84’s work on the lights dynamically changing hasnt been touched.
10.   Thermostat. Ditto on W84s work. I have not been able to test the thermostat as I dont have a thermostat in my house, however Builder reflects all are working.
11.   Security acts the same as the IP version.
12.   A lot of work went into the Mediazone.
a.       Playlists have been added. Select the playlist and it will function just as music tracks does
b.      Search provides searching by Artist, Albums and tracks in their respective levels e.g you can't search for tracks from the artist level  - next release, hopefully.
c.       Music folders - displays the number of folders and tracks.
d.      Tracks - displays duration of the track
e.      Music - I only have .mp3s to test with. Should work with others?
f.        Volume- works the same as IP
g.       Controls. Controls (play, pause, etc) are accessed by using the Open Controls button. The panel slides from the left, giving access to the controls.
h.      Now playing. Displays the ‘album’ picture next to the now playing media.
i.        I have an option for using High Definition images from http://www.freecovers.net. Album images from freecovers have a 'tn' in their name; MB looks for the freecover image, then on to the others, then...
j.        If no .jpg is found, it displays a No Image picture.
k.       Next version will add ajax versions of volume, now playing, etc
l.        Media shortcuts will show at a high level, however will display the media, which leads to this next item
13.   Playing videos and audio in the browser - not included in this release. Works in my version, but still some bugs. Next release.
14.   Media Shortcuts - added the ability to add an image to the shortcuts (Location and Media). Functions just like a normal image from the Home layout
15.   All images are .pngs. For both the IP and jqm versions. All have been compressed by approx. 75%, using www.tinypng.org
16.   Added image to the media and location shortcuts - you can add an image from the Home level   
17. Created .gifs from the .pngs. Now all images will be the same (minus clarity for .gifs ) regardless of MB style

Click here to download this file
 
Thanks Chuck!
 
Are there more icons needed than what's provided?  I don't seem to see any icons when I visit the jq page (see attached image).  This is true on every jq page?  I think once I have the icons copied over things will work.
 
Also, anyone who tries this:  make sure you have the weather underground module fully installed and configured before installing.  Otherwise, you will get errors.
 

Attachments

  • home screen.jpg
    home screen.jpg
    36.4 KB · Views: 31
I figured out I was missing the Weather Underground icons on my test PC.
 
Now, I'm just missing the icons shown below under the Status page.  I might still be missing other one's as I see no icons on the home and room pages, except for the single weather icon at the top.
 

Attachments

  • missing icons.jpg
    missing icons.jpg
    53.8 KB · Views: 22
With regret, I had to lay off our QA staff  :blush:
 
New version INCLUDES the icons in /js/images
 
ETC, I am surprised on the WeatherUnderground error. Did it throw an error because you didn't have it installed? If so, let me know, I thought I had put a check in there for that. Also, the only compressed images for WU are the pngs in '13'...
 
Thanks for downloading  :lol:
 
My problem. After going thru it, there are a couple of issues. 1) I exported ValidClasses, which included enums for non-exported modules (TV, Tivo, Stereo, MediaZoneEx). I have fixed that - although I now have basic functionality for TV and Stereo  (and Tivo) 2) Starting from 'ground zero', the JQM version looks for .pngs - base Premise looks for .gifs. I'll need to upload all of the images, .gifs and .pngs.
 
My apologies - I'll put an update in the next day or two.
 
I have been working with etc on getting my CM tighter...he likes microbrew, but will drink mass produced swill...
 
Issues:
  • Modules/MiniBrowser/Classes/mbFanEx/mbRenderStatus has a bug. Change line 13 to "if this.PowerState..."
  • There's a similar bug in mbMedaiZoneEx/mbRenderStatus where it is possilbe for "this.GetValue("Volume")" to fail. I worked around this by deleting the culprit MediaZone (which I was not actually using).
  • It has a hard requirement on WeatherUnderground. I didn't have it installed before.
  • I can't get images to show up. The Developer Tools in Chrome show a bunch of GETs are (pending) including a bunch of /images/ip .gif files (which I don't have).  Also it is trying to do a GET on /js/jquery.*.min.map.  These .map files do not exist in the installation.

  • jQuery is failing to load:
    Uncaught ReferenceError: $ is not defined(anonymous function)  jqm-settings.js:1 
 
I'm about done with an update, I'll include fixes for the errors I can reproduce...
1)I don't think I touched fanex, but I'll make the change
2) thanks for the media zone find. I'll fix it
3) Fixed. If you don't have weather installed, no problem (I think)
4) .gifs? I only used .pngs.. check the session and see what the css is and what the directories are .map? Can you send me a screenshot of that error?
5) jqm-settings ..I didnt make any changes to that , I'll check on that tonight, but I think I took that out for the next drop...
 
Finally got the time to install the dependencies and get this running.
 
Just wanted to note a couple of issues with Safari for iOS:
  1. At times navigating to a recently viewed page will resend brightness levels / on/off state instead of reading the current level.
    Example:  Adjust brightness to 50%, iOS device times-out to lock screen.  From a second device/pc/controller/local manipulation lights are turned off.  When the iOS device is unlocked and the screen returns to the browser, the lights turn back on to 50%.

[*]Dimming behaves unpredictably when using the brightness slider.
  1. Example:  If I move the slider from 0 to about 3/4 of the way through and watch debug the following levels are sent:  3,12,16,9,6,24,19,42,57,33,28,37,60,70,71,60,72,70.

[*]About 50% of the time the on/off toggle behaves unpredictably sliding back and forth repeatedly by itself.
[*]If too much time elapses between uses, CSS dissapears leaving unformatted page. Must navigate back to /jq for issue to correct itself.
Google Chrome for iOS seems to perform better, however it still has occasional issues dimming, occasionally sending a brightness level out of sequence. 
 
If I had to guess (I've never worked with JQ) its some sort of issue with "Mouse Down/Release"... ie tap and drag on the touch screen device isn't translating to click and drag as well as it should...
 
General Issues:
  1. Thermostat loads a blank page.. no controls or readouts.
Lastly... any plans for irrigation support?
 
ugh.
 
1. I think I've fixed the brightness thing. I'll go thru it again this weekend
2. Thats a maybe..I still have problems with it, but less now.
3. I think it's fixed. It's a pita, I agree.
4. That's a Premise problem - not specific to jqm. I have looked at a keep-alive..
5. Thermostat...ugh. I don't have a Thermostat.so I didn't check it out..Sorry. It's not there..
6. Irrigation Support? Once the landscape guy finishes my front yard, maybe..if he doesn't, feel free to add it..
 
I'm ready to drop a new release...I THINK I have fixed all of the dependencies - thanks to charlie, etc, and w84.
 
I finished the Thermostat (I think I have uploaded an image here, somewhere) - I've added support for basic functionality (on/off, mute, volume) for receivers and TVs.
I'm working on the security piece. It seems JQM does a lot of the javascript work for you, so I have to figure out what I can keep from the IP version of the security panel.
I can look at the irrigation piece - I need that for myself, as well...
 
Sorry this has taken so long...didn't realize I was rewriting War and Peace...
 

Attachments

  • jqm_thermostat.png
    jqm_thermostat.png
    33.3 KB · Views: 47
W84...thats all yours...i didn't tie it into ur Ajax stuff. At least for now...to be honest I'm at the point of just trying to get it out..
 
I finally have 3 WIFI thermostats, just need to install them and get them working in Premise.  Then maybe I can help again.
 
Back
Top