Pebble Tinkerer Support?

Awexome, thanks! It compiles now but my work network must not support Websockets or something… because it just fails to transfer here. I’ll have to wait til later at home to find out if it works, where I know I can transfer apps. Too bad the computer and phone need to be on the same network… I can run cloudpebble.net from the phone directly but it still complains about wifi access.

How has the reliability been of the various api’s that are used in this setup? Any known issues you are trying to solve?

You can install the file directly from CloudPebble using the ‘small.cat’ short link option from the Compilation page.

Since correcting the issue I had with the format of the arg string (JSON) the REST calls to execute the exposed Spark.function() registered function have been rock solid. No problems to speak of really. Just need to find time to flesh it out into a proper app.

I don't see that.. got a screenshot?

That's very encouraging :smiley: So I have this installing easily now at home, but I still have some issues. I don't think it's loading jQuery properly:

[INFO] wristponder.c:0: AppMessage opened.
[INFO] C:0: I/O: 2044/636
[PHONE] pebble-app.js:?: JS: starting app: 12341234123412341234 PebbleTinker
[PHONE] pebble-app.js:?: app is ready: 1
[PHONE] pebble-app.js:?: JS: PebbleTinker: Pebble JS ready!
[PHONE] pebble-app.js:?: JS: PebbleTinker: Received turn on pin: 7
[PHONE] pebble-app.js:?: JS: PebbleTinker: jQuery AJAX: url=https://api.spark.io/v1/devices/1234123412341234/on?access_token=1234123412341234 args=7
[PHONE] pebble-app.js:?: Error: PebbleTinker: ReferenceError: Can't find variable: $ at line 78 in pebble-js-app.js

And here's a screenshot of the JS app... I'm guessing the red areas are code compilation issues... but it compiles fine.

Any ideas?

Ah. The button I mentioned has dissapeared as part of the major re-design that happened in the last few days since I was last there. A direct link to the .pbw file compiled can be gotten on the phone from the ‘GET PBW’ button.

The red highlighting on jQuery code is a new thing to me as well, possibly the inclusion of JSHint or some other pre-compilation syntax checking tool. As you say, it does compile. The error you showed in your post does not occur for me, however (Imported from GitHub to CloudPebble), I get the following correct log output:

[PHONE] pebble-app.js:?: {'runhost client uuid' = 00000000-0000-0000-0000-000000000000}:{'webapp uuid' = 57d81e72-2ae5-4849-b720-f136dd60c071}: ++_JS_LIFECYCLE_++:LAUNCHING
[PHONE] pebble-app.js:?: PebbleTinker__1/pebble-js-app.js:36 Pebble JS ready!
[PHONE] pebble-app.js:?: {'runhost client uuid' = 77967842-35c9-4073-84d4-865fcec9c1ea}:{'webapp uuid' = 57d81e72-2ae5-4849-b720-f136dd60c071}: ++_JS_LIFECYCLE_++:READY-RUNNING
[PHONE] pebble-app.js:?: {'runhost client uuid' = 00000000-0000-0000-0000-000000000000}:{'webapp uuid' = 57d81e72-2ae5-4849-b720-f136dd60c071}: ++_JS_LIFECYCLE_++:PREVIOUSLY-RUNNING
[PHONE] pebble-app.js:?: PebbleTinker__1/pebble-js-app.js:70 Received turn on pin: 7
[PHONE] pebble-app.js:?: PebbleTinker__1/pebble-js-app.js:75 jQuery AJAX: url=https://api.spark.io/v1/devices/48ff6c065067555011201587/on?access_token=[REDACTED] args=7
[PHONE] pebble-app.js:?: PebbleTinker__1/pebble-js-app.js:62 Response received: {"id":"48ff6c065067555011201587","name":"morphing_hunter2","last_app":null,"connected":true,"return_value":7}
[PHONE] pebble-app.js:?: PebbleTinker__1/pebble-js-app.js:48 return_value=7
[PHONE] pebble-app.js:?: PebbleTinker__1/pebble-js-app.js:53 Send response to Pebble

What version of the Pebble app/firmware and phone platform are you using? Perhaps there is some small difference that causes the jQuery ‘$’ call to fail.

I'm using the latest version of Pebble stuff (2.1.3 app, 2.1.0 watch). iOS 7.04. I have my phone jailbroken as well, which is why I haven't updated to any newer iOS yet. Looks like 1.07 is supported now though.

I have to imagine there are lots of Pebble apps that use jQuery right? Maybe I can find one in the app store and just see if it works as well.

Right. I’m using firmware 2.1 and Pebble app version 2.0.15.1 on Android 4.4.2 stock. So we are using different platforms.

I’m not rightly sure how many other apps use jQuery (and if they do, there is probably a more elegant way of ‘including’ it than how I did it) since Pebble supports XMLHttpRequest, which I may have passed up for jQuery while I was struggling with the format of Spark.function args in making the POST request. When I get back to developing this soon, I’ll try both methods and report back.

BDub, I scrapped the idea of using a local SDK since I can’t run a VM on my (overtaxed) netbook and I was able to get ChrisLewis’ code to run beautifully in CloudPebble. I have firmware 2.1 on the pebble and pebble app 2.0.15.1 running on kitkat 4.4 on my Galaxy Note 3.

I get highlighted lines when I view the .js code in cloudpebble but it compiles without error and runs just fine. Frankly, I don’t even know what the highlighted lines mean! :open_mouth:

Ok thanks for the feedback @peekay123. I’ll try to pair it on my wife’s phone which is not JB and see if there’s a difference.

It is strange that there’s no indication as to what that red highlight means. When I code in obvious errors though it does highlight those as well so some kind of precompile check as @ChrisLewis suggested.

I have updated my repo with the latest version I’ve been working on (on and off). A nicer UI as well as animated progressbars etc.

@peekay123 I don’t know what the red lines mean as neither hovering over them or clicking them tells me anything. I’ll ask Pebble about it. I guess if it compiles but is still flagged it may just be bad form, or something.

EDIT: Here is their response (was fast!). It’s indeed stylistic errors. No info is a bug, though. I guess jQuery isn’t officially supported, but works when added to the DOM.

1 Like