Is the following possible: I’m using rlkoshak’s Design Pattern: Time Of Day for various stuff in the house. I want to add color temperature based on time of the day. What colder in the morning and through out the day getting warmer.
The problem is setting lights that are off to the new color temperature What happens now is: the light switches on in the color temperature it was previous and then changes to the new value. BTW this is also happening with the light level. If I switch a light on at 30% and previously it was 90%, it switches on at 90% and fades to 30%. Not very pleasant in the night!
I tried to manually send mqtt commands mosquitto_pub -h localhost -u XXX -P XXX -t 'milight/commands/0x4/rgb_cct/2' -m "{\"state\":\"OFF\",\"level\":100,\"color_temp\":153,\"bulb_mode\":\"white\"}"
which results in:
Client mosqsub/27628-openhab received PUBLISH (d0, q0, r0, m0, 'milight/states/0x4/rgb_cct/2', ... (64 bytes))
milight/states/0x4/rgb_cct/2 {"state":"OFF","level":100,"color_temp":370,"bulb_mode":"white"}
Where 370 is the previous value of color_temp
.
And it seems these commands are also crashing my openHAB. My log is full with this and nothing is working anymore. Java cpu load is 300%+ on a Raspberry Pi 3 Model B Plus Rev 1.3 with openHAB 2.5.0~M5 en the MQTT2 binding.
2019-11-21 19:49:49.032 [ERROR] [o.client.mqttv3.internal.ClientState] - espMilightHub:46a03e89: Timed out as no write activity, keepAlive=15,000 lastOutboundActivity=1,574,362,156,205 lastInboundActivity=1,574,362,161,660 time=1,574,362,189,030 lastPing=0
2019-11-21 19:50:27.614 [ERROR] [b.handler.EspMilightHubBridgeHandler] - MQTT connection has been lost, cause reported is:{}
org.eclipse.paho.client.mqttv3.MqttException: Connection lost
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:181) [org.eclipse.paho.client.mqttv3-1.2.0.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267) ~[?:1.8.0_222]
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92) ~[?:?]
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:133) ~[?:?]
... 7 more
2019-11-21 19:49:49.029 [ERROR] [o.client.mqttv3.internal.ClientState] - espMilightHub:46a03e89: Timed out as no write activity, keepAlive=15,000 lastOutboundActivity=1,574,362,145,243 lastInboundActivity=1,574,362,145,258 time=1,574,362,189,025 lastPing=0
2019-11-21 19:49:49.024 [INFO ] [b.handler.EspMilightHubBridgeHandler] - Sucessfully connected to the MQTT broker.