Philips Hue integration not working well anymore on beta V3.9672

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
RikkieB
Posts: 52
Joined: Monday 28 March 2016 17:11
Target OS: Raspberry Pi
Domoticz version: 4.9732
Contact:

Philips Hue integration not working well anymore on beta V3.9672

Post by RikkieB » Thursday 21 June 2018 22:30

Hi,

On the newest beta V3.9672
Build Hash: d3f48f9a
Build Date: 2018-06-21 15:50:37

Raspberry PI the Philips Hue integration isn't working properly. I can start a scene from domoticz, but no feedback from the individual bulbs is received anymore. on my iPad in the home app I do see feedback from the bulbs, so I think something is wrong in the latest beta.

Rik

RikkieB
Posts: 52
Joined: Monday 28 March 2016 17:11
Target OS: Raspberry Pi
Domoticz version: 4.9732
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by RikkieB » Friday 22 June 2018 19:35

No one experiencing the same issues?
I added the Hue bridge again and disabled the 'old' installation of the bridge.
Scenes and groups are added but the hardware (bulbs) not
thx

User avatar
waaren
Posts: 1230
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by waaren » Friday 22 June 2018 21:15

I checked but do not experience the same. (checked with version V3.9672)
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

commentator
Posts: 89
Joined: Thursday 23 June 2016 14:41
Target OS: Raspberry Pi
Domoticz version: beta
Location: NL
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by commentator » Friday 22 June 2018 21:49

seems to be something changed as the status isnt updated as before.
I have my hue lights connected to my philips tv. In the past almost every change of the light resulted in "Set Color" in the log of the light.
Since the 9673 update there is no activity recorded (and I didn't change script_time_checkLights.lua )

RikkieB
Posts: 52
Joined: Monday 28 March 2016 17:11
Target OS: Raspberry Pi
Domoticz version: 4.9732
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by RikkieB » Friday 22 June 2018 22:15

I don't see the lights in the log anymore , only the motion sensors of Hue. Indeed with every change in status I could see it in the logging, but now it's gone and no lights in the logging, so I hope someone can have a look here.

RikkieB
Posts: 52
Joined: Monday 28 March 2016 17:11
Target OS: Raspberry Pi
Domoticz version: 4.9732
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by RikkieB » Saturday 23 June 2018 8:27

Still trying to pinpoint the issue. When I toggle the lights individual within Domoticz, I do see the status change in the log per light . However when starting a Hue scene from within Domoticz, no status update can be seen, although the lights turn on/off. I use the status of some lights in a LUA script, which is now responding wrongly.

RikkieB
Posts: 52
Joined: Monday 28 March 2016 17:11
Target OS: Raspberry Pi
Domoticz version: 4.9732
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by RikkieB » Saturday 23 June 2018 20:13

I installed a backup image of my raspberry pi, with beta V3.9639. The status of the Hue lights work in that beta. Updating to beta V3.9701 introduced the problem again: no status feedback of the lights, so it must be something in the beta's > V3.9639.
Any help is appreciated.

dgilbert2
Posts: 53
Joined: Wednesday 16 August 2017 8:08
Target OS: Raspberry Pi
Domoticz version: 4.9728
Location: UK
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by dgilbert2 » Saturday 23 June 2018 22:46

I have just updated to the Stable version V4.9700 and also no longer get any updates but I can control my hue lights.

dgilbert2
Posts: 53
Joined: Wednesday 16 August 2017 8:08
Target OS: Raspberry Pi
Domoticz version: 4.9728
Location: UK
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by dgilbert2 » Sunday 24 June 2018 9:21

As a temporary measure I have re-enabled the script described below to get the status of my Hue lights;

https://www.domoticz.com/wiki/Simple_sc ... Hue_status

Hopefully a permanent integrated solution can be found soon.

ittie
Posts: 5
Joined: Friday 22 July 2016 8:15
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by ittie » Monday 25 June 2018 23:48

Same problem with version Beta V4.9716
I had the sript running in the background but also the script istn't working for me.
No error in the logging. ??????

User avatar
waaren
Posts: 1230
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by waaren » Tuesday 26 June 2018 9:07

ittie wrote:
Monday 25 June 2018 23:48
Same problem with version Beta V4.9716
I had the sript running in the background but also the script istn't working for me.
No error in the logging. ??????
Can you try this dzVents script and report back the results ?

Code: Select all

--[[ GetHueStatus.lua 

    dzVents version must be > 2.4) 
    
]]
return {

    on          =   {   timer           = { "every minute"},
                        httpResponses   = { "getDomoticzHardware" ,
                                            "getHueDeviceStatus" }},
                                            
    data        =   {   previousData    = { history = true, maxMinutes = 5  },
                        HueIP           = { initial = ""                    },
                        HueAPI          = { initial = ""                    }},

    logging     =   {   
                        -- level           =   domoticz.LOG_DEBUG,         -- use one of the levels not both
                        level           =   domoticz.LOG_INFO,
                        marker          =   "getHUEState"             },

    execute = function(dz, trigger)
    
      local function getDomoticzHardware()  -- this function calls local domoticz process and ask for all defined Hardware  
            local jsonString  = "/json.htm?type=hardware"    
            dz.openURL  ({ url      = dz.settings["Domoticz url"] .. jsonString,
                           method   = "GET", callback = "getDomoticzHardware" })
      end
      
      local function getHueStatus() -- this function calls the Phillips hue hub and ask for all lights   
            local jsonString  = "http://" .. dz.data.HueIP .. "/api/" ..  dz.data.HueAPI ..  "/lights"    
            dz.openURL  ({ url      = jsonString,
                           method   = "GET", callback = "getHueDeviceStatus" })
      end

      local function isDevice(deviceName)
        return(dz.devices().find(function(device)
                            return device.name == deviceName
                        end))
                  
      end
      
      local function handleHueDeviceStatus()
        local lights = trigger.json
        local previousData = dz.data.previousData
        local Huedevice 
        
           for i, light in pairs(lights) do
               dz.log("Light found in Hue: " .. light.name,dz.LOG_DEBUG)
               if isDevice(light.name) then     -- The isDevice(light.name) call is quite "expensive" and only here to suppress 
                                                -- error messages in the log when hueDevice does not exist in domoticz
                                                -- if you don't care about these messages or do not have them
                                                -- change to:
                                                -- if dz.devices(light.name) ~= nil then
                    dz.log("Light defined in domoticz: ".. light.name,dz.LOG_DEBUG)
                    deviceInDomoticz = dz.devices( light.name )
                    if( light.state.on and deviceInDomoticz.state == "Off") then
                        dz.log("Correcting status of " .. light.name .."; on in Hue and Off in domoticz. Switching on now ",dz.LOG_INFO)
                        deviceInDomoticz.switchOn()
                    elseif not(light.state.on) and deviceInDomoticz.state == "On" then
                        dz.log("Correcting status of " .. light.name .."; off in Hue and On in domoticz. Switching off now ",dz.LOG_INFO)
                        deviceInDomoticz.switchOff()
                    elseif not(light.state.reachable) and deviceInDomoticz.state == "On" then
                        dz.log("Correcting status of " .. light.name .."; unreachable in Hue and On in domoticz",dz.LOG_INFO)
                        
                         previousData.add( light.name )

                         local olderItems = previousData.subsetSince("00:05:00")  -- Only last 5 mintes
                         local count = olderItems.reduce(function(acc, item)
                                            if (item.data == light.name) then
                                                acc = acc + 1
                                            end
                                            return acc
                                        end, 0)
                        if( count > 5 ) then -- last 5 polls were unreachable, assuming light is off
                            dz.log("Correcting status of " .. light.name .."; unreachable in Hue and On in domoticz. Switching off now (5 min)",dz.LOG_INFO)
                            deviceInDomoticz.switchOff()  
                        end
                    end
               end
            end
        end
      
        local function  handleDomoticzHardware()        -- this function extracts hueIP from json string from getDomoticzHardware call and 
            rt  = trigger.json.result                   -- put these in persistent vars for future use   
            for i = 1,#rt do
                dz.log(rt[i].Type,dz.LOG_DEBUG)
                if rt[i].Type == 38 then                -- Hardware type Hue is 38
                    dz.data.HueIP  = rt[i].Address      -- Fill with IP number
                    dz.data.HueAPI = rt[i].Username     -- Fill with API key
                    return false
                end
            end    
        end
      
        if trigger.isTimer or trigger.isDevice then
            if dz.data.HueIP ~= ""  and dz.data.HueAPI ~= "" then
                getHueStatus()                  -- We already have the API key and hue IP
            else
                getDomoticzHardware()           -- Get API key and hue IP
            end
        else
            if trigger.trigger == "getDomoticzHardware" and trigger.ok then
                handleDomoticzHardware()        -- get API key en hue IP from JSON into persistent vars    
            elseif trigger.trigger == "getHueDeviceStatus" and trigger.ok then
                handleHueDeviceStatus()         -- get hue light info directly from Hue hub
            end
        end      
    end
}
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

florisi
Posts: 43
Joined: Saturday 30 July 2016 10:14
Target OS: Raspberry Pi
Domoticz version: v4.9732
Location: Arnhem
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by florisi » Tuesday 26 June 2018 9:34

I did a fully new install of Domoticz v4.9700 on Raspberry Pi.
Only scenes shows up, I don't get bulbs.
What is wrong?

Domoticz log only says: Hue worker started, no error at all

njvdijk
Posts: 1
Joined: Tuesday 26 June 2018 9:38
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by njvdijk » Tuesday 26 June 2018 9:45

I did a fully new install of Domoticz v4.9700 on Raspberry Pi.
Only scenes shows up, I don't get bulbs.

hbennis
Posts: 6
Joined: Friday 29 September 2017 0:50
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by hbennis » Tuesday 26 June 2018 10:02

I think the problem is the hue bridge and not domoticz.

when i disconnect the power of the bridge and then back on i get this message

2018-06-26 10:00:17.995 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)

Jem101
Posts: 95
Joined: Saturday 02 May 2015 21:26
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Bexleyheath, SE London, UK
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by Jem101 » Tuesday 26 June 2018 11:34

This would indicate that something has changed n the hub's firmware - I believe there was an update recently to it, so the existing Domoticz routines are either no longer sending the expected data to it or not receiving back what they are expecting and erroring out. Odd that scenes etc, are still retrieved OK but it's not unprecedented for a firmware /API change to break one component but not others which seem related.
I firmly believe in having an open mind - although not so open that your brain falls out!

- sometimes attributed to Carl Sagan, but the original quote is much older than that

kuifje
Posts: 18
Joined: Wednesday 25 October 2017 16:38
Target OS: Windows
Domoticz version:
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by kuifje » Tuesday 26 June 2018 11:57

I'm having the same issue here on a windows 8 machine with the latest domoticz version 4.9700. It all worked well in v 3.8153. I am missing 6 hue bulbs. The philips hue bridge is connected but only scene's come out of it instead of my lamps.
Any one know how to solve this or can provide me with a v3.8153.
Thanks in advance.
Kuifje

dgilbert2
Posts: 53
Joined: Wednesday 16 August 2017 8:08
Target OS: Raspberry Pi
Domoticz version: 4.9728
Location: UK
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by dgilbert2 » Tuesday 26 June 2018 11:59

I thought I would add my experience.

My Hue Bridge (2) updated to the firmware (SW 1806051111) on 15th June and I was running Domoticz stable 3.8153. This was working fine, with Domoticz correctly updating the status of all the Hue devices, as I could see it from the logs.

However, when I updated to Domoticz stable 4.9700 on 23rd June, that's when the status of my Hue devices stopped being reported.

As an experiment, I dropped back to 3.8153 and the status updates worked again.

So for my system at least, it seems to point to something changing in the Domoticz Hue integration that seems to be causing the problem.

ittie
Posts: 5
Joined: Friday 22 July 2016 8:15
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by ittie » Tuesday 26 June 2018 12:09

waaren wrote:
Tuesday 26 June 2018 9:07

Can you try this dzVents script and report back the results ?
When I have time this evening I'll try it with dzVents with the latest beta version.
Yesterday evening I reverted back to a backup with a previous beta version(V3.9639) which works like a charm.
Finally had benefit of the automated backup strategy.
Since the previous version is working you could conclude that it isn't the Hue hub.

dgilbert2
Posts: 53
Joined: Wednesday 16 August 2017 8:08
Target OS: Raspberry Pi
Domoticz version: 4.9728
Location: UK
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by dgilbert2 » Tuesday 26 June 2018 12:43

I have just tried the dzVents script which gave the log output below. Of note is that when I switched a Group on (Landing) it correctly update the domoticz switch. The "Group Landing" though did not update.

Code: Select all

2018-06-26 11:33:00.280 Status: Incoming connection from: 127.0.0.1
2018-06-26 11:33:00.530 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua: HTTPResponse: "getDomoticzHardware"
2018-06-26 11:33:00.564 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:34:00.177 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua:, trigger: every minute
2018-06-26 11:34:00.179 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:34:00.691 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua: HTTPResponse: "getHueDeviceStatus"
2018-06-26 11:34:00.794 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:35:00.180 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua:, trigger: every minute
2018-06-26 11:35:00.181 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:35:01.014 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua: HTTPResponse: "getHueDeviceStatus"
2018-06-26 11:35:01.215 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:36:00.196 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua:, trigger: every minute
2018-06-26 11:36:00.198 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:36:00.572 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua: HTTPResponse: "getHueDeviceStatus"
2018-06-26 11:36:00.676 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:36:47.465 Status: Incoming connection from: 52.33.102.55
2018-06-26 11:37:00.207 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua:, trigger: every minute
2018-06-26 11:37:00.209 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:37:00.480 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua: HTTPResponse: "getHueDeviceStatus"
2018-06-26 11:37:00.580 Status: dzVents: Info: getHUEState: Correcting status of Hue Landing; on in Hue and Off in domoticz. Switching on now
2018-06-26 11:37:00.584 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:38:00.207 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua:, trigger: every minute
2018-06-26 11:38:00.208 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:38:00.478 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua: HTTPResponse: "getHueDeviceStatus"
2018-06-26 11:38:00.577 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:39:00.214 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua:, trigger: every minute
2018-06-26 11:39:00.225 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua
2018-06-26 11:39:00.487 Status: dzVents: Info: getHUEState: ------ Start external script: GetHueStatus.lua: HTTPResponse: "getHueDeviceStatus"
2018-06-26 11:39:00.587 Status: dzVents: Info: getHUEState: Correcting status of Hue Landing; off in Hue and On in domoticz. Switching off now
2018-06-26 11:39:00.591 Status: dzVents: Info: getHUEState: ------ Finished GetHueStatus.lua

User avatar
waaren
Posts: 1230
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Philips Hue integration not working well anymore on beta V3.9672

Post by waaren » Tuesday 26 June 2018 14:28

dgilbert2 wrote:
Tuesday 26 June 2018 12:43
I have just tried the dzVents script. Of note is that when I switched a Group on (Landing) it correctly update the domoticz switch. The "Group Landing" though did not update.
Can you please elaborate a bit on your remark about the "Group Landing" ?
Is that a Room or a LightGroup in the hue bridge ? (You can check with: http://hueIP/api/hueAPI/groups )
And are they coupled between Hue and domoticz by name or otherwise ?
What if some light are On, and some lights are Off within one group ?

Hope you can shed some light on this :)
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests