After about 10 minutes of manually creating a virtual device I do indeed conclude that SwitchMania nothing more than a waste of time.
[OBSOLETE] SwitchMania - create 4 different kinds of virtual switches
Not for me. It has worked from day one and creating virtual devices has never been easier.
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:
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])
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:
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
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.
500: Internal Server Error
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