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.

AutoRemote Gets System Volume

If you have a question or need help, this is the place to be.
Post Reply
thahim
Posts: 17
Joined: Fri Jul 11, 2014 5:33 am

AutoRemote Gets System Volume

Post by thahim »

I have build a macro, which when triggered changes system volume,
this is triggered from AutoRemote,
now i want eventghost to send the current volume level on my pc to AutoRemote on my phone.
I'm noob and don't know how to do this.
Can any one explain me to solve this?

My code is here

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1669">
    <Macro Name="Change Master Volume #1: -5.00 %" Expanded="True">
        <Event Name="AutoRemote.Message.Volume.Down" />
        <Action>
            System.ChangeMasterVolumeBy(-5.0, u'Speaker/HP (Conexant SmartAudio')
        </Action>
        <Action>
            EventGhost.PythonScript(u"a = eg.result\neg.plugins.AutoRemote.SendMessage('Note 3', '', 'APA91bEUJlqIpBsFh7I_6jDB7TQVsEp0t3iv28vWPK6RR3aupQL-Eu652yjgFPrMCK6Y9KxYQu3OTwjusFk_kwZBWiA6f-D9H4GVPId2255DxxSgOuxhizgxAWuIV6RE4KQnz22I_9xTOQrnvMtImhaU0p6gcClik7b25Mf5ShqdZX6skDz-HXY', 'Volume=:=' + {a})")
        </Action>
        <Action Enabled="False">
            EventGhost.PythonCommand(u"eg.plugins.AutoRemote.SendMessage('Note 3', 'goo.gl/1GBu9x', u'APA91bEUJlqIpBsFh7I_6jDB7TQVsEp0t3iv28vWPK6RR3aupQL-Eu652yjgFPrMCK6Y9KxYQu3OTwjusFk_kwZBWiA6f-D9H4GVPId2255DxxSgOuxhizgxAWuIV6RE4KQnz22I_9xTOQrnvMtImhaU0p6gcClik7b25Mf5ShqdZX6skDz-HXY', eg.result)")
        </Action>
        <Action Enabled="False">
            EventGhost.ShowOSD(u"{'|'*int(round(eg.result))+'.'*(100-int(round(eg.result)))} {int(round(eg.result))}%", u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, False)
        </Action>
        <Action Enabled="False">
            EventGhost.PythonScript(u"eg.plugins.AutoRemote.SendMessage('Note 3', 'goo.gl/1GBu9x', u'APA91bEUJlqIpBsFh7I_6jDB7TQVsEp0t3iv28vWPK6RR3aupQL-Eu652yjgFPrMCK6Y9KxYQu3OTwjusFk_kwZBWiA6f-D9H4GVPId2255DxxSgOuxhizgxAWuIV6RE4KQnz22I_9xTOQrnvMtImhaU0p6gcClik7b25Mf5ShqdZX6skDz-HXY', eg.globals.volumeStep)")
        </Action>
        <Action Enabled="False">
            EventGhost.PythonCommand(u"eg.plugins.AutoRemote.SendMessage(u'Note 3', u'goo.gl/1GBu9x', u'APA91bEUJlqIpBsFh7I_6jDB7TQVsEp0t3iv28vWPK6RR3aupQL-Eu652yjgFPrMCK6Y9KxYQu3OTwjusFk_kwZBWiA6f-D9H4GVPId2255DxxSgOuxhizgxAWuIV6RE4KQnz22I_9xTOQrnvMtImhaU0p6gcClik7b25Mf5ShqdZX6skDz-HXY', a , u'10000', u'', u'', u'')")
        </Action>
        <Action Enabled="False">
            EventGhost.PythonCommand(u'print eg.WinApi.SoundMixer.GetMasterVolume()')
        </Action>
        <Action Enabled="False">
            AutoRemote.SendMessage(u'Note 3', u'goo.gl/1GBU9x', u'APA91bEUJlqIpBsFh7I_6jDB7TQVsEp0t3iv28vWPK6RR3aupQL-Eu652yjgFPrMCK6Y9KxYQu3OTwjusFk_kwZBWiA6f-D9H4GVPId2255DxxSgOuxhizgxAWuIV6RE4KQnz22I_9xTOQrnvMtImhaU0p6gcClik7b25Mf5ShqdZX6skDz-HXY', u' pcvolume=:={eg.event.payload.arpar[0]}', u'', u'', u'', '', u'', u'')
        </Action>
    </Macro>
</EventGhost>
EventGhost Version: 0.4.1.r1669
Windows 7
EventGhost Version 0.4.1.r1669
Windows 7
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: AutoRemote Gets System Volume

Post by Javier »

I use terRemote but the autoremote process should be similar to the terRemote instructions here http://www.terremote.com/tutorials/exam ... nformation.
Since the system volume will trigger an event when changed, you could just send the payload "eg.event.payload" to autoremote. I believe eg.event.payload would be placed in the autoremote message box

This Macro only shows the payload of System.Volume on the OSD

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1640">
    <Macro Name="Show System Volume" Expanded="True">
        <Event Name="System.Volume" />
        <Action>
            EventGhost.ShowOSD(u'{eg.event.payload}', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, False)
        </Action>
    </Macro>
</EventGhost>
I do not have autoremote but I believe the action would be something like this (your device info is missing)

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1640">
    <Action>
        AutoRemote.SendMessage('', '', '', u'{eg.event.payload}', u'', u'', u'', '', u'', u'Device Name')
    </Action>
</EventGhost>
thahim
Posts: 17
Joined: Fri Jul 11, 2014 5:33 am

Re: AutoRemote Gets System Volume

Post by thahim »

thanks i have created one and its working..
EventGhost Version 0.4.1.r1669
Windows 7
Post Reply