diff --git a/src/energenie/Registry.py b/src/energenie/Registry.py index c6ff641..c0b8b6b 100644 --- a/src/energenie/Registry.py +++ b/src/energenie/Registry.py @@ -371,6 +371,7 @@ self.ask_fn = ask def unknown_device(self, address, message): + ####HERE#### print("TODO: unknown device confirmed join %s" % str(address)) # if it is not a join req # route to unhandled message handler diff --git a/src/energenie/Registry_test.py b/src/energenie/Registry_test.py index 2cdf0a1..9fe1bdd 100644 --- a/src/energenie/Registry_test.py +++ b/src/energenie/Registry_test.py @@ -138,9 +138,8 @@ registry.list() fsk_router.list() - #---- HERE ---- - def test_discovery_autojoin(self): + def XXXtest_discovery_autojoin(self): discovery_autojoin() # Poke synthetic unknown JOIN into the router and let it route to unknown handler @@ -148,17 +147,17 @@ header_productid=Devices.PRODUCTID_MIHO005, header_sensorid=UNKNOWN_SENSOR_ID) self.msg[OpenThings.PARAM_JOIN] = {} - ##print(self.msg) fsk_router.incoming_message( (Devices.MFRID_ENERGENIE, Devices.PRODUCTID_MIHO005, UNKNOWN_SENSOR_ID), self.msg) - ####FAIL - join detect is not written # expect auto accept and join_ack logic to fire - ##registry.list() - ##fsk_router.list() + registry.list() + fsk_router.list() - def XXXXtest_discovery_askjoin(self): + #----- HERE ----- + + def test_discovery_askjoin(self): def no(a,b): return False def yes(a,b): return True @@ -166,24 +165,22 @@ # Poke synthetic unknown JOIN into the router and let it route to unknown handler self.msg = OpenThings.Message(header_mfrid=Devices.MFRID_ENERGENIE, - header_productid=Devices.MIHO005, + header_productid=Devices.PRODUCTID_MIHO005, header_sensorid=UNKNOWN_SENSOR_ID) self.msg[OpenThings.PARAM_JOIN] = {} fsk_router.incoming_message( (Devices.MFRID_ENERGENIE, Devices.PRODUCTID_MIHO005, UNKNOWN_SENSOR_ID), self.msg) - ####FAIL - join detect is not written - # expect auto accept and join_ack logic to fire + # expect reject ##registry.list() ##fsk_router.list() - discovery_askjoin(no) + ##discovery_askjoin(no) - fsk_router.incoming_message( - (Devices.MFRID_ENERGENIE, Devices.PRODUCTID_MIHO005, UNKNOWN_SENSOR_ID), self.msg) + ##fsk_router.incoming_message( + ## (Devices.MFRID_ENERGENIE, Devices.PRODUCTID_MIHO005, UNKNOWN_SENSOR_ID), self.msg) - ####FAIL - join detect is not written # expect auto accept and join_ack logic to fire ##registry.list() ##fsk_router.list()