Skip to content

Commit

Permalink
Support factory reset over MQTT, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dzungpv committed Dec 1, 2023
1 parent 62329f3 commit faa25fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ You can also use ESP-32 module for more processing power. If using ESP-32 you ca
You can see more pictures in [`hardware`](https://github.com/dzungpv/mitsubishi2MQTT/tree/master/hardware) folder.
***

## Attention:
:warning: You have to open the indoor unit to have access to the `CN105` port. You should disconnected the main power before install the module.
Faulty handling may cause leakage of water, electric shock or fire! :warning:
***

## Parts

### Parts required to make a CN105 female connector
Expand Down Expand Up @@ -88,6 +93,7 @@ Nightly builds are available for select platforms via GitHub Actions. Go to [the
***

## MQTT topic use cases
The `topic` is: "mqtt_topic/mqtt_friendly_name"
- topic/power/set OFF
- topic/mode/set AUTO HEAT COOL DRY FAN_ONLY OFF ON
- topic/temp/set 16-31
Expand All @@ -102,7 +108,7 @@ Nightly builds are available for select platforms via GitHub Actions. Go to [the
- topic/debug/logs
- topic/debug/logs/set on off
- topic/custom/send as example "fc 42 01 30 10 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7b " see https://github.com/SwiCago/HeatPump/blob/master/src/HeatPump.h
- topic/system/set reboot
- topic/system/set to control the device with commands: "restart": reboot the device, "factory": reset device to fatory state.
***

## Special thanks
Expand Down
5 changes: 5 additions & 0 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,11 @@ void mqttCallback(char *topic, char *payload, unsigned int length)
{ // We receive reboot command
sendRebootRequest(3);
}
else if ((strcmp(message, "factory") == 0) and !requestReboot) // factory reset
{
sendRebootRequest(5);
factoryReset();
}
}
else if (strcmp(topic, ha_custom_packet.c_str()) == 0)
{ // send custom packet for advance user
Expand Down

0 comments on commit faa25fc

Please sign in to comment.