Author Topic: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin  (Read 3422 times)

Offline hellovn

  • Full Member
  • ***
  • Posts: 246
  • Karma: +19/-46
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #30 on: April 02, 2018, 08:03:14 am »
Great plugins. I have been waiting for hue motion sensors for 2 years.

thx. motion and also temperature,  light sensor ( the Hue motion sensor is a great piece of HW and include the 3 sensors )

One question: did you use URL hashcode change to detect hue motion sensor change or periodic check the change every xxx of seconds?
Polling. the refresh period variable allows to control the frequency. Do you have details or doc page explaining the other method? I did not see it in the Philips hue api spec

I was just thinking another way to reduce the network to hue hub. I look at the response header and it does not have a last modified date so it seems nothing we can do.

Offline amg0

  • Sr. Hero Member
  • ******
  • Posts: 2795
  • Karma: +183/-8
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #31 on: April 02, 2018, 11:21:23 am »
Hello all, the plugin is now published on the MCV store
http://apps.mios.com/plugin.php?id=9066

as well as on the Alternate App Store from ALTUI

Offline rafale77

  • Hero Member
  • *****
  • Posts: 859
  • Karma: +42/-20
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #32 on: April 02, 2018, 04:45:11 pm »
Amg0: Something a little odd I discovered trying to install on Openluup. Once the plugin is installed, the iphone locator plugin stops working: it is no longer able to ping the iphone. Once I delete the althue plugin, the iphone locator works again...
Openluup (47 devices, 73 scenes, 16 apps) controlling HomeAss + VeraPlus with 117 zwave nodes, 8 Zigbee nodes, 5 apps, 233 vera devices, 74 scenes + VeraEdge (0 node, 26 devices, 6 App, 0 scene); Bridged to Homekit and Alexa.

Offline akbooer

  • Master Member
  • *******
  • Posts: 5725
  • Karma: +246/-69
  • "Less is more"
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #33 on: April 02, 2018, 04:58:15 pm »
Here's just a wild guess...

...some of this code adds extra functions to the string library.  This may cause incompatibilities between plugins.

I don't think modifying system libraries in general is a good plan.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 2x Philips Hue
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline amg0

  • Sr. Hero Member
  • ******
  • Posts: 2795
  • Karma: +183/-8
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #34 on: April 02, 2018, 05:18:03 pm »
Amg0: Something a little odd I discovered trying to install on Openluup. Once the plugin is installed, the iphone locator plugin stops working: it is no longer able to ping the iphone. Once I delete the althue plugin, the iphone locator works again...

it works fine for me with both enabled , in UI7 and UI5.
please enable DEBUG on IphoneLocator, then reload luup and send me the logs

Offline jeubanks

  • Full Member
  • ***
  • Posts: 108
  • Karma: +2/-0
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #35 on: April 02, 2018, 06:37:15 pm »
Not sure if this is "normal".  In a PLEG automation, I used setLoadLevel on a Hue light and nothing happened.  Do I need to turn on first then set the level?

Offline amg0

  • Sr. Hero Member
  • ******
  • Posts: 2795
  • Karma: +183/-8
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #36 on: April 02, 2018, 07:09:11 pm »
Not sure if this is "normal".  In a PLEG automation, I used setLoadLevel on a Hue light and nothing happened.  Do I need to turn on first then set the level?

The official action name is the dimming service file is SetLoadLevelTarget not setloadlevel
I tried on a switched off light to call SetLoadLevelTarget with a proper parameter and it switched the light on

Offline rafale77

  • Hero Member
  • *****
  • Posts: 859
  • Karma: +42/-20
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #37 on: April 02, 2018, 08:27:03 pm »
Amg0: Something a little odd I discovered trying to install on Openluup. Once the plugin is installed, the iphone locator plugin stops working: it is no longer able to ping the iphone. Once I delete the althue plugin, the iphone locator works again...

it works fine for me with both enabled , in UI7 and UI5.
please enable DEBUG on IphoneLocator, then reload luup and send me the logs which I have PMed you

Ok. Will do. Will need some time as I will be out of time the rest of the week.

Edit: I was able to reproduce the problem 3 times by installing and uninstalling the ALTHue plugin. I found nothing useful in the logs.
« Last Edit: April 02, 2018, 10:30:13 pm by rafale77 »
Openluup (47 devices, 73 scenes, 16 apps) controlling HomeAss + VeraPlus with 117 zwave nodes, 8 Zigbee nodes, 5 apps, 233 vera devices, 74 scenes + VeraEdge (0 node, 26 devices, 6 App, 0 scene); Bridged to Homekit and Alexa.

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1190
  • Karma: +30/-32
    • Worthington Engineering, Inc.
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #38 on: April 02, 2018, 08:38:24 pm »
+1 amg0.
Vera 3, UI7 1.7.1017, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline jeubanks

  • Full Member
  • ***
  • Posts: 108
  • Karma: +2/-0
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #39 on: April 02, 2018, 11:12:18 pm »
Not sure if this is "normal".  In a PLEG automation, I used setLoadLevel on a Hue light and nothing happened.  Do I need to turn on first then set the level?

The official action name is the dimming service file is SetLoadLevelTarget not setloadlevel
I tried on a switched off light to call SetLoadLevelTarget with a proper parameter and it switched the light on

Yeah yeah, I didn't use the "offical" name when I was posting, sorry  ::)

Anyways, it was about 2 minutes later I came back and updated my post saying NEVERMIND.... but I don't see it anywhere, so it must not have actually posted.  It turns out that someone had turned the lamp off.  Found out when I went into the plugin and looked at the "information" section. 

On the flip side everything is working as it should (for me at least).  I'm doing so re-org stuff over the next couple days.  re-installing another pi with openLuup.  Not sure if I want to move Hue off to that or not.  I have two VeraPlus units already 1 for z-wave/zigbee one for virtual devices except for lights (Caseta and Hue).  Still looking for more ideas on what to do with openLuup and that second VeraPlus box...

Offline amg0

  • Sr. Hero Member
  • ******
  • Posts: 2795
  • Karma: +183/-8
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #40 on: April 03, 2018, 02:35:40 am »
About ALTHue & IPhoneLocator issue on openluup

I have posted a fix on https://github.com/amg0/ALTHue and on https://github.com/amg0/IPhoneLocator for the issue.  you can download and apply these new versions. I have a openluup running with both enabled right now

it does seem to come from the fact that device plugins openluup share the same instance of the global libraries ( like string ), so I avoided the conflict but other plugins could have the same issue. I ll check on mines

Offline akbooer

  • Master Member
  • *******
  • Posts: 5725
  • Karma: +246/-69
  • "Less is more"
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #41 on: April 03, 2018, 03:05:50 am »
it does seem to come from the fact that device plugins openluup share the same instance of the global libraries ( like string ), so I avoided the conflict but other plugins could have the same issue.

I've just checked, and it turns out that the Arduino (MySensors) plugin also modifies the string library, so if you're running that, there may be problems too.

It's easy to generate an error and terminate a plugin if it tries to do this.  It turns out to be much harder to give each plugin its own set of system libraries.  I may add an optional check to openLuup to catch this type of error in future.  Apologies for any difficulties caused.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 2x Philips Hue
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline rafale77

  • Hero Member
  • *****
  • Posts: 859
  • Karma: +42/-20
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #42 on: April 03, 2018, 04:01:11 am »
Thank you to both amg0 for the fix and akbooer for the idea and the openluup check.
Openluup (47 devices, 73 scenes, 16 apps) controlling HomeAss + VeraPlus with 117 zwave nodes, 8 Zigbee nodes, 5 apps, 233 vera devices, 74 scenes + VeraEdge (0 node, 26 devices, 6 App, 0 scene); Bridged to Homekit and Alexa.

Offline akbooer

  • Master Member
  • *******
  • Posts: 5725
  • Karma: +246/-69
  • "Less is more"
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #43 on: April 07, 2018, 03:15:38 am »
Thank you to both amg0 for the fix and akbooer for the idea and the openluup check.

In the latest openLuup development release v18.4.7, I've managed to sandbox the string library between separate devices, so this potential issue with other plugins should not happen, and there's no need to modify their code.

I still believe, however, that it is bad practice to modify system libraries.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 2x Philips Hue
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline json

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: New Plugin : ALTHue - the Alternate Edition of the Philips Hue Plugin
« Reply #44 on: April 07, 2018, 05:28:29 am »
Hi
Does Althue plugin support IKEA Tradfri led lamps?