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
- Install EMQX and configure authentication.
- Run
pip install -r requirements.txtin the PyCharm terminal. - Replace the platform public key in
common.py. - Run
key_management.pyfirst, thenstate_receiver.pyandevent_receiver.py.
Usage
- Use PyCharm's "Run Configurations" to execute each module.
- Simulate messages with MQTTX or a test script.