forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lifx] Support HEV clean cycle (openhab#11262)
* Implement HEV packets * Add colorhevlight thing type with a hevcycle channel * Update documentation Signed-off-by: Wouter Born <github@maindrain.net>
- Loading branch information
Showing
25 changed files
with
1,140 additions
and
215 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
.../src/main/java/org/openhab/binding/lifx/internal/dto/GetHevCycleConfigurationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* Copyright (c) 2010-2021 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.lifx.internal.dto; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
/** | ||
* @author Wouter Born - Initial contribution | ||
*/ | ||
public class GetHevCycleConfigurationRequest extends Packet { | ||
|
||
public static final int TYPE = 0x91; | ||
|
||
public GetHevCycleConfigurationRequest() { | ||
setTagged(false); | ||
setAddressable(true); | ||
setResponseRequired(true); | ||
} | ||
|
||
@Override | ||
public int packetType() { | ||
return TYPE; | ||
} | ||
|
||
@Override | ||
protected int packetLength() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
protected void parsePacket(ByteBuffer bytes) { | ||
// do nothing | ||
} | ||
|
||
@Override | ||
protected ByteBuffer packetBytes() { | ||
return ByteBuffer.allocate(0); | ||
} | ||
|
||
@Override | ||
public int[] expectedResponses() { | ||
return new int[] { StateHevCycleConfigurationResponse.TYPE }; | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
....binding.lifx/src/main/java/org/openhab/binding/lifx/internal/dto/GetHevCycleRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* Copyright (c) 2010-2021 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.lifx.internal.dto; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
/** | ||
* @author Wouter Born - Initial contribution | ||
*/ | ||
public class GetHevCycleRequest extends Packet { | ||
|
||
public static final int TYPE = 0x8E; | ||
|
||
public GetHevCycleRequest() { | ||
setTagged(false); | ||
setAddressable(true); | ||
setResponseRequired(true); | ||
} | ||
|
||
@Override | ||
public int packetType() { | ||
return TYPE; | ||
} | ||
|
||
@Override | ||
protected int packetLength() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
protected void parsePacket(ByteBuffer bytes) { | ||
// do nothing | ||
} | ||
|
||
@Override | ||
protected ByteBuffer packetBytes() { | ||
return ByteBuffer.allocate(0); | ||
} | ||
|
||
@Override | ||
public int[] expectedResponses() { | ||
return new int[] { StateHevCycleResponse.TYPE }; | ||
} | ||
} |
Oops, something went wrong.