Mimolite and Computer switch?

(Abraham Cook) #1

Hello everyone,

This is my first forum post and I was wondering if anyone has ever used voltage input to declare whether a switch is on the on or off position in the smartthings app.

I am currently using mimolite in momentary switch position to turn my computer on and off but the problem that I’m having is that since the switch is momentary smartthings will say the computer is off when I have turned it on. I noticed that the voltage detected when the pc is off is 2.3v and 3v when the pc is on. I was hoping to take advantage of this to indicate in the smartthings app such that 3v would show the switch as on and when switches it would send an on signal to the switch to turn the pc off. And then when it is not 3v it would show switch as off and smartthings would send an on signal to switch the pc on.

I have tinkered with the device handler code but have had no luck in trying to get this code up and running at all. I am fairly new to the device handlers language at the moment.

Thank you.

(Kraeg) #2

I have done this, but slightly different.

I have a SmartThings plug and reading the voltage off that, then a separate virtual switch.

This allows the plug to Update he virtual switch with on/off status depending on voltage using CoRE (or WebCoRE if you using that). But also means if I manually turn it off, it doesn’t kill the power to the Pc.

I have also setup Wake On LAN on the virtual switch and remote shutdown too for when I turn it off. This gives me full control of the PC and will also stay in sync if I manually turn it on.

I’ve named it “Computer” so I can ask Alexa to turn it on.

Then made sure my actual physical plug is named something different so I don’t accidentally turn it off.

I also use the virtual switch in ActionTiles to see the status of it and can use it in routines so my computer goes off at night etc


(Abraham Cook) #3

That would work but I was aiming for a wireless switch inside the chassis instead of and external one. The switch runs fine I can turn the pc on and off simply by using the smartthings app so no need for a desperate switch and the switch can also perform soft offs when the computer is on so I do not need to run additional handlers to turn the pc off.
Thank you for the reply with possible solution but I will try to tinker with the code to see if I can’t get it to work.