Exemplo n.º 1
0
 def do_notification(self, msg):
     LOG_MSG('Notification {0} has been received.'.format(
         msg['notification']))
     self.handler.do_notification(
         msg['deviceGuid'],
         Notification(name=msg['notification']['notification'],
                      parameters=msg['notification']['parameters']))
Exemplo n.º 2
0
 def send_data_notification(self, address, data):
     for device_info in [
             info for i2c_address, info in self.addresses
             if address == i2c_address
     ]:
         self.gateway.notification_received(
             device_info, Notification('read-response', data))