From d52fe797ada7644c5cfdc9710535a459e66cabcc Mon Sep 17 00:00:00 2001 From: uhi22 Date: Mon, 27 May 2024 10:00:34 +0200 Subject: [PATCH] sending test messages to control the power supply --- pyPlcHomeplug.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pyPlcHomeplug.py b/pyPlcHomeplug.py index f751a4e..c0520c2 100644 --- a/pyPlcHomeplug.py +++ b/pyPlcHomeplug.py @@ -586,10 +586,19 @@ class pyPlcHomeplug(): self.composeGetSwWithRamdomMac() self.addToTrace("transmitting GetSwWithRamdomMac") self.transmit(self.mytransmitbuffer) + if (selection=="5"): + self.sendSpecialMessageToControlThePowerSupply(20, 1) + if (selection=="6"): + self.sendSpecialMessageToControlThePowerSupply(100, 1) + if (selection=="7"): + self.sendSpecialMessageToControlThePowerSupply(200, 1) + if (selection=="8"): + self.sendSpecialMessageToControlThePowerSupply(300, 1) if (selection=="9"): - self.composeSpecialMessage() - self.addToTrace("transmitting SpecialMessage") - self.transmit(self.mytransmitbuffer) + self.sendSpecialMessageToControlThePowerSupply(400, 1) + if (selection=="0"): + self.sendSpecialMessageToControlThePowerSupply(0, 0) + def transmit(self, pkt): self.sniffer.sendpacket(bytes(pkt))