[Logo] Mango Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
turning devices on and off?  XML
Forum Index » How-To
Author Message
JNIEMI

Initiate

Joined: 27/04/2012 17:08:53
Messages: 18
Offline

Hi all,

Were a long time user of CATNET and are switching over to Mango and its going relatively smooth. But I was wondering how to make a settable point that acts like an on-off switch for a device.

I would also like to make an interface screen where I can see my system and have the switches as little buttons on the screen. See the picture for what Im looking to make. In this particular setup, you can turn on the fan by clicking on it. I want to do something similar with Mango.

Any help?

Thanks,

Jonathan
[Thumb - screenshot.png]
 Filename screenshot.png [Disk] Download
 Description
 Filesize 116 Kbytes
 Downloaded:  89 time(s)

This message was edited 1 time. Last update was at 11/05/2012 11:53:06

JoelHaggar

Knight

Joined: 31/07/2010 19:35:48
Messages: 259
Location: Boulder, Colorado
Offline

Hi Jonathan,

Here is a service side script that should allow you to do what you want:



Add a server side script your graphic view using a biniary point that you want to turn on and off. Create two images that you want to use and install them in the graphics folder. Then modify the image URL in the script to point to your images "graphics/Drinks/drink_empty.png"

Hopefully this is what you are asking about.

Joel.

This message was edited 2 times. Last update was at 11/05/2012 15:04:17


http://www.InfiniteAutomation.com
Victorino

Initiate

Joined: 05/08/2011 03:30:59
Messages: 8
Offline

Joel,

Could you elaborate a little, I'm trying to do a multistate button (on, off, disabled, etc. but this is the first step for me.

The state of a device is received by mango using http receiver, but I can't figure out how to send user requests (button that was pressed) from mango to a server or a device.
JoelHaggar

Knight

Joined: 31/07/2010 19:35:48
Messages: 259
Location: Boulder, Colorado
Offline

The problem here is that http receiver data points are not settable so you can't do this directly. One method that might work for you is to create a virtual point that you display on your dashboard with the button, then use a http publisher to push the data where you need it to go.

Hope that helps,
Joel.

http://www.InfiniteAutomation.com
Victorino

Initiate

Joined: 05/08/2011 03:30:59
Messages: 8
Offline

Joel,

On the example above, where can I find the point.id and pointComponent.id on a particular point?
JoelHaggar

Knight

Joined: 31/07/2010 19:35:48
Messages: 259
Location: Boulder, Colorado
Offline

Sorry, I have no idea and not really sure what you mean. What do you need to know this?
Joel.

http://www.InfiniteAutomation.com
Victorino

Initiate

Joined: 05/08/2011 03:30:59
Messages: 8
Offline

I assumed the point.id and the pointComponent.id has to be changed to their actual value.
JoelHaggar

Knight

Joined: 31/07/2010 19:35:48
Messages: 259
Location: Boulder, Colorado
Offline

No, not at all. This is script is to be used in a server side script on a graphic view. In the script you select the Datapoint you want to use from the drop down list.


http://www.InfiniteAutomation.com
 
Forum Index » How-To
Go to:   
Powered by JForum 2.1.9 © JForum Team