Code Monkey home page Code Monkey logo

hue_b_smart's Introduction

HUE B SMART

Hue B Smart - total control of Hue Bulbs, Groups, Scenes, and more!

This is a follow-up to my earlier Hue Connect Service Manager called Hue Lights Groups Scenes (oh my). This version has ability to integrate & control all of your (i) Hue Color Bulbs, (ii) Hue Lux Bulbs, (iii) Hue Color Groups, (iv) Hue Lux-Only Groups, and (v) Hue Scenes.

Its very fast and responsive (whether controlling a bulb, group, or a scene). It is a complete overhaul from the HLGS app, so if you are switching from that app, you will unfortunately need to start over. A PITA, yes, but I'm sure that you'll be very happy with the end result.

Installation To install, you will need to import the Hue B Smart app AND all of the relevant DTHs into the IDE. If you only have Hue Color bulbs, then you will need to import (i) the bridge DTH, (ii) the Hue Bulb DTH, (iii) the Hue Group DTH, (iv) and the Hue Scenes DTH. If you also have Hue Lux bulbs, then you will also need to import (v) the Hue Lux Bulb DTH and (vi) the Hue Lux Group DTH.

This version does not have the ability to create, delete, or modify groups or the ability to create or delete scenes directly. That functionality will come in version 1.1, along with the ability to incorporate Hue Hub schedules (and maybe more!). In the meantime, if you need to create / delete groups or scenes, you will need to use either the Philips Hue app or the CLIP API debugger (instructions for the CLIP debugger can be found here.

You can update the level, hue, and saturation settings for an existing scene by clicking the "Update Scene" tile in any Scene device. Note, however, that all of the lights of that scene will be updated when you do so.

Scenes As in the HLGS app, scenes are momentary devices. A new feature is the "setToGroup" function for scenes. This function (which you can use in CoRE) allows you to apply the selected scene to a single Group -- rather than to all of the bulbs in that Scene. This means that you do not need to set up individual scenes for each Room / Group, thus drastically reducing the number of scenes you need.

For example, I have 25 Hue lights in my house. I set up a single scene for each of my location modes (e.g., "Morning", "Daytime", "Nighttime", "Late", etc.). I then set up a CoRE Piston for each room of my house, and when the appropriate conditions are met for each room, I use the same Scene momentary device as the action, calling the "setToGroup" function and use that room's group number as the parameter. My Living Room group has the groupID of "1" (each Group device displays its groupID number), so to apply the Morning Scene only in my Living Room, I select the "Morning" momentary switch, use the "setToGroup" task, and set Parameter #1 (type Number) to the value of 1. I then limit that action to execute only when my house is in Morning mode, and repeat this for each of my modes.

In this way, I really don't use the groups themselves at all -- they are just parameters for how / where I want my Scenes to work.

Of course, if I want any scene to work on all of the lights, I just push that Scene's momentary button (scenes, by default, use a Group of "0" - which the Hue Hub interprets as "all lights").

Please let me know if you run into any problems, or have any suggestions.

And, if you feel like making a donation for these community efforts, it would be greatly appreciated: https://www.paypal.me/anthonypastor . Thanks!

hue_b_smart's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hue_b_smart's Issues

Can not link to Hue Hub

When trying to link to Hue hub I get an error in the Smartthings app that access is denied after pressing link button on Hue Hub. Below is an excerpt from my log file.

Thanks for any help you can provide and this application,
Please let me know if you need any additional info,
Randy Fox
[email protected]

5bf572f5-543a-4e2f-897a-e6c65f767be5 11:09:54 PM: debug getChildDevices(false), children=7
4ac587a0-271d-4a04-9ae6-701e951d7cf3 11:09:35 PM: info ||| NST Manager | Updating Structure Data (Last Updated: 180 seconds ago) | Updating Device Data (Last Updated: 180 seconds ago) (async)
813d1769-58cf-40e6-8d26-5768719f0743 11:08:59 PM: debug Parse returned {{ linkText }} has arrived
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:43 PM: error org.springframework.security.access.AccessDeniedException: Access is denied @ line 190
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:43 PM: debug bridge.value.serialNumber = 00178823607e ******************
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:43 PM: debug state.host = 192.168.0.21:80 ******************
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:43 PM: debug state.user = eEXNs7s5IPL3FNXRUDMkLOi8dKn-6xGJ1Hvg4XNp ******************
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:43 PM: debug bridge uuid:2f402f80-da50-11e1-9b23-00178823607e={ssdpUSN=uuid:2f402f80-da50-11e1-9b23-00178823607e, itemsDiscovered=false, networkAddress=C0A80015, ssdpNTS=null, serialNumber=00178823607e, mac=00178823607E, deviceAddress=0050, hub=67ded802-dc6c-4cce-b57d-a078c51f6bc4, ssdpPath=/description.xml, ssdpTerm=urn:schemas-upnp-org:device:basic:1, stringCount=04, verified=true, name=Philips hue (192.168.0.21), devicetype=04}
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:43 PM: debug username eEXNs7s5IPL3FNXRUDMkLOi8dKn-6xGJ1Hvg4XNp
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:43 PM: debug ssdp uuid:2f402f80-da50-11e1-9b23-00178823607e
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:43 PM: debug Bridge linked!
0d0a880a-ac99-4867-9d6e-772f0905fcde 11:08:43 PM: error java.lang.ArrayIndexOutOfBoundsException: 1 @ line 1393
0d0a880a-ac99-4867-9d6e-772f0905fcde 11:08:43 PM: debug Installed with settings: [:]
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:40 PM: debug linkButton [id:488f2dd0-fe3d-4823-be74-ece5cc8187e1, linkingBridge:true, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178823607e, name:linkButton, mac:00178823607E, ip:192.168.0.21]
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:40 PM: debug Sending developer request to 192.168.0.21:80 (00178823607E)
488f2dd0-fe3d-4823-be74-ece5cc8187e1 11:08:36 PM: debug linkButton [id:488f2dd0-fe3d-4823-be74-ece5cc8187e1, linkingBridge:true,

App doesnt show my hue bridge as linked

When opening the Hue B Smart app it doesnt show my bridge as a linked bridge. All of my individual bulbs are on ST and I did link the bridge to ST a while back.

Java error while discovering bulbs, scenes, etc..

I went through the installation without any apparent errors. However, it does not discover the bulbs, scenes, schedules, and groups. When I go to the IDE website and look at Live Logging, I noticed the following:

When looking at the Hue B Smart Filter:

7:15:32 PM: debug Sending bridge discovery.
7:15:32 PM: debug Bridge discovery sent.
7:15:34 PM: debug Discovery Response is [devicetype:04, mac:00178840951B, networkAddress:C0A8503D, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178840951b, ssdpTerm:urn:schemas-upnp-org:device:basic:1, ssdpNTS:null, hub:95887d4d-2fcc-448f-a101-ad2f3445a6a7].
7:15:34 PM: debug Discovered bridge 00178840951B (192.168.80.61)
7:15:34 PM: debug Previously found bridge discovered
7:15:35 PM: debug Discovery Response is [devicetype:04, mac:00178840951B, networkAddress:C0A8503D, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178840951b, ssdpTerm:urn:schemas-upnp-org:device:basic:1, ssdpNTS:null, hub:95887d4d-2fcc-448f-a101-ad2f3445a6a7].

and it keeps repeating without any errors. This appears the be the normal behavior.

When looking at the Hue B Smart Bridge (192.168.80.61 Filter:

7:16:29 PM: trace Bridge discovering all items on Hue hub.
7:16:29 PM: error java.lang.ArrayIndexOutOfBoundsException: 1 @line 1393 (getCommandData)
7:16:43 PM: trace Bridge discovering all items on Hue hub.
7:16:43 PM: error java.lang.ArrayIndexOutOfBoundsException: 1 @line 1393 (getCommandData)

Flashing a Hue White Ambiance bulb causes a flashing loop

I added a group containing 1 Hue White Ambiance bulb and selected the flash option on the tile and it triggered a rapid flashing loop, at one point it got so fast I had to switch the bulb off at the switch and remove the group from the smart app to resolve.

This bulb/room is also controlled by a Hue motion sensor which automatically turns it off after 1 minute of inactivity but the flashing loop started instantly. This was an extract from the IDE logs:

e4d040d2-1eac-4cf2-bb4b-92e0cc13e824 6:35:45 PM: trace Hue B Smart Lux Group: flash():
e4d040d2-1eac-4cf2-bb4b-92e0cc13e824 6:35:45 PM: trace Hue B Smart Lux Group: updateStatus ( alert:lselect )
b75e6be3-1d1d-4633-a18f-08ab1abfaef7 6:35:44 PM: debug GROUP: devId = 0017882B83F3/GROUP3
b75e6be3-1d1d-4633-a18f-08ab1abfaef7 6:35:44 PM: debug k = /groups/3/action/alert, split1 = groups, split2 = 3, split3 = action, split4= alert, value = lselect
b75e6be3-1d1d-4633-a18f-08ab1abfaef7 6:35:44 PM: trace [/groups/3/action/alert:lselect]
e4d040d2-1eac-4cf2-bb4b-92e0cc13e824 6:35:44 PM: trace Hue B Smart Lux Group: flash():
e4d040d2-1eac-4cf2-bb4b-92e0cc13e824 6:35:44 PM: trace Hue B Smart Lux Group: updateStatus ( alert:lselect )
b75e6be3-1d1d-4633-a18f-08ab1abfaef7 6:35:44 PM: debug GROUP: devId = 0017882B83F3/GROUP3
b75e6be3-1d1d-4633-a18f-08ab1abfaef7 6:35:44 PM: debug k = /groups/3/action/alert, split1 = groups, split2 = 3, split3 = action, split4= alert, value = lselect
b75e6be3-1d1d-4633-a18f-08ab1abfaef7 6:35:44 PM: trace [/groups/3/action/alert:lselect]
e4d040d2-1eac-4cf2-bb4b-92e0cc13e824 6:35:44 PM: trace Hue B Smart Lux Group: flash():
e4d040d2-1eac-4cf2-bb4b-92e0cc13e824 6:35:44 PM: trace Hue B Smart Lux Group: updateStatus ( alert:lselect )
1bd3e7c4-2685-4c37-9750-8c8deda3f213 6:35:44 PM: trace getPhrases(), state.welcomeIssue = null
b75e6be3-1d1d-4633-a18f-08ab1abfaef7 6:35:43 PM: debug GROUP: devId = 0017882B83F3/GROUP3
b75e6be3-1d1d-4633-a18f-08ab1abfaef7 6:35:43 PM: debug k = /groups/3/action/alert, split1 = groups, split2 = 3, split3 = action, split4= alert, value = lselect

Cant apply QuickFixes

Moans about Permission Denied. Seems like a great feature - wondering what I might be doing wrong?

Device being on not tracked in group

It appears that in a room with a number of devices, if you call a scene for a group that turns on a single device, the group does not register as being 'on'. This results in any further not being able to turn off the entire group and therefore the single light that is actually on

Happy to provide detail/screenshots as required, please advise

not working on install

After being on the screen that asks to press the button, I do so and then click next, however the screen is completely blank and just says "Hue B Smart" at the top.

If I click done it says "Error saving unnamed page. Please contact SmartApp Developer"

Also if I try again and press the button it sometimes pops up and says "You are not authorized to perform the requested operation".

I'm using the newest Hue Bridge, have properly uploaded and published both the SmartApp and the Device Handlers, never had any issues like this with previous app installations.

Hue B Smart port 39500

Hello,

I have been trying to integrate my Smart Things bridge with Home Assistant and I have noticed that messages from Home Assistance bound for my Smart Things hub are being actioned by Hue B Smart rather then the Smart Things bridge smart app thats supposed to be handling them. This was an example log entry for Hue B Smart, is this supposed to be listening on 39500 ?

unknown response: {content-length=44, connection=close, host=10.0.0.91:39500, content-type=application/json, accept=application/json, post /

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.