This object is in archive! 

Possible to set on/off virtual switch via url

DaBoss shared this question 11 years ago
Need Answer

Hi,


Is it possible to set a virtual switch (or other) via url request like virtual sensor ?


Exemple:

http://my.zipato.com/zipato-web/remoting/attribute/set?serial=xxxxxmyzipaserialxxx&ep=????????&apiKey=????&state=on


thanks . . .

Replies (11)

photo
1

I dont get it... Yes

photo
2

Hum, sorry i'm not sure i understand you answer . . . it's means you don't understand my question ?

If that . . . i explain differently


Today, we can use url to change state of virtual sensor . . .

Indeed, when the virtual sensor is created, we can retreive url by editing the device and get url for TRUE and FALSE state . .


How can i use the same thing for Virtual Switch On/Off.

I want to change On/Off virtual switch by using url request from my.zipato.com.


Possible or not ?


Why i want do that ?

I'm using the Zipabox and a Synology NAS to make WakeOnLan and Shutdown my computers.

I created one VirtualSwitch per computer and one rule per computers. When virtualswitch change state, i make url request to PowerOn or Off the computer.

That's work well . . .

But, if i boot my computer with button . . .zipabox must know that the computer is online. So i create un schedule rule to check status of my computer but the only way to display computer state on zipabox interface is to create a VirtualSensor and change his state during my php script. (The more simple would be to change state of VirtualSwitch directly).

But, at this moment, VirtualSwitch is OFF and my VirtualSensor is ACTIVE, not realy coherant...so i create a rule to change state of VirtualSwitch.


Is it clear ?


Not sure is clearly in french ;-)

photo
1

U can use a virtual Sensor and make a rule that's turn/off a virtual switch.


How do you turn on your computer?

photo
1

HeroS > As you can read . . .this is what i do for the moment, but it's simple as directly use VirtualSwitch. Less rules, less VirtualSensor . . .


To turn on my computer i use Wake On Lan by sending Magic Packet from my php script running on my NAS

photo
1

Ok, no it's not possible.

photo
1

this is what I thought. . . hope the release of an API for Zipabox soon..

photo
1

I can not retrieve the URL for a virtual switch nor for a virtual sensor.

The only virtual "entity" which I can control via URL (as I can see relevant URLs

in the config) is a virtual meter. Am I missing something? I just receive the zipabox

and I am running the latest firmware.

photo
2

Wojtek T wrote:

I can not retrieve the URL for a virtual switch nor for a virtual sensor.

The only virtual "entity" which I can control via URL (as I can see relevant URLs

in the config) is a virtual meter. Am I missing something? I just receive the zipabox

and I am running the latest firmware.

never mind ;)

photo
4

Can you tell me how you did it? I'm able to create a virtual switch, but I'm not able to find a way to switch it via HTTP...

photo
1

Use an Virtual Sensor then you have the http control.

photo
1

Hi. Out of curiosity, why is not the functionality DaBoss asks avout implemented?

Would it not be much easier to just be able to change the switch directly instead of doing it thru a rule and a sensor?

Kind of in the same way the sensor changes state the switch could change state?

Regards A

Leave a Comment
 
Attach a file