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.

CommandFusion: iPhone control with customizable interface

If you have a question or need help, this is the place to be.
Post Reply
User avatar
derGoNzO
Posts: 17
Joined: Sun Jan 31, 2010 10:33 am
Location: Germany

Re: CommandFusion: iPhone control with customizable interface

Post by derGoNzO »

Here my first attempt with python:

Code: Select all

slider = float(eg.event.payload)/65535 * 16

if slider == 1:
    eg.plugins.FS20PCS.Dim(3101425, 1)
elif slider == 2:
    eg.plugins.FS20PCS.Dim(3101425, 2)
elif slider == 3:
    eg.plugins.FS20PCS.Dim(3101425, 3)
elif slider == 4:
    eg.plugins.FS20PCS.Dim(3101425, 4)
elif slider == 5:
    eg.plugins.FS20PCS.Dim(3101425, 5)
elif slider == 6:
    eg.plugins.FS20PCS.Dim(3101425, 6)
elif slider == 7:
    eg.plugins.FS20PCS.Dim(3101425, 7)
elif slider == 8:
    eg.plugins.FS20PCS.Dim(3101425, 8)
elif slider == 9:
    eg.plugins.FS20PCS.Dim(3101425, 9)
elif slider == 10:
    eg.plugins.FS20PCS.Dim(3101425, 10)
elif slider == 11:
    eg.plugins.FS20PCS.Dim(3101425, 11)
elif slider == 12:
    eg.plugins.FS20PCS.Dim(3101425, 12)
elif slider == 13:
    eg.plugins.FS20PCS.Dim(3101425, 13)
elif slider == 14:
    eg.plugins.FS20PCS.Dim(3101425, 14)
elif slider == 15:
    eg.plugins.FS20PCS.Dim(3101425, 15)
elif slider == 16:
    eg.plugins.FS20PCS.Dim(3101425, 16)
But it don┬┤t works :(
Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: CommandFusion: iPhone control with customizable interface

Post by Bartman »

derGoNzO wrote:But it don┬┤t works :(
It will if you accidently hit one of the 17 values in 65536 were one of conditions is true.
you are calculating floating point values and in most cases it wont be exactly equal to an integer.

You also have to remember the latest value somehow to prevent sending the same code all over again.
But it will be propably easier to wait for Commandfusion wheter it is possible to limit to possible slider values.
User avatar
CommandFusion
Experienced User
Posts: 59
Joined: Thu Jun 25, 2009 9:36 am
Location: Melbourne, Australia
Contact:

Re: CommandFusion: iPhone control with customizable interface

Post by CommandFusion »

If you don't use our plugin, but instead use the generic Network plugin (or even the Broadcast plugin) we can send any value you like on slider drag, using the 'System Manager' within guiDesigner.
This uses any protocol you like, rather than the one built into iViewer (which was mainly for systems like Crestron/AMX). See this wiki entry for details on the two possible control methods:
http://www.commandfusion.com/wiki/index ... nal_System

When using External Systems, you can set a slider min=0, max=16, then create a command such as 'dim_[sliderval]' and apply it to the slider "drag command" (or press/release as well if you like) and it will send a message like this: 'dim_1' or 'dim_10', etc. You just need to setup the System in System Manager of guiDesigner to point to your PC running EventGhost, and the port that the plugin is using (you could also use the Broadcasting plugin and set the System to 255.255.255.255 UDP on whatever port the plugin is using).

There are many ways to do this. Of course the easiest is to use our plugin and write some custom Python in the background to only send the dim command if the current dim level is different.
Jarrod Bell
CommandFusion
User avatar
derGoNzO
Posts: 17
Joined: Sun Jan 31, 2010 10:33 am
Location: Germany

Re: CommandFusion: iPhone control with customizable interface

Post by derGoNzO »

Okay, sounds like I have to learn about EG, CommandFusion, Python much more...
I think I should start with Python and buy a book from amazon :wink:

Thanks all of you!

I hope I find the solution for my intend, if so I give you a feedback! :D

Greetz
Sheugel
Posts: 16
Joined: Sat Apr 25, 2009 5:30 pm

Re: CommandFusion: iPhone control with customizable interface

Post by Sheugel »

Hi,
I wonder if it's possible to use your plugin to fetch the data from the Spotify plugin and see what's playing on the iPhone CF iViewer. It's possible to do so from the Webserver plugin: http://www.eventghost.org/forum/viewtop ... ver#p12417
I used the example gui which works great to send events. How can I do to retrieve these data and display them on the iPhone? Will it work dynamically as the data ar modified within EventGhost.
Thanks,
Sheugel
User avatar
CommandFusion
Experienced User
Posts: 59
Joined: Thu Jun 25, 2009 9:36 am
Location: Melbourne, Australia
Contact:

Re: CommandFusion: iPhone control with customizable interface

Post by CommandFusion »

Any data you can get in EventGhost you can send back to iViewer as either a button state (digital join), gauge level (analog join) or string data (serial join).
Check out the example config to see how the data is sent back using Python scripts (the volume gauge level for example).
Jarrod Bell
CommandFusion
hdjii
Posts: 6
Joined: Sun Sep 13, 2009 7:52 pm

Re: CommandFusion: iPhone control with customizable interface

Post by hdjii »

:?: :x I have installed the CF guiDesigner on my iPod Touch and setup one of the gui templates provided. I am running EventGhost with serial control of a Denon 3805 and a DirecTV HR-21. This works very well but I can not figure out how to get feedback of status information to the iPod Touch. For example, the Denon responds to the command, MV? and displays the current volume in the EG log, but I can not get it to display on the iPod Touch. I have read everything I can find online, but I am missing some essential piece(s) of the setup.

The Regex = DenonSerial.MV.(.*) in Feedback properties. The Regex Tester returns 53 when the Denon returns "DenonSerial.MV.53" as the current volume. I can not get this string (current volume string) to show up in the Analog Value field of the Analogue Change properties or in the Serial Value field of the Serial Change properties. When I manually enter values in these fields, they are transmitted to the iPod Touch and displayed where expected based on the join number.

The macro is shown below:
Action - CommandFusion.DigitalRelease_26
Action - Denon AV Serial: Send Raw Command: MV? (DenonSerial.MV.53 is shown in the log)
Action - CommandFusion Plugin: Analog Change: 1 Digital Join Number = 1
Configure Analog Value (0-65535) = 85 (This causes the Slider to show a bar corresponding to 85%)
Configure Minimum Value = 0
Configure Maximum Value = 100
Action - CommandFusion Plugin: Serial Change: 1 Serial Join Number = 1
Configure Serial Value = 25 (This show Volume = 25 above the slider)

I would appreciate any help and especially any examples which would be relevant.

P.S. I tried to use the Broadcaster plugin but could not figure out what to put in the Command and Payload fields.

Howard
User avatar
CommandFusion
Experienced User
Posts: 59
Joined: Thu Jun 25, 2009 9:36 am
Location: Melbourne, Australia
Contact:

Re: CommandFusion: iPhone control with customizable interface

Post by CommandFusion »

Sounds to me like the actual string either isn't being sent to iViewer, or the string is not formatted the same as shown in the log.
Did you follow the examples in the EventGhost example config included with our plugin? Notice how the volume analog value is sent via a short Python script.
Configuring to send a static value of 85 will always send that value, rather than data captured from the Denon.

Not sure how you get data from the Denon reply to the Analog value change, perhaps Fiasco can shine some light in that direction?

Edit: You don't need to use regex if you are using EventGhost to send the information using our plugin. The connection details are set in the project properties within guiDesigner because the EG plugin uses our built in protocol. Clear out anything you have in the System Manager relating to EventGhost, as this is not where you set it up. See the example GUI project on the EventGhost plugin download page for an example of how you should setup the communications in your GUI file:
http://commandfusion.googlecode.com/svn ... st_plugin/

See our wiki for details on the two possible communication methods:
http://www.commandfusion.com/wiki/index ... rol_System
Jarrod Bell
CommandFusion
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

Re: CommandFusion: iPhone control with customizable interface

Post by Fiasco »

Howard I can help you out Sunday night.
hdjii
Posts: 6
Joined: Sun Sep 13, 2009 7:52 pm

Re: CommandFusion: iPhone control with customizable interface

Post by hdjii »

Fiasco wrote:Howard I can help you out Sunday night.
Thanks. I appreciate your assistance very much.

Howard
Jostein
Experienced User
Posts: 108
Joined: Sun Feb 15, 2009 12:59 pm

Re: CommandFusion: iPhone control with customizable interface

Post by Jostein »

Hi Jarrod.

Is it posible to show webcam feeds on the iphone using a custom interface? Alsow posible to show coverart images from spotify?

Best regards Jostein
User avatar
CommandFusion
Experienced User
Posts: 59
Joined: Thu Jun 25, 2009 9:36 am
Location: Melbourne, Australia
Contact:

Re: CommandFusion: iPhone control with customizable interface

Post by CommandFusion »

Both these functions are possible using dynamic images.
You simply set the image source to the URL of the image you want to display, and can set the auto refresh timer if you want to automatically update the image.

This requires a camera that outputs an image feed somehow.

For cover art, the device (or software) being controlled must serve up the images via a web server somehow. iViewer only supports showing dynamic images at runtime from http urls, or static images at design time.
Jarrod Bell
CommandFusion
Svedenblad
Posts: 3
Joined: Sun Mar 28, 2010 8:16 pm

Re: CommandFusion: iPhone control with customizable interface

Post by Svedenblad »

Hi Jarrod,

I have read this thread with great interest. I have all the hardware and software needed to get this working. Atleast I think so :roll:
I have gotten to the state where I have uploaded the file to the Iphone via GuiDesigner. The interface shows up in the phone. From what I understand you don't need to have the same port when uploading to the phone and communicating with eventghost.

My problem now is that when I push a button on the Iphone nothing happens in Eventghost. I have the same port in GuiDesigner as in Eventghost so that they should be able to communicate, firewall off (just in case if that causes problems), the plugin activated i Eventghost (with the right port).

I am not shure how/where to give a button a "join"? Is that what's causing the problem?

/Peter
User avatar
CommandFusion
Experienced User
Posts: 59
Joined: Thu Jun 25, 2009 9:36 am
Location: Melbourne, Australia
Contact:

Re: CommandFusion: iPhone control with customizable interface

Post by CommandFusion »

You give objects joins within their properties (double click or right click to access properties for any object on a page).

The 'Upload Service' port is only for uploading, default is set to 8019. This is the port you also put in the iViewer GUI File URL setting, eg: 192.168.0.100:8019 (replace IP with your computer's IP address running guiDesigner Upload Service).

For the actual communications with the EventGhost plugin, you set this in the project properties within guiDesigner (right click the root node in the project tree, or edit>project properties). The IP and port you enter in here must match the IP address of your PC running EventGhost and the port of the CommandFusion plugin.

Make sure you have nothing set in the System Manager. See our wiki for the difference between Control Systems (defined in project properties settings) and External Systems (defined in System Manager): http://www.commandfusion.com/wiki/index ... rol_System

See the example EventGhost config file for an example of how to set things up. You can download it from the same place the plugin is found (http://code.google.com/p/commandfusion/)
Jarrod Bell
CommandFusion
Svedenblad
Posts: 3
Joined: Sun Mar 28, 2010 8:16 pm

Re: CommandFusion: iPhone control with customizable interface

Post by Svedenblad »

Thanks a bunch!

Will try this when i get home from work.

/Peter
Post Reply