2013-01-29, 05:04
(2013-01-28, 21:06)storstenson Wrote: Hi
I'm trying to use the new broadcast code posted for broadcasting events to eventghost;
self.broadcastUDP("eventname&&extrainfo")
def broadcastUDP(self,data):
IPADDR = '255.255.255.255'
PORTNUM = 33000
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
s.connect((IPADDR, PORTNUM))
s.send(data)
s.close()
But I cant make it work. Can someone perhaps make a home_automation.py with the code implanted? It would have been great help!
I'd be ever so grateful too. Just looking at that makes my head hurt.