Request: Philips Hue Bluetooth

Posted on
  • Apparently Philips Hue bulbs now have Bluetooth as well as ZigBee. Has anyone tried controlling with Espruino? I think it's time for a new tutorial video please Gordon 😌

  • I don't have any here to try with, but it'd make a cool app for Bangle.js

    I just googled it and found:­0y3y/philips_hue_bluetooth_developer_doc­umentation/

    So I think something like this might work?

    function onoff(isOn) {
    var gatt;
    NRF.requestDevice({ filters: [{ name: 'Puck.js abcd' }] }).then(function(device) {
      console.log("found device");
      return device.gatt.connect();
    }).then(function(g) {
      gatt = g;
      return gatt.startBonding();
    }).then(function() {
      console.log("bonded", gatt.getSecurityStatus());
      return gatt.getPrimaryService("932c32bd-0000-47­a2-835a-a8d455b859dd");
    }).then(function(service) {
      return service.getCharacteristic("932c32bd-0002­-47a2-835a-a8d455b859dd");
    }).then(function(characteristic) {
      return characteristic.writeValue(isOn ? 1 : 0);
    }).then(function() {
    }).catch(function(e) {

    But it might be you have to restart your light somehow first? They mentioned something about only being able to have one bonded device at a time...

  • Thanks! It looks like the code is basically the same as your previous tutorial then.

    I haven't got the Hue bulbs either, but I'm just trying to work out which one I should get next. I was thinking I might try Bluetooth just so I don't have yet another Wifi device on the network.
    A Bangle JS app is a good idea, but I would probably want to use EspruinoHub to control the bulb via MQTT from Home Assistant.

    Those Awox bulbs that you used in your tutorial don't really seem to be available in the UK.
    It looks like the Bluetooth bulbs that are currently available are:

    • Philips Hue
    • Veho (TP-Link) Kasa
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Request: Philips Hue Bluetooth

Posted by Avatar for user91203 @user91203