Virtual Device: AWAY

I have added the files to enable the creation of virtual devices, and would like to create “AWAY” and “HOME” devices so that I could know the “state” of occupancy of the home and make scenes contingent on one or the other.

When I went to create the “AWAY” device, I was presented with a whole bunch of fields with names that didn’t mean anything to me.

Can anyone point me in the right direction as to what to put into each field (if anything) to accomplish this? I know this is a common virtual device to create, so if this info is fully detailed somewhere else, please feel free to direct me there. Everything I have found so far only gets me to the step I am at right now.

Thanks in advance,

David

@tripletdad,
Only the following 3 fields need input:

Description:
UpnpDevFilename: D_StateDevice.xml
Room: <whatever ‘room’ you want to put the device in>

(General instructions for creating devices are here.)

Note that the idea is to have a single ‘light’ (i.e. the virtual device) to indicate whether you’re Home or Away.

And here’s a bit more text about the whole process for the Home/Away virtual light.

@tripletdad, Only the following 3 fields need input:

Description:
UpnpDevFilename: D_StateDevice.xml
Room: <whatever ‘room’ you want to put the device in>

(General instructions for creating devices are here.)

Note that the idea is to have a single ‘light’ (i.e. the virtual device) to indicate whether you’re Home or Away.

And here’s a bit more text about the whole process for the Home/Away virtual light.

oTi,

Thank you so much! It works perfectly!

-David

[quote=“oTi@, post:2, topic:168404”]Only the following 3 fields need input:

Description:
UpnpDevFilename: D_StateDevice.xml
Room: <whatever ‘room’ you want to put the device in>[/quote]

So I downloaded denix’ StateDevice code and created a virtual device, loading only the three fields above. I get a device with On and Off buttons in the UI; when I click either button I get “Error. Delivery failed.”

To create the virtual device I followed the instruction on the MCV Wiki.

What am I missing?

The documentation for this entire system sucks. Thank god this forum exists or the thing would be unusable.

[quote=“rogerl, post:4, topic:168404”]What am I missing?[/quote]Sounds like it may be the I_xml
Lets see if we can find the full package.

JOD.

[quote=“JOD, post:5, topic:168404”][quote=“rogerl, post:4, topic:168404”]What am I missing?[/quote]Sounds like it may be the I_xml
Lets see if we can find the full package.

JOD.[/quote]

FYI, I installed both the D and I xml’s on my Vera, but did not fill in the Implementation field in the virtual device screens (per the instructions above).

After installing did you restart the LUA server as per wiki instructions and/or reboot Vera?

So your good now?
Was the zip file “State Device 0.1” ? I believe that was the latest revision…

JOD.

I rebooted Vera. I restarted the LUA server (assuming that one does that by pressing the curvy arrows icon at the upper right side of the UI).

Yep, that should work, but no effect?!? Are you sure you uploaded all files from the zip package to the right folder in Vera?!?

Sure? No…but I uploaded the D and I files using the Upload link in the appropriate screen. The files I have are version 1.0.

Ah! When you unpack the zipfile @JOD mentioned, there are files inside.
They need to be uploaded to Vera like you did with the D and I files.

Make sure you upload all of them, then reboot Vera.
Not sure but I think there are 3 or 4 files in there including an important .json file!

Sure? No…but I uploaded the D and I files using the Upload link in the appropriate screen. The files I have are version 1.0.[/quote]

;D I’m surprised (not really) that we are going through this again…

When it’s finally figured out (again) how can we get it on code.mios ?

JOD.

@JOD

Grin… That’s the problem with these “community plugins”
preferrably @denix would bring it to the code page where it can be maintained.

Otherwise we could ask perhaps @guessed to do the same thing he did with the ping sensor.
Move it there and make it “open to developers”

I see no other way. Anyway, I’ll take a look at the How To install LUUP plugins to see what I can clarify there…

Henk

[quote=“JOD, post:13, topic:168404”];D I’m surprised (not really) that we are going through this again…

When it’s finally figured out (again) how can we get it on code.mios ?

JOD.[/quote]

[quote=“Henk, post:14, topic:168404”]@JOD

Grin… That’s the problem with these “community plugins”
preferrably @denix would bring it to the code page where it can be maintained.

Otherwise we could ask perhaps @guessed to do the same thing he did with the ping sensor.
Move it there and make it “open to developers”

I see no other way. Anyway, I’ll take a look at the How To install LUUP plugins to see what I can clarify there…

Henk

[quote=“JOD, post:13, topic:168404”];D I’m surprised (not really) that we are going through this again…

When it’s finally figured out (again) how can we get it on code.mios ?

JOD.[/quote][/quote]

Well, the zip file I have has only the two xml files (I and D). I got it from http://forum.micasaverde.com/index.php?topic=2138.msg9104#msg9104
Perhaps I have the wrong file?

Sorry to be such an idiot, but it really is not clear…

Do you want to try the files in 0.1?

I’m quite sure this was the latest working version. If they dont work, I will remove the attachment so others dont get stuck using them.
See attached,

JOD.

That worked perfectly. Thanks so much.

BTW, I already had a BinaryLight1.json file on my Vera…the one you sent must have been different/newer. In any case, things appear to be working, so I can get on with what I really wanted this for…

Roger

Note that the Luup plugins and Luup code repository should have the correct references.

(The first link there for the Virtual StateDevice, currently [298], points to the known-good up-to-date set.)

[quote=“oTi@, post:18, topic:168404”]Note that the Luup plugins and Luup code repository should have the correct references.

(The first link there for the Virtual StateDevice, currently [298], points to the known-good up-to-date set.)[/quote]

So count me as among those who are bumfoozled by this one. I have installed the D and I files from the zip. I have restarted the LUUP engine many time. Clicking on the GUI buttons for the virtual device doesn’t seem to change the value of the device’s Status variable, just changes the GUI widget–that is, the widget reflects the expected on/off value, but the Status variable doesn’t track. Apparently, buried somewhere in all the threads about this, there’s a hint that you can’t affect the Status this way–you have to use scenes. I have set up scenes that turn this device on and off–is what I need to be doing having the scenes directly set the value of the device’s Status variable?

If so, is there a reason why this “switch” can’t work more like a switch and less like a radio-controlled airplane?

–Richard

Edit: NEVER MIND! The switch works fine, it’s UI4 that is not showing updated state. I have this working to my satisfaction.

Correct (as you already worked out with @mcvflorin). I believe a browser refresh will get you the current values.