Notifications
Clear all

Do real smart switches exist?


Ron
 Ron
(@zander)
Noble Member
Joined: 1 year ago
Posts: 1824
Topic starter  

Not sure if this is the right sub-forum but I have just learned these so -called smart switches aren't.

What I mean is there is no concept of On and Off, the switches simply toggle.

I have an Alexa Dot, and an Arduino Cloud app with Alexa support. In Alexa I have a voice command that turns the power OFF (or so it thinks) but in the Cloud app all I have available to me in my code is an auto generated empty onChange call back procedure. I tried to see if the Api has anymore meat to it but I can't find the Api. Even if I find the Api and I can distinguish On from Off, there is still no way of knowing the current hardware state without a feedback mechanism. In my situation I added an electro-mechanical relay across the coil of the electric valve I am controlling which grounds an inout pin on my ESP32 and I turn on a LED. What I am still missing is a way to know if Alexa requested ON or OFF. So far since I can't find the Api all I have is notice the state changed. Am I missing something or have I just discovered what every other designer/developer already knew, the smart devices ain't so smart after all. 

It is considered poor judgement to traverse a chasm in 2 leaps.


Quote
byron
(@byron)
Prominent Member
Joined: 3 years ago
Posts: 855
 

@zander

I've only used Alexa some years back when I had a brief play with it by putting it on a rpi to get it to send a voice command to Alexa, and receiving a verbal back, and did not get round to making it do anything useful.  

As for smart switches those I've used would be sent Alexa on / off commands via their own cloud link that interprets the Alexa command and sends the appropriate http or mqtt command to the switch.  Thus I would not expect the smart switch itself would have the abilty to know if Alexa, through a cloud link, failed to send a command.  However,  at least for the smart switch I use (shelly) there is the ability to check its current status through a local http or mqtt status request.  

Therefore I think it depends on how you are connecting to Alexa.  If its through a home brewed gateway on the likes of a rpi, then I expect you could program in a status check shortly after it receives your voice command to send on to Alexa  So not so much a smart switch, but maybe a smart rpi together with a not so very smart switch combination ?? 


ReplyQuote
Ron
 Ron
(@zander)
Noble Member
Joined: 1 year ago
Posts: 1824
Topic starter  

@byron I figured there would be some real smart switches out there but I see no way for alexa to read it. That's ok though, as long as the switch is able to 'know' the difference between on and off then all is ok. My problem is the switches are just typical small snap switches, I have no room for a shelly or similar. The vast majority of alexa uses is to simply toggle the state of a switch, what it's connected to is irrelevant. I have a store bought switch and if/when I connect it to alexa I am sure if I ask her to turn that switch off twice the switch will turn from the second command. My post was mainly to share my experience with others since Bill brought up the subject originally.

I didn't know but suspected the shelly would be smarter, I am still not convinced the alexa is very smart or even able to be programmed to be.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
byron
(@byron)
Prominent Member
Joined: 3 years ago
Posts: 855
 

@zander,

I expect your own home brewed voice controller that is esp32 based would be much more your cup of tea.  Here is a link to an interesting youtube on this I bookmarked a while back as its something I will have a go at when I get chance.

Forget Alexa, do a Ron.


ReplyQuote
Ron
 Ron
(@zander)
Noble Member
Joined: 1 year ago
Posts: 1824
Topic starter  

@byron Seems more than I want to tackle at the moment and I have no idea how it would interface to the Arduino cloud.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
byron
(@byron)
Prominent Member
Joined: 3 years ago
Posts: 855
 
Posted by: @zander

I have no idea how it would interface to the Arduino cloud.

If the demo shown can be made to trigger a pin then it can be made to trigger a variable linked to the Arduino cloud I would think.  

Whilst I have not used the Arduino cloud apart from registering and creating something to receive a temperature variable, I was not overly impressed with the display facilities and prefer to stick to using my own cockpit displays.  But I can see the Arduino is a quick and useful way to get something up and running.  A home brewed 'Alexa' and display GUI programs are for sure not trivial especially when starting from scratch and it probably took me over a years worth of an hour here or there to get a GUI I liked up and running.  And even now I'm just starting to create my very own widgets rather than use predefined ones.  

Maybe its something to tackle later when your RV days are done.  A very smart home you may yet program too. 😎     


ReplyQuote
Ron
 Ron
(@zander)
Noble Member
Joined: 1 year ago
Posts: 1824
Topic starter  

@byron I am afraid I have more projects than time so I need to be selective. My interests will shift more to nature related like game cams, maybe a submersible camera, things like that.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
frogandtoad
(@frogandtoad)
Noble Member
Joined: 3 years ago
Posts: 1133
 

@zander

Posted by: @zander

What I am still missing is a way to know if Alexa requested ON or OFF.

Hi Ron,

I did see in one or more videos, that if active or "loop" true, then basically, it must have been invoked by the linked process(Alexa, switch, etc...), thus you can keep track of it.

I also read that one event from a thing can be linked to another thing... perhaps that is something worth looking into?


ReplyQuote
Ron
 Ron
(@zander)
Noble Member
Joined: 1 year ago
Posts: 1824
Topic starter  

@frogandtoad I don't understand what you are saying, can you try again?

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote