20 lines
821 B
Markdown
20 lines
821 B
Markdown
# Swap Station Project
|
|
A PyCharm project for connecting to a swap station via MQTT on Windows.
|
|
|
|
## Structure
|
|
- `src/common/`: Shared configurations and encryption utilities.
|
|
- `src/key_management/`: Handles key exchange and AES key storage.
|
|
- `src/state_receiver/`: Receives state information messages.
|
|
- `src/event_receiver/`: Receives event record messages.
|
|
- `data/`: Stores AES keys (aes_key.bin, aes_iv.bin).
|
|
- `logs/`: Optional log files.
|
|
|
|
## Setup
|
|
1. Install EMQX and configure authentication.
|
|
2. Run `pip install -r requirements.txt` in the PyCharm terminal.
|
|
3. Replace the platform public key in `common.py`.
|
|
4. Run `key_management.py` first, then `state_receiver.py` and `event_receiver.py`.
|
|
|
|
## Usage
|
|
- Use PyCharm's "Run Configurations" to execute each module.
|
|
- Simulate messages with MQTTX or a test script. |