View Full Version : Bluetooth Controled Smart Lighting for new product similar to Hue. Need some tips!

Nov 20th, 2014, 09:53 PM
Hello Coding Forums,

I am working on building a watch app for the Pebble smartwatch that works in combination with a Bluetooth light bulb that could trigger on and off functionality. I have bits of the source code from a the same bulb project someone started from another site that is coded Java, so I imported them into cloud pebble their java library. I've been working on this since last year and I'm wondering what at all could I be doing wrong. I get the "cards" to show up, but as far as a connection to the bulbs I have not established that yet. I've attached my source code and if anyone has any time to give me some pointers that would be appreciated massively. I know that Hubble worked on a similar project, to control lighting from a pebble smartwatch so I know it can be done. I've even tested this code with other developers who are experienced and they are also wondering why the connection does not take place. It would be really neat if I got this to work.
Thank you everyone.

Nov 21st, 2014, 02:14 AM
Guys!! Hey I'm still here! There is no need to do any of the programming for me! I just wanted to get an extra opinion or two from this site! :) Is anyone interested in just looking at this code?

Philip M
Nov 21st, 2014, 08:44 AM
It is no use displaying your code as an image. Please help us to help you by making it easier to view, copy, modify, test and debug your scripts by following the posting guidelines and wrapping your code in CODE tags. This means use the octothorpe or # button on the toolbar.

Please do not bump your thread after only a few hours. We are not here standing around 24/7 waiting to answer your questions.

Nov 21st, 2014, 10:46 PM
//Here is my source code:

//Blue Application

var UI = require('ui');

var YeelightBlue = require('yeelight-blue');
var Vibe = require('ui/vibe');

// Create a Card with title and subtitle

var card = new UI.Card({
title:'Welcome to Blue',
subtitle:'Finding your bulbs...'


//Connect and Setup

// connects + discovers services and characteristics


//Turn off/on


//trigger vibration after Setup is complete

// Display the Card

Nov 21st, 2014, 10:46 PM
Thank you for telling me the proper thread formats Phillip. I'll make sure I use them here on out.

Philip M
Nov 22nd, 2014, 09:12 AM
Thank you for posting your code. But I am very sorry to say that I have no idea what is wrong, or how to solve your problem. Perhaps someone else can help.