diff --git a/src/energenie/Devices.py b/src/energenie/Devices.py index 563096e..9e9d5d6 100644 --- a/src/energenie/Devices.py +++ b/src/energenie/Devices.py @@ -566,7 +566,7 @@ return MiHomeDevice.get_join_req(MFRID_ENERGENIE, PRODUCTID_MIHO004, deviceid) def handle_message(self, payload): - ##print("MIHO005 new data %s" % self.device_id) + ##print("MIHO005 new data %s %s" % (self.device_id, payload)) for rec in payload["recs"]: paramid = rec["paramid"] #TODO: consider making this table driven and allowing our base class to fill our readings in for us diff --git a/src/energenie/__init__.py b/src/energenie/__init__.py index 71797ac..50e1853 100644 --- a/src/energenie/__init__.py +++ b/src/energenie/__init__.py @@ -76,7 +76,7 @@ device_id = hdr["sensorid"] address = (mfr_id, product_id, device_id) - Registry.fsk_router.handle_message(address, payload) + registry.fsk_router.incoming_message(address, msg) handled = True except OpenThings.OpenThingsException: print("Can't decode payload:%s" % payload) @@ -133,4 +133,4 @@ return False -# END \ No newline at end of file +# END diff --git a/src/energenie/radio.py b/src/energenie/radio.py index 84f50fd..ed0264d 100644 --- a/src/energenie/radio.py +++ b/src/energenie/radio.py @@ -20,8 +20,8 @@ #TODO: Would like to add RSSI measurements and reporting to the metadata that #comes back with received packets. -##LIBNAME = "drv/radio_rpi.so" -LIBNAME = "drv/radio_mac.so" # testing +LIBNAME = "drv/radio_rpi.so" +##LIBNAME = "drv/radio_mac.so" # testing import time import ctypes diff --git a/src/energenie/radio_test.py b/src/energenie/radio_test.py index 77a19ff..b2e0cdc 100644 --- a/src/energenie/radio_test.py +++ b/src/energenie/radio_test.py @@ -12,7 +12,7 @@ # 4800bps*8*16=26ms per payload # 75 payloads is 2 seconds # 255 payloads is 6.8 seconds -TIMES = 75 +TIMES = 40 DELAY = 0.5 # The 'radio' module knows nothing about the Energenie (HS1527) bit encoding, diff --git a/src/registry.kvs b/src/registry.kvs index 0647b56..bbacec5 100644 --- a/src/registry.kvs +++ b/src/registry.kvs @@ -1,10 +1,6 @@ -IGN tv -type=MIHO005 -device_id=1675 - ADD fan type=ENER002 -device_id=[822412, 1] +device_id=[0x6C6C6, 1] ADD tv type=MIHO005