[UPDATE] IKEA Trådfri Bulb Device Type

dth_lighting

(sapstar) #21

Thanks for the response. I compared it to the Osram Lightify bulbs I have connected to smartthings. These were added as ZLL white colour temperature bulbs. Below is a screenshot how it looks.


I have some pistons to set lights to a specific Colour temperature based on time if the day. It will be easier for me to see the colour temperature and adjust the slider if one of my pistons don’t fire correctly.


(Gavin Melling) #22

One small change that I’ve made.

I’ve changed the following (line 63) from

multiAttributeTile(name:“switch”, type: “lighting”, width: 6, height: 4){
to
multiAttributeTile(name:“switch”, type: “lighting”, width: 6, height: 4, canChangeIcon: true){

This means I can select my own icon for the bulbs.


(Gavin Melling) #23

Change line 200 from

sendEvent(name: “colorName”, value: genericName )

to

sendEvent(name: “colorName”, value: value + “K”)

I’m not saying this is the neatest way, cleanest way or best way to do it; but it appears to work.

There is a small jump having said that when setting using the slider, but still better.


(Edvald Eysteinsson) #24

I’ve updated the code and I added a preference toggle so that those that prefer kelvin can enable that instead


(Edvald Eysteinsson) #25

Added that to the code


(Edvald Eysteinsson) #26

I’m not sure why it would be any different and since i don’t have ActionTiles a can’t debug, I’m guessing it’s related to
https://community.smartthings.com/t/things-integration-with-smarttiles-actiontiles/69418/2
But i would suggest asking the authors and if anything needs to be added/changed I might implement it(depending on what needs to change)


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy; NOT a SmartThings Employee.) #27

Hi Luke… (@Edvald) The answer is: Both the DTH and ActionTiles need to implement a Capability for it to be functional in ActionTiles.

  • ActionTiles currently supports DTH’s that “properly” implement Capability Color Control, though there is some inconsistency in some DTH’s that implement it, so a bug slipped into our code which is on our to-fix list.

  • ActionTiles currently does not support controlling Capability Color Temperature. We recommend that you visit our Support & Ideas Feedback forum to post this as a Feature Request. Customer’s can vote to help us prioritize features. http://www.actiontiles.com/feedback This is a good request, because we want to support as many of the official Capabilities as possible; but not all are easy to implement as Tiles.

Thanks!


(Luke) #28

Thanks to all for the replies. I will visit the forum as you suggest.


(sapstar) #29

Thanks very much. You are a star.


(sapstar) #30

@Edvald Is it not possible to use Github to automatically update code in smartthings for your device handler? I tried the below, but github integration doesn’t seem to work.

edvaldeysteinsson/SmartThingsResources (master)


(sapstar) #31

Noticed a slight bug. I have CoRE pistons which send colour temperatures of 2700, 3500 and 6500 to the bulbs based on time. As the ikea bulbs only go upto 4000K, they usually will be set to 4000 even when I sent 6500 which makes sense. But now I see that the UI reports 6500K as below instead of the 4000K. This is sorted by clicking refresh.


(Edvald Eysteinsson) #32

Im not sure how that works, haven’t enabled it and I’m not sure i can, the docs says it only works in the US.

http://docs.smartthings.com/en/latest/tools-and-ide/github-integration.html?highlight=github


(Edvald Eysteinsson) #33

This should have caused issues for you before the last change, the value sent to setColorTemperature() was sent to the bulb without any validation and the IKEA bulbs don’t do anything if you tell them to go to a temp that is outside their scope, i committed some code for validation that might/should solve it but i haven’t tested it yet, let me know if it solved it for you.


(sapstar) #34

It has been enabled for EU users recently… I believe few months ago. I am not sure how to set it up too.


(Gavin Melling) #35

It works fine in the UK, although I think unofficially for now.

Just go here; https://graph-eu01-euwest1.api.smartthings.com/githubAuth/step1


(Edvald Eysteinsson) #36

So what i gather from this is that one has to have a fork of https://github.com/SmartThingsCommunity/IKEA-Tradfri in order to be able to connect SmartThings IDE with GitHub and if someone wants to have access to my DTH they will need to fork my fork of the SmartThingsPublic repo and connect that with their SmartThings IDE?


(Gavin Melling) #37

I haven’t quite understood why I needed to fork the SmartThings repo to be honest, I think it’s to do with submitting for the Marketplace.

If I pull from your repo I don’t need to Fork it, ST just grabs it and checks for changes, you just need to make the formatting correct.

Just please create a new repo called Ikea-Tradfri lights and don’t add to the SmartThings public, as I’ve got a few of them and it’s annoying!


(Edvald Eysteinsson) #38

What do you mean by “you just need to make the formatting correct”?


(Gavin Melling) #39

Stupid vocabulary on my way out from work.
I meant you just need to make sure that the GitHub structure (folders and filenames) is correct.


(sapstar) #40

I didn’t have any problem with the temperature updates on the bulbs when sending 6500K. They fall back to 4000K. The issue I raised was only with the app. It displays the temperature as 6500K eventhough it was set to 4000K. Clicking refresh displays 4000K.
Thanks for publishing the new version. I updated to the new version. Will test it tomorrow when the colour temperature piston executes :slight_smile:.