Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Network Sender accepting payloads

Got a good idea? You can suggest new features here.
Post Reply
kingtd
Plugin Developer
Posts: 78
Joined: Fri Jul 13, 2007 7:39 am

Network Sender accepting payloads

Post 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
Attachments
__init__.py
(6.43 KiB) Downloaded 410 times
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Network Sender accepting payloads

Post 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.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Post Reply