[RELEASE] Device Transformer - Transform a device into a virtual multi-sensor device

*** BPTWorld apps are no longer being developed or maintained. Thanks ***

Introducing 'Device Transformer'
Transform a device into a virtual multi-sensor device.

Features:

  • Controlled by a real device (contact sensor, lock, motion sensor, presence sensor or switch)
  • Automatically creates a new virtual device
  • New device contains contact, lock, motion, presence and switch attributes
  • Virtual device can work in Reverse of the real device

Screenshot 2021-06-04 124545

Apps can be found on my GitHub or by using Bundle Manager.

When reporting problems...

  • Be sure you are on the latest version. I won't troubleshoot an older version.
  • Turn on debug and screenshot the issue happening in the log. One line or just the error doesn't cut it. I need a log.
  • Post the screenshot of the log with an explanation of the problem.

Thanks

6 Likes

Bryan, as usual, what a cool idea.

Question for you: does this allow the creation of a dashboard tile with those same multiple attributes? I ask because I've always wanted to figure out how to have a single tile that shows that status of a door lock, as well as door open/close. Never have been able to crack this!

Thanks. Not sure you understand what this does though... This is the result of one device.

example:
Real Switch A turns off - sets the virtual device attributes to:

  • contact: open
  • lock: unlocked
  • motion: active
  • presence: present
  • switch: off

Then Real Switch A turns on - sets the virtual device attributes to:

  • contact: closed
  • lock: locked
  • motion: inactive
  • presence: not present
  • switch: on

Each attribute can then be used in other apps.

Example:
Say you have an app that only recognizes motion sensors, you could use this to include your contact sensor in that motion group. Via the virtual device!

Hope this makes more sense.


BTW, if you want multiple sources on one tile, you can use Tile Master :wink:
(although the more I think about it, it would be pretty easy to make a simple mutli-device tile...Next!)

1 Like

Yes, that makes sense.

:slight_smile:

@mluck

Hello Bryan, nice app, I’m using it to control tilt Sensor on my garage door. The door controller is getting out of sink with the ope close coming from one sensor. So I used your app to create two child’s one open one closed getting the info from the real tilt Sensor. Everything seams to work but I’m getting grovey errors in the log see below.

dev:2322021-09-17 10:21:47.384 am errorjava.lang.NullPointerException: Cannot get property 'label' on null object on line 83 (method logsOff)

dev:2322021-09-17 09:21:47.391 am errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_BPTWorld_Device_Transformer_Driver_561.refresh() is applicable for argument types: () values: []
Possible solutions: every(), every(groovy.lang.Closure), grep() (method updated)

dev:2322021-09-16 09:40:31.152 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_BPTWorld_Device_Transformer_Driver_561.refresh() is applicable for argument types: () values: []
Possible solutions: every(), every(groovy.lang.Closure), grep() (method updated)

dev:2322021-09-16 09:40:11.483 pmerrororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_BPTWorld_Device_Transformer_Driver_561.unlock() is applicable for argument types: () values: []
Possible solutions: inject(groovy.lang.Closure), inject(java.lang.Object, groovy.lang.Closure), run(), run(), any(), inspect() (method unlock)

dev:2322021-09-16 09:28:28.864 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_BPTWorld_Device_Transformer_Driver_561.refresh() is applicable for argument types: () values: []
Possible solutions: every(), every(groovy.lang.Closure), grep() (method updated)

dev:2322021-09-16 09:28:27.965 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_BPTWorld_Device_Transformer_Driver_561.refresh() is applicable for argument types: () values: []
Possible solutions: every(), every(groovy.lang.Closure), grep() (method updated)

dev:2322021-09-16 09:24:32.945 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_BPTWorld_Device_Transformer_Driver_561.refresh() is applicable for argument types: () values: []
Possible solutions: every(), every(groovy.lang.Closure), grep() on line 283 (method installed)

Thanks Dan

two things...

  • Did you create a data device at the top of the app?
  • Please turn on debug logging and take a screenshot of the debug log, not just the errors.

Thanks

Hi Bryan, I used the HE package installer for the app, so I assume it put the device in? I will grab the debug log as soon as one shows up.

Thanks Dan

Find below the errors from the devices and the debug from the children(2), there is no debug for the devices just the children, I have feeling this is not what you want but I’m trying new at all this.. note the errors come when you do a save preference

Dan

dev:2342021-09-17 04:53:54.235 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_BPTWorld_Device_Transformer_Driver_561.refresh() is applicable for argument types: () values: [] Possible solutions: every(), every(groovy.lang.Closure), grep() (method updated)

dev:2332021-09-17 04:53:44.480 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_BPTWorld_Device_Transformer_Driver_561.refresh() is applicable for argument types: () values: [] Possible solutions: every(), every(groovy.lang.Closure), grep() (method updated)

app:4762021-09-17 04:57:10.761 pm debugUpdated with settings: [pauseApp:false, dataDevice:Virtual Tilt Sensor Close, xContact:Right Garage Tilt Sensor, typeOfDevice:Contact Sensor, logOffTime:Keep On, useExistingDevice:true, logEnable:true, dataName:Virtual Tilt Sensor Close, reverse:false]

app:4762021-09-17 04:56:38.125 pm debugIn createDataChildDevice (1.0.0)

app:4772021-09-17 04:58:59.587 pm debugUpdated with settings: [pauseApp:false, dataDevice:Virtual Tilt Sensor Open, xContact:Right Garage Tilt Sensor, typeOfDevice:Contact Sensor, logOffTime:Keep On, useExistingDevice:true, logEnable:true, dataName:Virtual Tilt Sensor Open, reverse:false]

app:4772021-09-17 04:58:50.263 pm debugIn createDataChildDevice (1.0.0)

app:4772021-09-17 04:24:11.180 pm debugUpdated with settings: [pauseApp:false, dataDevice:Virtual Tilt Sensor Open, xContact:Right Garage Tilt Sensor, typeOfDevice:Contact Sensor, logOffTime:Keep On, useExistingDevice:true, logEnable:true, dataName:Virtual Tilt Sensor Open, reverse:false]

app:4772021-09-17 04:23:59.274 pm debugIn createDataChildDevice (1.0.0)

app:4772021-09-17 01:38:40.745 pm debugIn theDeviceHandler - whatHappened: closed

Okay, please take a screenshot of the child app before you hit save so I can see how you have it setup. Be sure to show the Virtual Device and Origin Device Sections.

Hi Bryan sorry for be such a pain. I screen captured every thing I could I generated the error when I do a preference save on the virtual drivers I got that also, I hope this is not to much now, also noticed when you are asked if you want to reverse actions text for contact is missing see bellow.









I missed one capture

You only need one child app.

  • Delete both child apps (it will automatically delete the two virtual devices)
  • Create a new child app (just one)

In Virtual Device.

  • Have the app create the device (Virtual Tilt Sensor)
  • Then select that device

In Origin Device:

  • Select the contact sensor (Right Garage Tilt Sensor)

That's it! :smiley:

Thanks so much Bryan, so appreciate all your help

Dan​:+1::grinning:

1 Like

No problem, have fun!

@bptworld Bryan, would be very interested in installing your Device Transformer Device and was wondering if it is still available for download? Could not found how to install it. Thanks for your help!

All of my apps are available in Bundle Manager