A day or two ago, when I first saw this mentioned, I tried a Routine and it worked fine with Power Source. I’ve just looked again and I see Unknown Condition too.
I haven’t been able to re-create it myself - it’s working normally for me. But I’ll look at the device profile and capability definitions to confirm they aren’t missing anything.
Also, when I add the Battery virtual device, it uses the generic symbol ICON, and Alexa does not see it as a device at all.
Alexa does not recognize SmartThings battery devices. What kind of control are you wanting to have from Alexa?
Several of the virtual devices have switches included in order to provide control from Alexa. Alexa only recognizes certain SmartThings device types (batteries not included!) I had not included one in the virtual battery device since it’s not obvious what you’d be controlling. Could you perhaps set up a separate virtual switch controlled by Alexa that would in turn trigger your battery device?
I’ve double checked on my end and can’t see anything that would be causing the problem you are seeing trying to create an IF condition based on battery power source.
@nayelyz - We may have a platform glitch for you to report. A virtual device is using the stock powerSource capability and recently people are reporting that they cannot create an automation routine IF condition with it. See this screen shot.
I personally am not seeing this happen on my app (iOS), but 3 others are having the same problem.
DETAILS
Driver ID: 0fd9a9a4-8863-4a83-97a7-5a288ff0f5a6
Channel ID: e6e29aeb-2793-4ebf-b8f6-e37b69e32c61
Edge Profile
name: vedgebattery.v1
components:
- id: main
capabilities:
- id: battery
version: 1
- id: partyvoice23922.batterylevel
version: 1
- id: powerSource
version: 1
- id: partyvoice23922.powersource
version: 1
categories:
- name: Others
metadata:
vid: 25c83bc2-88e1-3440-9383-47e5073a7733
mnmn: SmartThingsCommunity
Thanks for sharing this, I’ll make some tests to check this issue. I’ll keep you updated.
Using iOS, it doesn’t show ‘unknown condition’ when selecting the power condition as a trigger. It’s showing what it should, but it still won’t let me save the Routine using iOS with a popup showing ‘network error’ when the power condition is the only trigger for the Routine. However, if I add another trigger like for instance time, then it saves the Routine, but without the power condition as one of the triggers.
Android shows the ‘unknown condition’ after selecting the power condition as a trigger, and won’t let me save the Routine even if there are other triggers.
Yeah, I’m watching this thread so, I saw the comment.
I need to make more tests, so far, using the capability by itself in other integration types hasn’t caused any issues on my side. I’ll also use your driver to check its behavior.
Update:
I was able to replicate it only using your driver @TAustin. First, I thought it was because when you create a virtual device of type “battery”, you only initialize the powerSource
capability:
2022-06-14T21:48:20.814947838+00:00 INFO Virtual Devices V2 <Device: 2af02619-8348-437a-87c1-e66b67d023f6 (vEdge Creator V2.3)> received command: {"args":{"value":"Battery"},"capability":"partyvoice23922.createdev","command":"setDeviceType","component":"main","positional_args":["Battery"]}
2022-06-14T21:48:20.819805338+00:00 TRACE Virtual Devices V2 Found CapabilityCommandDispatcher handler in vedgeDriver
2022-06-14T21:48:20.832381463+00:00 DEBUG Virtual Devices V2 Device type selection: Battery
2022-06-14T21:48:20.835397546+00:00 INFO Virtual Devices V2 Create 1 additional virtual Battery device(s)
2022-06-14T21:48:21.152519380+00:00 DEBUG Virtual Devices V2 vEdge Creator V2.3 device thread event handled
2022-06-14T21:48:21.991064339+00:00 TRACE Virtual Devices V2 Received event with handler device_lifecycle
2022-06-14T21:48:21.998806422+00:00 INFO Virtual Devices V2 <Device: f99a439d-11f8-4a06-aa05-8d75fe6f3556 (vEdge Battery 3)> received lifecycle event: added
2022-06-14T21:48:22.006061755+00:00 TRACE Virtual Devices V2 Received event with handler device_lifecycle
2022-06-14T21:48:22.009001422+00:00 INFO Virtual Devices V2 <Device: f99a439d-11f8-4a06-aa05-8d75fe6f3556 (vEdge Battery 3)> received lifecycle event: doConfigure
2022-06-14T21:48:22.012870630+00:00 TRACE Virtual Devices V2 Found DeviceLifecycleDispatcher handler in vedgeDriver
2022-06-14T21:48:22.015755297+00:00 INFO Virtual Devices V2 f99a439d-11f8-4a06-aa05-8d75fe6f3556: vEdge_Battery_1655243300.844> ADDED
2022-06-14T21:48:22.018863005+00:00 INFO Virtual Devices V2 <Device: f99a439d-11f8-4a06-aa05-8d75fe6f3556 (vEdge Battery 3)> emitting event: {"attribute_id":"powerSource","capability_id":"powerSource","component_id":"main","state":{"value":"unknown"}}
2022-06-14T21:48:22.028447255+00:00 INFO Virtual Devices V2 <Device: 2af02619-8348-437a-87c1-e66b67d023f6 (vEdge Creator V2.3)> emitting event: {"attribute_id":"deviceType","capability_id":"partyvoice23922.createdev","component_id":"main","state":{"value":"1 created"}}
But, I made a test without initializing any capability of my driver and I was still able to create a routine using powerSource
. So, can you send me over DM or build@smartthings.com more details about your driver configuration to see what could be the difference in your case, please?
@nayelyz I have a LAN driver (Vista alarm panel) that exhibits this powerSource behavior, but also have a z-wave driver (Zooz Q motion sensor) that works fine. I was looking for a difference in the profiles last night but couldn’t find anything.
try refreshing the screen. tap on the screen and drag it down which will force the refresh
Thanks for the replay, but sadly it is not working.
I have noticed some weird behavior with virtual devices lately. But delete the device and the driver. Then install driver again and scan for the device. Should help. Also reboot the hub.
Sadly did not help.
which hub do you have?
Smartthings v3
This is because those capabilities are not initialized when the device is created, they have a null
value.
A workaround is sending a command manually to the partyvoice23922.createdev
capability to create the device you need.
This can be done using the ST API (device endpoint) here’s an example using postman:
Please, let me know if you have any questions.
Note: Remember you need to use a Personal Access Token in the authorization tab:
Something has changed in the platform or the app, since this issue is just now popping up on more than one driver, and this has never been a problem before.
Yeah, I’ll verify with the team more details about this issue and keep you updated. I just wanted to share the workaround that I used yesterday for my tests.