-
Notifications
You must be signed in to change notification settings - Fork 166
Can't control device from Alexa app, can only edit. #10
Comments
Thanks :) Sorry for the late response. Is it available for other smart-home device skills? I am also working on an Android app. I will update this issue again when I have something. |
HI @kakopappa ; regards - MacSass |
@MacSass Thanks for checking. At the moment, Sinric server sends the on/off result back to the Alexa server after forwarding the request to ESP. Have you tried any other smart-home skills which does this? |
All the other smart home skills give the ability to switch on and off. All the other skills seem to request the status of the device when you click on the device. |
@kakopappa: |
I will take a look at it on this weekend. @MacSass I have already implemented Alexa.PowerController for the light switches and it should work. I think I have to update the website to show which capabilities it can support when you select a device type. Please check and let me know. |
Hi @kakopappa , I would have expected something like this (this is a Ikea lamp). It offeres on/off, brightness and color temperature to be changed: If I can be of any help getting that resolved - let me know (and sorry for the german screenshots). Regards - MacSass |
@kakopappa Hi! to be able to control the device from the app, I think you should somehow need to populate the type (typ in german) field that you see in the first of the above photographs! When I was using the espalexa code then regarding what I set there it resulted in a different icon and different options. If I did not set the type, then it showed a kind of wifi icon and I couldn't control the device from alexa app as in the last photo. The commands I used that resulted in different icon and options were part of the phillips hue protocoll but may help you: // return "{"type":"Dimmable light","swversion":"66011639","name":""+ friendlyName[deviceId-1] +"","uniqueid":""+ WiFi.macAddress() +"-"+ (deviceId+1) +"","modelid":"LWB014","state":{"on":"+ boolString(yourVal[deviceId-1]) +","bri":"+ briForHue(yourVal[deviceId-1]) +","alert":"none","reachable":true}}"; // return "{"type":"On/off light","swversion":"66011639","name":""+ friendlyName[deviceId-1] +"","uniqueid":""+ WiFi.macAddress() +"-"+ (deviceId+1) +"","modelid":"LWB014","state":{"on":"+ boolString(yourVal[deviceId-1]) +","alert":"none","reachable":true}}";` So the type was one of: also the above types were case sensitive! |
@emnik; I experienced that change of color and color temerature is already working from Alexa (but not the app), while change of brightness I could not get to work from Alexa (and not the app of course). Good progress - once the small quirks have been ironed out I think we will have a very universal skill available to combine ESP with Alexa. Regards- MacSass |
I have updated the site with ReportStatus. This will report the current setting of the device when Alexa requests it via ReportStatus https://developer.amazon.com/docs/device-apis/alexa-interface.html#reportstate When you send on/off requests ect.., sinric will remember this status in a local database and send it to Alexa when it asks Do not forget to set the status first before checking. Can you guys check now ? |
Yeap, works here! I can now control me devices through the app. The icons are the right ones now and also the correct type is shown. |
Works for me as well. Great job!! |
Hi, On thing remaining for the icing on the cake:
Actually having sinric query the ESP for the current status might make sense for the light/switch as well, as it might happen, that the status is changed outside of sinric and then sinric would report a "wrong" status. Anyway - this is getting the most useful skill for us - great job! Regards - MacSass |
@MacSass Thanks for your input.
I do not want people to flood the server with updates. This will delay responding to other requests. As you know Arduino's loop function can send tons of update requests to server if coded incorrectly. I thinking how to solve this problem. Let me know what you guys think how to solve this. Thanks |
Hi @kakopappa, So, I´m wondering if Sinric would be able to "query" the ESP for the current value when requested by Alexa. That way Sinric.com would initiate the response, not the ESP. I have implemented this right now for my own skill (not a smarthome skill), querying a PHP skript on my webpage for a temperature value ... Also it would make sense to implement that "query" functionality to more than just thermostats, as you always need to figure in that some things get switched/changed outside of the sinric/Alexa environament. If you want to discuss by mail, feel free to get in touch with me. Regards - MacSass |
can someone please help me get this working? any help will be appreciated. |
Hi BoriKing, Take a look at the switch.ino example. void turnOn(String deviceId) {
if (deviceId == "5axxxxxxxxxxxxxxxxxxx") // Device ID of first device
{
Serial.print("Turn on device id: ");
Serial.println(deviceId);
}
else if (deviceId == "5axxxxxxxxxxxxxxxxxxx") // Device ID of second device
{
Serial.print("Turn on device id: ");
Serial.println(deviceId);
} Then those functions are called when you ask Alexa to turn on/off your device. I´m afraid you will not make a lot of use from this without at least some coding ... Hope that helps - MacSass |
Thanks @MacSass, |
@BoriKing normally it detects fine. do you have other devices with the same name? Goto alexa, forget all existing once and try again discovering |
@kakopappa |
@BoriKing Did you remove the other device? In the database, i can see only 1 device created using your account ? |
@kakopappa |
ok i was able to figure it out. the problem was that when you register to sinric.com the email address and password are case sensitive. example: Jhon30@xxxx.com in other words i wasn't using the right account. thx for trying to help |
@BoriKing Thanks for letting me know. I have fixed this issue now. |
So far I love the ease of use of this code!!!
There seems to be a problem with controlling the device in the Alexa app (Android). After discovering the device, when you click on the Icon it takes you to the Device Settings screen. There doesn't appear to be anyway to turn on/off the device from the Smart Home section. It happens for both the Light and Switch type devices. Works fine using voice activation.
The text was updated successfully, but these errors were encountered: