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

Fix typo: recieve #18177

Merged
merged 1 commit into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public void onConnectionStateChange(BluetoothConnectionStatusNotification connec
public void onCharacteristicUpdate(BluetoothCharacteristic characteristic, byte[] value) {
super.onCharacteristicUpdate(characteristic, value);
if (logger.isDebugEnabled()) {
logger.debug("Recieved update {} to characteristic {} of device {}", HexUtils.bytesToHex(value),
logger.debug("Received update {} to characteristic {} of device {}", HexUtils.bytesToHex(value),
characteristic.getUuid(), address);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void dscAlarmEventReceived(EventObject event, Thing thing) {
.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
String dscAlarmMessageData = dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.DATA);

logger.debug("dscAlarmEventRecieved(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
logger.debug("dscAlarmEventReceived(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);

switch (dscAlarmCode) {
case KeypadLEDState: /* 510 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public void dscAlarmEventReceived(EventObject event, Thing thing) {
ChannelUID channelUID = null;
DSCAlarmCode dscAlarmCode = DSCAlarmCode
.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
logger.debug("dscAlarmEventRecieved(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
logger.debug("dscAlarmEventReceived(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);

int state = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public void dscAlarmEventReceived(EventObject event, Thing thing) {
String dscAlarmMessageName = dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.NAME);
String dscAlarmMessageMode = dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.MODE);

logger.debug("dscAlarmEventRecieved(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
logger.debug("dscAlarmEventReceived(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);

switch (dscAlarmCode) {
case PartitionReady: /* 650 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void dscAlarmEventReceived(EventObject event, Thing thing) {
ChannelUID channelUID = null;
DSCAlarmCode dscAlarmCode = DSCAlarmCode
.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
logger.debug("dscAlarmEventRecieved(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
logger.debug("dscAlarmEventReceived(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);

int state = 0;
String status = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static String decryptPack(byte[] keyarray, String message) throws GreeExc
return new String(bytePlainText, StandardCharsets.UTF_8);
} catch (NoSuchAlgorithmException | NoSuchPaddingException | BadPaddingException | InvalidKeyException
| IllegalBlockSizeException ex) {
throw new GreeException("Decryption of recieved data failed", ex);
throw new GreeException("Decryption of received data failed", ex);
}
}

Expand All @@ -145,7 +145,7 @@ public static String decryptGCMPack(byte[] keyBytes, String pack, String tag) th
return new String(bytePlainText, StandardCharsets.UTF_8);
} catch (NoSuchAlgorithmException | NoSuchPaddingException | BadPaddingException | InvalidKeyException
| IllegalBlockSizeException | InvalidAlgorithmParameterException ex) {
throw new GreeException("GCM decryption of recieved data failed", ex);
throw new GreeException("GCM decryption of received data failed", ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void bindWithDevice(DatagramSocket clientSocket, EncryptionTypes encrypti
DatagramPacket sendPacket = createPackRequest(1, encryptedBindReqData);
clientSocket.send(sendPacket);

// Recieve a response, create the JSON to hold the response values
// Receive a response, create the JSON to hold the response values
GreeBindResponseDTO resp = receiveResponse(clientSocket, GreeBindResponseDTO.class);
resp.decryptedPack = GreeCryptoUtil.decrypt(resp, encType);
resp.packJson = GSON.fromJson(resp.decryptedPack, GreeBindResponsePackDTO.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void handleCommand(ChannelUID channelUID, Command command) {
try {
ipCameraHandler.audioThreshold = Integer.valueOf(command.toString());
} catch (NumberFormatException e) {
logger.warn("Audio Threshold recieved an unexpected command, was it a number?");
logger.warn("Audio Threshold received an unexpected command, was it a number?");
}
}
ipCameraHandler.setupFfmpegFormat(FFmpegFormat.RTSP_ALARMS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ public class IpCameraHandler extends BaseThingHandler {

// These methods handle the response from all camera brands, nothing specific to 1 brand.
private class CommonCameraHandler extends ChannelDuplexHandler {
private int bytesToRecieve = 0;
private int bytesAlreadyRecieved = 0;
private int bytesToReceive = 0;
private int bytesAlreadyReceived = 0;
private byte[] incomingJpeg = new byte[0];
private String incomingMessage = "";
private String contentType = "empty";
Expand Down Expand Up @@ -229,7 +229,7 @@ public void channelRead(@Nullable ChannelHandlerContext ctx, @Nullable Object ms
contentType = response.headers().getAsString(name);
break;
case "content-length":
bytesToRecieve = Integer.parseInt(response.headers().getAsString(name));
bytesToReceive = Integer.parseInt(response.headers().getAsString(name));
break;
case "transfer-encoding":
if (response.headers().getAsString(name).contains("chunked")) {
Expand All @@ -252,11 +252,11 @@ public void channelRead(@Nullable ChannelHandlerContext ctx, @Nullable Object ms
}
}
} else if (contentType.contains("image/jp")) {
if (bytesToRecieve == 0) {
bytesToRecieve = 768000; // 0.768 Mbyte when no Content-Length is sent
if (bytesToReceive == 0) {
bytesToReceive = 768000; // 0.768 Mbyte when no Content-Length is sent
logger.debug("Camera has no Content-Length header, we have to guess how much RAM.");
}
incomingJpeg = new byte[bytesToRecieve];
incomingJpeg = new byte[bytesToReceive];
}
}
} else {
Expand All @@ -277,7 +277,7 @@ public void channelRead(@Nullable ChannelHandlerContext ctx, @Nullable Object ms
// Found some cameras use Content-Type: image/jpg instead of image/jpeg
if (contentType.contains("image/jp")) {
for (int i = 0; i < content.content().capacity(); i++) {
incomingJpeg[bytesAlreadyRecieved++] = content.content().getByte(i);
incomingJpeg[bytesAlreadyReceived++] = content.content().getByte(i);
}
if (content instanceof LastHttpContent) {
processSnapshot(incomingJpeg);
Expand All @@ -289,54 +289,54 @@ public void channelRead(@Nullable ChannelHandlerContext ctx, @Nullable Object ms
} else {
incomingMessage += content.content().toString(CharsetUtil.UTF_8);
}
bytesAlreadyRecieved = incomingMessage.length();
bytesAlreadyReceived = incomingMessage.length();
if (content instanceof LastHttpContent) {
// If it is not an image send it on to the next handler//
if (bytesAlreadyRecieved != 0) {
if (bytesAlreadyReceived != 0) {
reply = incomingMessage;
super.channelRead(ctx, reply);
}
}
// Alarm Streams never have a LastHttpContent as they always stay open//
else if (contentType.contains("multipart")) {
int beginIndex, endIndex;
if (bytesToRecieve == 0) {
if (bytesToReceive == 0) {
beginIndex = incomingMessage.indexOf("Content-Length:");
if (beginIndex != -1) {
endIndex = incomingMessage.indexOf("\r\n", beginIndex);
if (endIndex != -1) {
bytesToRecieve = Integer.parseInt(
bytesToReceive = Integer.parseInt(
incomingMessage.substring(beginIndex + 15, endIndex).strip());
}
}
}
// --boundary and headers are not included in the Content-Length value
if (bytesAlreadyRecieved > bytesToRecieve) {
if (bytesAlreadyReceived > bytesToReceive) {
// Check if message has a second --boundary
endIndex = incomingMessage.indexOf("--" + boundary, bytesToRecieve);
endIndex = incomingMessage.indexOf("--" + boundary, bytesToReceive);
if (endIndex == -1) {
reply = incomingMessage;
incomingMessage = "";
bytesToRecieve = 0;
bytesAlreadyRecieved = 0;
bytesToReceive = 0;
bytesAlreadyReceived = 0;
} else {
reply = incomingMessage.substring(0, endIndex);
incomingMessage = incomingMessage.substring(endIndex, incomingMessage.length());
bytesToRecieve = 0;// Triggers search next time for Content-Length:
bytesAlreadyRecieved = incomingMessage.length() - endIndex;
bytesToReceive = 0;// Triggers search next time for Content-Length:
bytesAlreadyReceived = incomingMessage.length() - endIndex;
}
super.channelRead(ctx, reply);
}
}
// Foscam needs this as will other cameras with chunks//
if (isChunked && bytesAlreadyRecieved != 0) {
if (isChunked && bytesAlreadyReceived != 0) {
reply = incomingMessage;
}
}
}
} else { // msg is not HttpContent
// Foscam cameras need this
if (!contentType.contains("image/jp") && bytesAlreadyRecieved != 0) {
if (!contentType.contains("image/jp") && bytesAlreadyReceived != 0) {
reply = incomingMessage;
logger.trace("Packet back from camera is {}", incomingMessage);
super.channelRead(ctx, reply);
Expand All @@ -353,8 +353,8 @@ public void exceptionCaught(@Nullable ChannelHandlerContext ctx, @Nullable Throw
return;
}
if (cause instanceof ArrayIndexOutOfBoundsException) {
logger.debug("Camera sent {} bytes when the content-length header was {}.", bytesAlreadyRecieved,
bytesToRecieve);
logger.debug("Camera sent {} bytes when the content-length header was {}.", bytesAlreadyReceived,
bytesToReceive);
} else {
logger.warn("Camera possibly closed the channel on the binding for URL: {}, cause reported is: {}",
requestUrl, cause.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public void processReply(RequestType requestType, String message) {
break;
case PullMessages:
try {
eventRecieved(message);
eventReceived(message);
} catch (Exception e) {
logger.error("Error processing PullMessages error:\n{}\nmessage: {}", e.toString(), message);
}
Expand Down Expand Up @@ -813,7 +813,7 @@ public void gotoPreset(int index) {
}
}

public void eventRecieved(String eventMessage) {
public void eventReceived(String eventMessage) {
Document xmlDocument;
try {
xmlDocument = Helper.loadXMLFromString(eventMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ protected void doPost(@Nullable HttpServletRequest req, @Nullable HttpServletRes
case "/OnvifEvent":
ServletInputStream inputStream = req.getInputStream();
String xmlData = new String(inputStream.readAllBytes(), "UTF-8");
handler.onvifCamera.eventRecieved(xmlData);
handler.onvifCamera.eventReceived(xmlData);
break;
default:
logger.debug("Recieved unknown request \tPOST:{}", pathInfo);
logger.debug("Received unknown request \tPOST:{}", pathInfo);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.slf4j.LoggerFactory;

/**
* This handler is responsible for handling data recieved from a sunspec meter
* This handler is responsible for handling data received from a sunspec meter
*
* @author Nagy Attila Gabor - Initial contribution
*
Expand Down
4 changes: 2 additions & 2 deletions bundles/org.openhab.binding.mqtt.fpp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FPP Binding

Binding to control Falcon Player (FPP) Devices using MQTT and HTTP. Status messages are recieved over MQTT and Commands are HTTP Commands.
Binding to control Falcon Player (FPP) Devices using MQTT and HTTP. Status messages are received over MQTT and Commands are HTTP Commands.

## Discovery

Expand Down Expand Up @@ -32,7 +32,7 @@ The binding supports one Thing `player` that represents the Falcon Player.
| `seconds-played` | Number:Time | Sequence Playback time in secs. |
| `seconds-remaining` | Number:Time | Sequence Playback time remaining in secs. |
| `last-playlist` | String | Lasted Played Playlist. |
| `bridging-enabled` | Switch | Is Recieving Bridge Data. |
| `bridging-enabled` | Switch | Is Receiving Bridge Data. |
| `multisync-enabled` | Switch | Multisync Mode Enabled. |
| `scheduler-current-playlist` | String (read only) | Scheduler Current Playlist. |
| `scheduler-current-playlist-start` | String (read only) | Scheduler Current Playlist Start Time. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ channel-type.mqtt.player.player.description = FPP Player Control
channel-type.mqtt.player.volume.label = Volume
channel-type.mqtt.player.volume.description = FPP Volume of the Output
channel-type.mqtt.player.bridging-enabled.label = Bridging
channel-type.mqtt.player.bridging-enabled.description = FPP Recieving Bridge Data
channel-type.mqtt.player.bridging-enabled.description = FPP Receiving Bridge Data
channel-type.mqtt.player.multisync-enabled.label = Multisync
channel-type.mqtt.player.multisync-enabled.description = FPP Multisync Mode Enabled
channel-type.mqtt.player.testing-enabled.label = Testing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<channel-type id="bridging-enabled" advanced="true">
<item-type>Switch</item-type>
<label>Bridging</label>
<description>FPP Recieving Bridge Data</description>
<description>FPP Receiving Bridge Data</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="multisync-enabled" advanced="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static int getCliPort(String ip, int webPort)
throws SqueezeBoxNotAuthorizedException, SqueezeBoxCommunicationException {
String url = "http://" + ip + ":" + webPort + "/jsonrpc.js";
String json = HttpUtils.post(url, JSON_REQ);
logger.trace("Recieved json from server {}", json);
logger.trace("Received json from server {}", json);
JsonElement resp = JsonParser.parseString(json);
String cliPort = resp.getAsJsonObject().get("result").getAsJsonObject().get("_p2").getAsString();
return Integer.parseInt(cliPort);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public WebserviceHandler(Bridge bridge) {
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
if (channelUID.getId().equals(TankerkoenigBindingConstants.CHANNEL_HOLIDAY)) {
logger.debug("HandleCommand recieved: {}", channelUID.getId());
logger.debug("HandleCommand received: {}", channelUID.getId());
isHoliday = (command == OnOffType.ON);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void touchWandUnitHandleCommand(Command command) {
void updateChannelDoorWindow(TouchWandBSensorUnitData unitData) {
OpenClosedType myOpenClose;
String isOpen = unitData.getCurrStatus();
logger.debug("recieved status {} from door unit {} ", isOpen, unitData.getName());
logger.debug("received status {} from door unit {} ", isOpen, unitData.getName());
if (isOpen.equals(BSENSOR_STATUS_OPEN)) {
myOpenClose = OpenClosedType.OPEN;
} else if (isOpen.equals(BSENSOR_STATUS_CLOSE)) {
Expand All @@ -86,7 +86,7 @@ void updateChannelDoorWindow(TouchWandBSensorUnitData unitData) {

void updateChannelMotion(TouchWandBSensorUnitData unitData) {
String motion = unitData.getCurrStatus();
logger.debug("recieved status {} from motion unit {} ", motion, unitData.getName());
logger.debug("received status {} from motion unit {} ", motion, unitData.getName());
OnOffType status;
if (motion.equals(BSENSOR_STATUS_OPEN)) {
status = OnOffType.ON;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private void openSocket() {
}

Runnable socketReceiverRunnable = () -> {
logger.trace("Start Background Thread for recieving data from adapter");
logger.trace("Start Background Thread for receiving data from adapter");
try {
XMLReader xmlReader = XMLReaderFactory.createXMLReader();
xmlReader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
Expand Down
Loading