Page 1 of 1

Network Sender accepting payloads

Posted: Tue Aug 07, 2007 3:16 am
by kingtd
I'm sure you guys are getting quite tired of me and my feature requests, but EventGhost has really become the core of my automation system now.

One thing that would be extremely useful to me is a Network Sender that accepts payload information. It looks like you had originally intended it to do this, but then stubbed it out.

As part of my system, whenever someone adjusts the volume of the main stereo (which can be heard everywhere in my place), the new volume level is displayed to computers where someone is logged in. I do this by using the network sender to send the information and then kick off an OSD on each machine.

Since the current official sender only supports a command name, it comes across like this "Volume -44db" or "Volume -43db", etc. This would cause me to require a new trigger for each possible volume level. So I hacked the network sender to transfer the eg.event.payload automatically which does the trick. Now the command is just "Volume" and the actual level is in the payload data.

I've included my changed file here (search for ktd- inside to see my minimal changes). If I could get similar changes made to the official version, that would be fantastic. The function works with existing setups, so it shouldn't break anyone's configuration. My biggest concerns would be people that might have sensitive information in the eg.eventpayload variable for whatever reason that don't want it to transfer - right now in my version there's no way to prevent it.

Thanks as always,
-K

Re: Network Sender accepting payloads

Posted: Mon Aug 13, 2007 11:57 am
by Bitmonster
I have to think about this. This solution doesn't satisfy me completely, as payloads could be arbitrary Python types. So a solution by using for example the "pickle" module would be more desirable.