Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
absalom-muc authored Dec 18, 2021
1 parent ca324d9 commit f171858
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,45 @@ Use this program if you intend to evaluate / debug the SPI data of your air cond

For understanding of the monitored data [SPI.md](SPI.md) is a good starting point.


# Attention:
:warning: You have to open the indoor unit to have access to the SPI. Opening of the indoor unit should be done by
a qualified professional because faulty handling may cause leakage of water, electric shock or fire! :warning:

# Prerequisites:
You need a [MHI-AC-Ctrl](https://github.com/absalom-muc/MHI-AC-Ctrl) PCB for using MHI-AC-Trace. For MHI-AC-Trace MOSI and MISO (and SCK of course) are inputs, both data streams are monitored. MISO is only considered if a SPI based remote control is attached (e.g. [MHI-AC-Ctrl](https://github.com/absalom-muc/MHI-AC-Ctrl) or a commercial RC)
You need a [MHI-AC-Ctrl](https://github.com/absalom-muc/MHI-AC-Ctrl) PCB for using MHI-AC-Trace. For MHI-AC-Trace MOSI and MISO (and SCK of course) are inputs, both data streams are monitored.

# Installing:

## Hardware:
Identical to MHI-AC-Ctrl PCB, no adaption of the MHI-AC-Ctrl PCB is required. Check [MHI-AC-Ctrl Readme](https://github.com/absalom-muc/MHI-AC-Ctrl#readme) for a list of supported devices.
Identical to MHI-AC-Ctrl PCB, no adaption of the MHI-AC-Ctrl PCB is required. If you want to connect more than one MHI-AC-Ctrl PCBs it might be easier using an older PCB version because the latest PCB version has only one SPI connector. Check [MHI-AC-Ctrl Readme](https://github.com/absalom-muc/MHI-AC-Ctrl#prerequisites) for a list of supported devices.

## Software:
The program uses the following libraries
- :warning:[MQTT client library](https://github.com/knolleary/pubsubclient) - please don't use v2.8.0! (because of this [issue](https://github.com/knolleary/pubsubclient/issues/747)). Better use v2.7.0:warning:

hint: ArduinoOTA is not supported
- [MQTT client library](https://github.com/knolleary/pubsubclient) :warning: please don't use v2.8.0! (because of this [issue](https://github.com/knolleary/pubsubclient/issues/747)). Better use v2.7.0:warning:
- [ArduinoOTA](https://github.com/esp8266/Arduino/tree/master/libraries/ArduinoOTA)

Please check the GitHub pages to see how to install them (usually via tools -> libraries).
Create a sub-directory "MHI-AC-Trace" and copy the files from the src directory in your MHI-AC-Trace sub-directory. Finally enter WiFi and MQTT credentials in [MHI-AC-Trace.h](src/MHI-AC-Trace.h).

# Disclaimer
I'm aware that the MHI-AC-Trace software looks unstructed and is far away from optimized. However, it works for me since more than 2 years. Therefore I have no plan to update MHI-AC-Trace software unless there is a serious bug. This SW is experimental and you use it on your own risk.
This SW is experimental and you use it on your own risk.

# Output
The data is output on the serial debug console and on MQTT. There is an offset of one MISO frame implemented. That means you see in one packet
The data is output on the serial debug console and on MQTT. There is an offset of one MISO frame implemented. That means you see in one line
- MISO data from t
- MOSI data from t+1

With this offset you see in a package together the requesting MISO and the answering MOSI frame. This simplifies the analysis.
With this offset you see in a line together the requesting MISO and the answering MOSI frame. This simplifies the analysis.

## Serial Console output
The output on the serial debug has the following human readable format:
![grafik](https://user-images.githubusercontent.com/23119513/144749861-37737193-d97d-4df1-82bb-e8b506a4555b.png)
Packet counter number has a decimal format, all other numbers hexadecimal.
The output on the serial debug (baud rate 115200, switch off the time stamp) has the following human readable format:
![grafik](https://user-images.githubusercontent.com/23119513/146646269-7d4b1d84-a936-4010-a62e-8363e1d14d9a.png)
All numbers in hexadecimal format.

## MQTT output
The data is output via topic "raw" in char format. Overal 43 chars per packet.
- Packet counter number (high byte)
- Packet counter number (low byte)
The data is output via topic "raw" in char format (hex). Overall 43 chars per line. Format is identical to serial console output
- Frame counter number (high byte)
- Frame counter number (low byte)
- MOSI SB0-SB2
- MOSI DB0-DB14
- MOSI CBH, CBL
Expand All @@ -55,12 +53,10 @@ The data is output via topic "raw" in char format. Overal 43 chars per packet.
- MISO CBH, CBL
- Repetition No

In order to reduce MQTT workload a packet is published only once also if it was received multiple times. The "Repetition No" represents the number of repetitions minus one.
Frame counter number is a consecutive number. In order to reduce workload a frame is published only once also if it was received multiple times. The "Repetition No" represents the number of repetitions of the **previous** line.

MQTT topic "Error1" is updated with the received MOSI signature if it isn't the expected signature.

MQTT topic "Error2" is updated with the received MOSI checksum if it isn't the expected checksum.

No check of MISO signature / checksum.

# License
Expand Down

0 comments on commit f171858

Please sign in to comment.