def send_xplTrig(self, data): """ Send xPL fake message on network """ global xpl_plugin msg = XplMessage() msg.set_type("xpl-trig") msg.set_header(source ="domogik-{0}.{1}".format(self.name, get_sanitized_hostname())) msg.set_schema("sensor.basic") msg.add_data(data) print (u"send fake xpl switch on : {0}".format(msg)) xpl_plugin.myxpl.send(msg)
def send_xplTrig(self, data): """ Send xPL fake message on network """ global xpl_plugin msg = XplMessage() msg.set_type("xpl-trig") msg.set_header(source="domogik-{0}.{1}".format( self.name, get_sanitized_hostname())) msg.set_schema("sensor.basic") msg.add_data(data) print(u"send fake xpl switch on : {0}".format(msg)) xpl_plugin.myxpl.send(msg)