Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Feature] Philips hue light Support #328

Closed
Fraid opened this issue Dec 26, 2016 · 23 comments
Closed

[New Feature] Philips hue light Support #328

Fraid opened this issue Dec 26, 2016 · 23 comments

Comments

@Fraid
Copy link
Contributor

Fraid commented Dec 26, 2016

I would like to be able to take control over my hue system (white and color one).
Philips hue it’s a smart plug and play light, you can change the color, turn on/off the light etc…(more info: http://www2.meethue.com/en-ca/about-hue/).

The hue come with a bridge with a web service there is also different SDK for different platform, including a java SDK (https://developers.meethue.com/tools-and-sdks).

There is no restriction according to the documentation to use it :
All we ask is that you register your apps in the whitelist and make sure to make it clear they are your creation. You may refer to hue and Philips in plain text but you are not allowed to use hue or Philips name and branding or to use hue or Philips in any logo or graphics. What you are allowed to do is to experiment and have fun with hue.

So for now the focus will be on turning on/off the light within MyController.
But after we may add a full configuration form with all functionality or light type offering by hue.

@jkandasa
Copy link
Member

@Fraid We have to extend REST client first for this on https://github.com/mycontroller-org/mycontroller-rest-clients

I will add REST API client for this.

@jkandasa jkandasa self-assigned this Dec 27, 2016
@Fraid
Copy link
Contributor Author

Fraid commented Dec 27, 2016

@jkandasa I quite understand the implementation by following the PhantIO and MQTT. Should I start the provider then, while you doing the client ?

@jkandasa
Copy link
Member

@Fraid Please go ahead and work on the area that you can understand. Thank you so much for your support!!

@Fraid
Copy link
Contributor Author

Fraid commented Dec 28, 2016

@jkandasa Thank to you, MyController is awesome :D !
I pushed the provider and created PhilipsHueGatewayPoller.java for welcoming the REST client.

@jkandasa
Copy link
Member

@Fraid I have pushed REST Client update. To use this update parent pom.xml version to 17,

  <parent>
    <groupId>org.mycontroller</groupId>
    <artifactId>mycontroller-parent</artifactId>
    <version>17</version>
  </parent>

You can see the Philips hue API here

Sample code to access API,

PhilipsHueClient philipsHueClient = new PhilipsHueClientBuilder().uri("http://10.10.10.10")
                .addProperty(PhilipsHueClient.KEY_AUTHORIZED_USER, "xyz").build();
        //To get list of lights
        philipsHueClient.lights().listAll().getEntity();
        //To get list new lights
        philipsHueClient.lights().listNew().getEntity();
        //Trigger search new
        philipsHueClient.lights().searchNew();
        //Get State of "switch-1"
        philipsHueClient.lights().state("switch-1").getEntity();
        //Update name of "switch-1"
        philipsHueClient.lights().updateName("switch-1", "switch-xyz");
        //Update state of "switch-1" >> ON
        State state = State.builder().on(true).build();
        philipsHueClient.lights().updateState("switch-1", state);

NOTE: You might get issue with ResponseCodes. I do not have hardware to test this.

@jkandasa jkandasa added this to the 0.0.3.Final milestone Dec 29, 2016
@Fraid
Copy link
Contributor Author

Fraid commented Dec 29, 2016

I got the following error when trying to get list of light:
Using : philipsHueClient.lights().listAll().getEntity();

com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class org.mycontroller.restclient.philips.hue.model.State]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?)
 at [Source: {"2":{"state":{"on":false__**BELOW_FORMATED_JSON**__swversion":"5.50.1.19085"}}; line: 1, column: 16] (through reference chain: java.util.LinkedHashMap["2"]->org.mycontroller.restclient.philips.hue.model.LightState["state"])
	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1106)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:296)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:133)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:258)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringMap(MapDeserializer.java:495)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:341)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:26)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2764)
	at org.mycontroller.restclient.core.DefaultClientResponse.parse(DefaultClientResponse.java:74)
	at org.mycontroller.restclient.core.DefaultClientResponse.getEntity(DefaultClientResponse.java:105)
	at org.mycontroller.standalone.gateway.philipshue.PhilipsHueGatewayPoller.run(PhilipsHueGatewayPoller.java:65)
	at java.lang.Thread.run(Thread.java:745

Received json:

{
  "2": {
    "state": {
      "on": false,
      "bri": 1,
      "hue": 13122,
      "sat": 211,
      "effect": "none",
      "xy": [
        0.5119,
        0.4147
      ],
      "ct": 467,
      "alert": "none",
      "colormode": "xy",
      "reachable": true
    },
    "type": "Extended color light",
    "name": "Room 1",
    "modelid": "LCT001",
    "manufacturername": "Philips",
    "uniqueid": "00:00:00:00:00:00:00:00-00",
    "swversion": "5.23.1.13452"
  }

}

@jkandasa
Copy link
Member

@Fraid added default constructor mycontroller-org/mycontroller-rest-clients@dd871f8

@Fraid
Copy link
Contributor Author

Fraid commented Dec 30, 2016

Awesome! working now. Hue are well listed and I'm also able to turn on the light :D !

But for next part I have a few question about the code:

  • How do I set the sensor name?
  • In MyController->Settings->Variables mapper, there is some predefined sensor type. How do you create that? I'd Iike a "sensor type" called "hue" with variable Status, RGB etc..

Both working if I set it myself, but the idea is to make it easy for end user.

@Fraid Fraid closed this as completed Dec 30, 2016
@Fraid Fraid reopened this Dec 30, 2016
@jkandasa
Copy link
Member

jkandasa commented Dec 30, 2016

@Fraid

In MyController->Settings->Variables mapper, there is some predefined sensor type. How do you create that? I'd Iike a "sensor type" called "hue" with variable Status, RGB etc..

We can go with RGB light as sensor type. To add Status variable with RGB light, add it on Settings >> Variables mapper >> RGB light >> Edit Select Status and Save.

image

How do I set the sensor name?

Will check this and update you soon.

@Fraid
Copy link
Contributor Author

Fraid commented Dec 30, 2016

@jkandasa I understand how to do it graphically but how about programatically, is it possible ?
Also the hue as different stats (Bridness, effect, colormode etc...) and according to the documentation colormode isn't compatible with all light.

Also what is the best way to handle MESSAGE_TYPE.C_INTERNAL-MESSAGE_TYPE_INTERNAL.I_PRESENTATION to update all hue info?
I may wrong, but he feel weird to me to call run() method from PhilipsHueGatewayPoller himself.

@Fraid
Copy link
Contributor Author

Fraid commented Dec 30, 2016

@jkandasa I found how to add predefined sensor type, by following "MULTIMETER", I guess setting the name and the type programatically it's same issue ?

@Fraid
Copy link
Contributor Author

Fraid commented Jan 4, 2017

@jkandasa No need anymore to deal with the name, I finally found a way to set it. I'll review everything probably tomorrow night.

@Fraid
Copy link
Contributor Author

Fraid commented Jan 6, 2017

Hi @jkandasa,

Just to keep you updated, actually I found an issue with hue node going down and I have to restart my controller to get the node back.

Everything work well on my testing environnement (with hue only) for 2 days and both with release running together.
Note: the release has MySensor with rule, scene etc..

When I actived the debug log, I receive the playload. And then no more entry, look like the poller as an issue. No crash appear while at the same time on test environnement it’s working.

So I added more error validation with log too and will see how everything go.

@Fraid
Copy link
Contributor Author

Fraid commented Jan 7, 2017

@jkandasa My router was down for 20min around 2PM. And I got the below crash in log.
Since that, unable to reconnect to the bridge.

I'll catch the exception, but Is it possible to get an error 500 code on the clients side ?

Exception in thread "Thread-8" javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request
	at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:287)
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:436)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:102)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:64)
	at com.sun.proxy.$Proxy31.getAll(Unknown Source)
	at org.mycontroller.restclient.philips.hue.clients.DefaultLightsClient.listAll(DefaultLightsClient.java:54)
	at org.mycontroller.standalone.gateway.philipshue.PhilipsHueGatewayPoller.run(PhilipsHueGatewayPoller.java:76)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Network is unreachable
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
	at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:283)
	... 7 more

@jkandasa
Copy link
Member

jkandasa commented Jan 19, 2017

@Fraid I have merged your PR. Thank you so much for your hard work and patience. 🎉

I have fixed few known issue and pushed changes on SNAPSHOT build. Could you please download and use SNAPSHOT version and verify things are working as expected.

Thank you!

@Fraid
Copy link
Contributor Author

Fraid commented Jan 20, 2017

@jkandasa Thank you ;)
Nice it's working :D ! and sorry for delay. I can turn on/off light, modify light level and rgb.
I found one main issue, the color is not pulled from the bridge on configuration. Only status , name and light level is set.

Also I have the following crash, I'll be able to give you more detail or a fix on Saturday.

java.lang.NullPointerException: null
	at org.mycontroller.standalone.gateway.philipshue.PhilipsHueGatewayPoller.updateRecords(PhilipsHueGatewayPoller.java:140)
	at org.mycontroller.standalone.gateway.philipshue.PhilipsHueGatewayPoller.run(PhilipsHueGatewayPoller.java:82)
	at java.lang.Thread.run(Thread.java:745)
2017-01-20 00:10:42,506 DEBUG [Thread-17] [org.mycontroller.standalone.gateway.philipshue.PhilipsHueGatewayPoller:102] On error retrying...
at [Source: [{"success":{"/lights/7/state/bri":51}}]; line: 1, column: 1]
	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)

	at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:857)
	at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:62)
	at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:11)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2764)
	at org.mycontroller.restclient.core.DefaultClientResponse.parse(DefaultClientResponse.java:74)
	at org.mycontroller.restclient.core.DefaultClientResponse.getEntity(DefaultClientResponse.java:105)
	at org.mycontroller.restclient.core.DefaultClientResponse.toString(DefaultClientResponse.java:140)
	at org.mycontroller.restclient.core.DefaultClientResponse.validateResponse(DefaultClientResponse.java:64)
	at org.mycontroller.restclient.core.DefaultClientResponse.<init>(DefaultClientResponse.java:54)
	at org.mycontroller.restclient.philips.hue.clients.DefaultLightsClient.updateState(DefaultLightsClient.java:126)
	at org.mycontroller.standalone.gateway.philipshue.PhilipsHueGatewayPoller.write(PhilipsHueGatewayPoller.java:235)
	at org.mycontroller.standalone.gateway.philipshue.PhilipsHueGatewayImpl.write(PhilipsHueGatewayImpl.java:61)
	at org.mycontroller.standalone.message.McMessageUtils.sendToGateway(McMessageUtils.java:557)
	at org.mycontroller.standalone.provider.philipshue.PhilipsHueProviderBridge.executeMcMessage(PhilipsHueProviderBridge.java:46)
	at org.mycontroller.standalone.provider.philipshue.PhilipsHueProviderBridge.executeRawMessage(PhilipsHueProviderBridge.java:62)
	at org.mycontroller.standalone.message.McMessageUtils.sendToProviderBridge(McMessageUtils.java:583)
	at org.mycontroller.standalone.message.MessageMonitorThread.processRawMessage(MessageMonitorThread.java:107)
	at org.mycontroller.standalone.message.MessageMonitorThread.run(MessageMonitorThread.java:182)
	at java.lang.Thread.run(Thread.java:745)
com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token
 at [Source: [{"success":{"/lights/7/state/xy":[0.6106,0.2839]}}]; line: 1, column: 1]
	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
	at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:857)
	at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:62)
	at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:11)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2764)
	at org.mycontroller.restclient.core.DefaultClientResponse.parse(DefaultClientResponse.java:74)
	at org.mycontroller.restclient.core.DefaultClientResponse.getEntity(DefaultClientResponse.java:105)
	at org.mycontroller.restclient.core.DefaultClientResponse.toString(DefaultClientResponse.java:140)
	at org.mycontroller.restclient.core.DefaultClientResponse.validateResponse(DefaultClientResponse.java:64)
	at org.mycontroller.restclient.core.DefaultClientResponse.<init>(DefaultClientResponse.java:54)
	at org.mycontroller.restclient.philips.hue.clients.DefaultLightsClient.updateState(DefaultLightsClient.java:126)
	at org.mycontroller.standalone.gateway.philipshue.PhilipsHueGatewayPoller.write(PhilipsHueGatewayPoller.java:235)
	at org.mycontroller.standalone.gateway.philipshue.PhilipsHueGatewayImpl.write(PhilipsHueGatewayImpl.java:61)
	at org.mycontroller.standalone.message.McMessageUtils.sendToGateway(McMessageUtils.java:557)
	at org.mycontroller.standalone.provider.philipshue.PhilipsHueProviderBridge.executeMcMessage(PhilipsHueProviderBridge.java:46)
	at org.mycontroller.standalone.provider.philipshue.PhilipsHueProviderBridge.executeRawMessage(PhilipsHueProviderBridge.java:62)
	at org.mycontroller.standalone.message.McMessageUtils.sendToProviderBridge(McMessageUtils.java:583)
	at org.mycontroller.standalone.message.MessageMonitorThread.processRawMessage(MessageMonitorThread.java:107)
	at org.mycontroller.standalone.message.MessageMonitorThread.run(MessageMonitorThread.java:182)
	at java.lang.Thread.run(Thread.java:745)

jkandasa added a commit that referenced this issue Jan 20, 2017
@jkandasa
Copy link
Member

@Fraid Issues are fixed with mycontroller-org/mycontroller-rest-clients@b2cf5d3 and fixed NPE.

Could you please test this when you get time. and update the status. How many seconds taking to pass request to end device? Is it ok?

@Fraid
Copy link
Contributor Author

Fraid commented Jan 22, 2017

@jkandasa Almost good :D !, request are responsive enought (less than a second).
Just a little issue when adding the bridge for the first time. Both status and light level are set. But RGB value took like 2 to 10 mins to be updated.
rgb_issue
And from log message has been send, like status and light level. Any idea ?

Also when I'm on `light sensor detail page, I constantly have the following crash:

[Sat Jan 21 21:42:51 EST 2017] IO error: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? in processing a request from /127.0.0.1:8443 / sun.security.ssl.SSLSocketImpl

Is it linked?

@jkandasa
Copy link
Member

@Fraid Can you enable and check the debug log do you receive RGB values?

[Sat Jan 21 21:42:51 EST 2017] IO error: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? in processing a request from /127.0.0.1:8443 / sun.security.ssl.SSLSocketImpl

^ There is no link for this issue.

@Fraid
Copy link
Contributor Author

Fraid commented Jan 22, 2017

@jkandasa here my testing:

Gateway page -> add hue bridge, here the log (added more log):

2017-01-22 00:26:49,094 DEBUG [Thread-18] [PhilipsHueGatewayPoller:118] current light record: 8,LightState(state=State(on=true, bri=254, hue=8418, sat=140, xy=[0.4573, 0.41], ct=366, alert=select, effects=null, colormode=ct, reachable=true), type=Extended color light, name=Hall, modelid=LCT014,   manufacturername=Philips, luminaireuniqueid=null, swversion=1.15.2_r19181, pointsymbol=null) 
2017-01-22 00:26:49,096 DEBUG [Thread-18] [PhilipsHueGatewayPoller:211] putMessage ...[Presentation, RGB light, 8, Hall] 
2017-01-22 00:26:49,096 DEBUG [Thread-18] [PhilipsHueGatewayPoller:196] updateSetPayload ...V_STATUS,8,1 
2017-01-22 00:26:49,097 DEBUG [Thread-18] [PhilipsHueGatewayPoller:211] putMessage ...[Set, Status, 8, 1] 
2017-01-22 00:26:49,097 DEBUG [Thread-18] [PhilipsHueGatewayPoller:196] updateSetPayload ...V_LIGHT_LEVEL,8,99 
2017-01-22 00:26:49,097 DEBUG [Thread-18] [PhilipsHueGatewayPoller:211] putMessage ...[Set, Light level, 8, 99] 
2017-01-22 00:26:49,097 DEBUG [Thread-18] [PhilipsHueGatewayPoller:181] updateRGB    ...true 
2017-01-22 00:26:49,097 DEBUG [Thread-18] [PhilipsHueGatewayPoller:186]  xy [0.4573, 0.41] 
2017-01-22 00:26:49,098 DEBUG [Thread-18] [PhilipsHueGatewayPoller:196] updateSetPayload ...V_RGB,8,#FECE77 
2017-01-22 00:26:49,098 DEBUG [Thread-18] [PhilipsHueGatewayPoller:211] putMessage ...[Set, RGB, 8, #FECE77] 
2017-01-22 00:26:49,109 DEBUG [Thread-7] [PhilipsHueProviderBridge:58] Received raw message: [RawMessage(gatewayId=1, data=[Set, Light level, 2, 0], subData=null, isTxMessage=false, networkType=PHILIPS_HUE, timestamp=null)]

...(Here are all light Received raw)

2017-01-22 00:26:49,291 DEBUG [Thread-7] [PhilipsHueProviderBridge:58] Received raw message: [RawMessage(gatewayId=1, data=[Set, RGB, 8, #FECE77], subData=null, isTxMessage=false, networkType=PHILIPS_HUE, timestamp=null)]

Pool frequency it's five minute

2017-01-22 00:31:57,756 DEBUG [Thread-18] [PhilipsHueGatewayPoller:77] Getting hue lights...on user request : false 
2017-01-22 00:31:57,785 DEBUG [Thread-18] [PhilipsHueGatewayPoller:82] Client response: Status Code:200,...

Now all RGB value will be update

2017-01-22 00:31:57,826 DEBUG [Thread-18] [PhilipsHueGatewayPoller:118] current light record: 8,LightState(state=State(on=true, bri=254, hue=8418, sat=140, xy=[0.4573, 0.41], ct=366, alert=select, effects=null, colormode=ct, reachable=true), type=Extended color light, name=Hall, modelid=LCT014, manufacturername=Philips, luminaireuniqueid=null, swversion=1.15.2_r19181, pointsymbol=null) 
2017-01-22 00:31:57,831 DEBUG [Thread-18] [PhilipsHueGatewayPoller:181] updateRGB    ...true 
2017-01-22 00:31:57,832 DEBUG [Thread-18] [PhilipsHueGatewayPoller:186]  xy [0.4573, 0.41] 
2017-01-22 00:31:57,832 DEBUG [Thread-18] [PhilipsHueGatewayPoller:196] updateSetPayload ...V_RGB,8,#FECE77 
2017-01-22 00:31:57,832 DEBUG [Thread-18] [PhilipsHueGatewayPoller:211] putMessage ...[Set, RGB, 8, #FECE77] 
2017-01-22 00:31:57,833 DEBUG [Thread-7] [PhilipsHueProviderBridge:58] Received raw message: [RawMessage(gatewayId=1, data=[Set, RGB, 5, #FE431C], subData=null, isTxMessage=false, networkType=PHILIPS_HUE, timestamp=null)]
2017-01-22 00:31:57,840 DEBUG [Thread-7] [PhilipsHueProviderBridge:58] Received raw message: [RawMessage(gatewayId=1, data=[Set, RGB, 6, #FECE77], subData=null, isTxMessage=false, networkType=PHILIPS_HUE, timestamp=null)]
2017-01-22 00:31:57,846 DEBUG [Thread-7] [PhilipsHueProviderBridge:58] Received raw message: [RawMessage(gatewayId=1, data=[Set, RGB, 7, #FECE77], subData=null, isTxMessage=false, networkType=PHILIPS_HUE, timestamp=null)]
2017-01-22 00:31:57,852 DEBUG [Thread-7] [PhilipsHueProviderBridge:58] Received raw message: [RawMessage(gatewayId=1, data=[Set, RGB, 8, #FECE77], subData=null, isTxMessage=false, networkType=PHILIPS_HUE, timestamp=null)]

After that I also test to update only RGB value but still nothing on first init.

@jkandasa
Copy link
Member

@Fraid Nice catch! I fixed this issue on this commit

Hope now everything resolved on PhilipsHue.

@Fraid
Copy link
Contributor Author

Fraid commented Jan 24, 2017

@jkandasa Yess all set now, for philips hue :D.

One last thing, and doesn't really mater, but what the use of Tx message processing as the value is always reset to zero.
txmessageissue
This field isn't in the previous version, I'll closed the issue if it's not linked.

@jkandasa
Copy link
Member

One last thing, and doesn't really mater, but what the use of Tx message processing as the value is always reset to zero.
This field isn't in the previous version, I'll closed the issue if it's not linked.

Earlier we had this field on global. Later I changed this to gateway level. Actually MySensors network needs at least 20ms delay between each Tx message. Other collision might happen. To avoid this we introduced this delay. And RFLink gateway needs some 1 second delay. However for Philis Hue, we can keep this delay as ZERO.

@Fraid Fraid closed this as completed Jan 24, 2017
@jkandasa jkandasa modified the milestones: 0.0.3.Final, 1.0.0.Final Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants