Author Topic: Virtual Dimmer  (Read 10728 times)

Offline gderosa

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Virtual Dimmer
« on: November 07, 2011, 01:48:44 pm »
Hello!

Has anyone ever implemented a virtual DimmableLight? Any link?

I'm developing yet-another-external-UI and don't want to install a whole set of real zwave device just to test my software. Actually I have a Vera 2 controller and various devices but no working light dimmer right now.

I guess a "library" of virtual devices (one for each category) would be greatly useful for many UI developers.

If such a thing does not exists, I shall implement it by myself. AFAIU, I need to create an implementation file I_DimmableLight1.xml (an XML embedding some Lua code) which is the companion of the specification contained in D_DimmableLight1.xml . Am I correct?

Thanks in advance.

Guido De Rosa




Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: Virtual Dimmer
« Reply #1 on: November 07, 2011, 02:14:06 pm »
The "Plugin for cm15a/cm19a X10 Controllers" (http://forum.micasaverde.com/index.php/topic,7463.0.html) implements a "virtual" dimmer that "connects" to a real X10 dimmer.

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Virtual Dimmer
« Reply #2 on: November 08, 2011, 03:23:36 am »
Here are some implementation files for virtual devices. There are:
  • a virtual binary light
  • a virtual dimmable light
  • a virtual thermostat
  • a virtual window covering

Offline drag0n

  • Full Member
  • ***
  • Posts: 130
  • Karma: +1/-1
Re: Virtual Dimmer
« Reply #3 on: November 08, 2011, 07:19:30 am »
Is it possible to create a virtual device that supports group associations?
I need to create association from a physical switch to a virtual one.
Currently, the virtual devices do not appear in the device list in the Device Option/Associations/Set menu.
_____________________________________
Vera Lite, Remotec Z-URC 550, MiniMote, TKB TZ66D, TKB TZ-71, ZXT-120, ACT ZRP200 , SmartSwitch, Quad Relay, Poly Lock & Poly Pad, SQ Blaster & SQ Blaster+, HMS100, Everspring SF812, Current Cost EnviR, RFXtrx, RollerTrol , Flamingo FA20RF

Offline gderosa

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Virtual Dimmer
« Reply #4 on: November 08, 2011, 09:42:06 am »
Here are some implementation files for virtual devices.

Fantastic! DimmableLight works great. Many thanks.

I think this should be made available on the wiki  ;)

Guido

Offline davidd1205

  • Full Member
  • ***
  • Posts: 158
  • Karma: +0/-0
Re: Virtual Dimmer
« Reply #5 on: February 18, 2012, 08:00:07 am »
Hello

in the virtual module I_covering I can meter up for example:
luup.inet.wget ("http://192.168.1.60/teleco.cgi&channel=2&action=up") and to stop
luup.inet.wget ("http://192.168.1.60/teleco.cgi&channel=2&action =" my ") and down luup.inet.wget (" http://192.168.1.60/teleco.cgi&channel=2&action=down ")

I'm ui5 if possible I would need more to remove the dimmer and close and open the panel on the device

I have an post here
http://forum.micasaverde.com/index.php/topic,9520.0.html

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1036
  • Karma: +37/-14
Re: Virtual Dimmer
« Reply #6 on: February 18, 2012, 08:20:19 am »
Here are some implementation files for virtual devices. There are:
  • a virtual binary light
  • a virtual dimmable light
  • a virtual thermostat
  • a virtual window covering

I think someone should transfer these to apps.mios.com as plugins. This makes it possible for not so advanced users to install and use them.
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline adjohan

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Virtual Dimmer
« Reply #7 on: May 16, 2012, 01:24:03 pm »
I'm not an advanced user and I don't know how to create these virtual devices.
I'm guessing that I should click on Mios developers icon, then upload the xml file?
But they don't come with .json file?
I would appreciate any guidance. Thanks!!

Offline capjay

  • Hero Member
  • *****
  • Posts: 675
  • Karma: +9/-3
Re: Virtual Dimmer
« Reply #8 on: May 16, 2012, 04:06:42 pm »
if you're on UI5, then go to Apps / Develop Apps / LUUP files. Upload the xml files you want,
then select create device from the left side menu (say you are creating a virtual BinaryLight1)
enter D_BinaryLight1.xml as Upnp Device Filename
enter I_BinaryLight1.xml as Upnp Implementation Filename

you are all set!


Offline adjohan

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Virtual Dimmer
« Reply #9 on: May 17, 2012, 09:21:45 am »
Thanks capjay! I'm on UI4 but your direction gave enough hints to get me going.

Offline ChrisK

  • Full Member
  • ***
  • Posts: 207
  • Karma: +22/-59
Re: Virtual Dimmer
« Reply #10 on: May 21, 2012, 03:42:17 pm »
I have a question about the I_DimmableLight1.xml file.  At the end of the action SetLoadLevelTarget it has the statement "return 4, 5."  What do these return values to the caller represent? 

Thanks,
Chris

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Virtual Dimmer
« Reply #11 on: May 22, 2012, 06:08:48 am »
The first value is the job status (4 = job done), the second value is the job timeout (5 seconds).
Please read this: http://wiki.micasaverde.com/index.php/Luup_Plugins_ByHand#run.2Fjob.2Fincoming.2Ftimeout


Offline Hipsi

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-1
Re: Virtual Dimmer
« Reply #12 on: December 31, 2016, 08:52:52 am »
I know this is an old topic but hoping someone will be able to help me. I've created a virtual dimmer which works fine in the web UI, but if I try to use it in Imperihome or Authomation it only takes an input from the slider. The On and Off functions don't work.  Any ideas?