After about 10 minutes of manually creating a virtual device I do indeed conclude that SwitchMania nothing more than a waste of time.
Not for me. It has worked from day one and creating virtual devices has never been easier.
YMMV
For those that want to use this smart app but are discouraged by it not working - I just installed it and it worked fine, but does appear to require a tiny bit of tweaking. Here are the steps I used:
- Log into the smartthings IDE @ https://account.smartthings.com [edited]
- Go to infofiendās repository and install everything you can.
- In the IDE go to ādevice handlersā and ā+ create new device handlerā and select āfrom codeā
- From infofiends respository, paste the code in for the following device types:
4a. Device One: āMomentary-Button-Tile.groovyā then select āCreateā --> āPublishā -> āFor meā
(repeat step 3)
4b. Device Two: āsimulated-presence-sensor.groovyā then select āCreateā -->āPublishā -> āFor meā
(repeat step 3)
4c. Device Three: āvirtual_dimmerā then select āCreateā --> āPublishā -> āFor meā
ā¦but wait, you need 4 devices! The 4th device can be pulled direct from smartthings IDE.
- Device Handlers --> Create New Device Handler --> From Template
- Select On/Off Button Tile. select āCreateā --> āPublishā -> āFor meā
Next its onto the smart apps. Similar procedure, but under āMy Smart Appsā
- āMy Smart Appsā --> ā+New SmartAppā --> āFrom Codeā
8a - 8c. Paste in, create, and publish the code for the following items in the infofiend repository:
a. my-switch-calls-routines-app.groovy
b. my-virtual-switch-creator.groovy
c. switch-mania.groovy
the ātrickā. What made it finally all work for me was making one minor tweak to the code.
- Under āMy SmartAppsā --> āMy Virtual Switch Creatorā on lines 56 - 64 it lists the different switch types you installed. However, it lists the āMomentary Button Tileā switch as āMichaelStruckā. I donāt have that version, for whatever reason - thatās not what was in the infofiend repository (at least that I installed). So you have to change that line to āsmartthingsā as follows:
def childDevice = addChildDevice(āsmartthingsā, āMomentary Button Tileā, deviceId, null, [label: switchLabel])
Blockquote
Make that change and hit publish. App seems to be working. Havenāt done a full test with everything, but it at least creates the switches without errors as others previously reported.
Thatās all I know. Hope this helps.
FYI: donāt direct people here. This is only a portion of peopleās shard and doesnāt redirect them correctly.
When logging into SmartThings, use:
https://account.smartthings.com
Then they are directed appropriately to their shard (graph.api⦠na04-east1)
Wow, never knew that. What gem. That whole shard thing confused the hell out of me when I first got smartthings. Completely cryptic and didnāt seem to be documented anywhere.
It ends up creating hell for people, because some can login to the graph.api but that isnāt their shard, so they go adding SmartApps, Device Handlers and Virtual Devices and then they canāt figure out why it isnāt showing up in the Marketplace or under Things and this is one of the most major culprits, so when I see it, I try to say something so others donāt end up creating bigger issues for themselves.
Yup. had no idea. Updated link. Thanks.
I have forked and updated this available here
I have changed/updated all the device handlers & made them GitHub installable as a few wasnāt before.
Please Note: You must install the main app Switch Mania first otherwise the child apps wonāt install
Owner: tmleafs
Name: SwitchMania
Branch: master
I get an unexpected error when trying to add a new device I have added all 3 apps and published and the 2 device handlers but will not work.
There are 4 device handlers and 2 smartappsā¦
are you using my stuff or tmleafsā fork?
getting this Error when trying to do the smart apps side.
Error
500: Internal Server Error
URI
/ide/app/doRepoUpdates
Never mind I figured it out.
How did you fix this?
Iām really sorry but I honestly donāt remember.
This app used to work now I get nothing but errors when trying to add new buttons log says device version mismatch