How to talk to a different echo device from within an alexa skill? - alexa

The alexa skill gets launched from echo device Kitchen and shall do a dialogue using echo device Bedroom as example.
Is it possible at all?
How to do it in node.js or python?
This should be done by a skill not by a routine because the actual target device is retrieved via a REST api.
This seems like a common task. Surprisingly I was not able to even figure out, if it is possible at all. Maybe it is too common.

I don't believe it's possible to achieve the CX you described with Alexa Skill Kits today.
As an end-user, you can use the announcement feature to broadcast a message to all of your supported Alexa devices, e.g. "Alexa, announce dinner is ready". You can exclude certain devices by turning on "Do Not Disturb" mode, or disabling the announcement feature in their device setting.
If you're an enterprise customer (e.g. business, healthcare, hospitality...etc.), you can use the Alexa Smart Properties API to send an announcement to a specific device you manage.
For ASK, the closest thing is the Notification API. But the CX is a bit different, like the user needs to say "Alexa, read my notifications", and you can't target a specific echo device.
I'm curious about your use case. As a skill developer, why do you want to send a dialogue to a different echo device?

Related

How automatically set an APN depending on network provider?

When a new SIM (never used) is inserted in a new smartphone (never used), smartphone seems to set a right APN without any manual settings.
Is there a global table (inside smartphone) with associations APN <-> network operator?
Note: Querying new SIM cards with AT commands seems they have preferred network operators, but no APN saved in memory.
I can comment on the SIM side and confirm that APN settings are not held within the SIM. And yes in terms of network operators there is a file called EF_PLMN which holds the Mobile Country Code (MCC) and Mobile Network Code (MNC) to allow a device to connect to the correct network faster.
On the point of APN, it is my understanding that devices have internal (memory) APN listings for major operators in that territory. When an operator orders a device they ensure that "their" APN is correct. Yes a big issue is incorrect APNs for operators within the device and that is the reason network operators need to send APN settings when they detect a SIM in a new Device.
I do not have information on how to query this internal APN listing as it may be part of the Firmware.
Having been through the approval's procedure for a big USA mobile network operator (MNO), part of the approval's process involved automatically selecting the correct default APN when the modem connects to the network. This can be overridden for special cases, for example if the user needs to use an MNO supplied VPN which requires a special APN.
While I do not know if this is the same for every case, all phones go through an approval process, and if it is a phone approved by the MNO then it is quite likely the MNO will insist that at least a default APN is loaded if none has been supplied by the user. The network that the SIM allows the phone to connect to can be read from the modem without an APN being supplied, so it is quite easy to use this to look up a default APN from list. As phone companies really do not want to change their software for each MNO, maintaining a list makes it easier for the phone manufacturer, the MNO and the end user.
For Android, the mobile devices pull the The MCC (Mobile Country One) and the MNC (Mobile Network code) from the SIM card, and maybe other values.
Then, it configures the APN based on an internal SQlite database created by Android based on XML files that contain APN settings in the following format:
<apn carrier="CarrierXYZ"
mcc="123"
mnc="123"
apn="carrierxyz"
type="default,supl,mms,ims,cbs"
mmsc="http://mms.carrierxyz.com"
mmsproxy="0.0.0.0"
mmsport="80"
bearer_bitmask="4|5|6|7|8|12"
/>
https://android.googlesource.com/device/sample/+/master/etc/apns-full-conf.xml
https://source.android.com/devices/tech/config/update

Alexa Skill Set to send Custom Directives to my alexa enabled device

Is it possible to create a alexa skill which sends back custom directives created by me back to my alexa enabled devices, so that I can parse them in responses and take action.
Thanks
In your example, Alexa start service1, service1 becomes the invocation (e.g. skill) name. This is fixed as one per skill. So, you can what you've explicitly requested. Some additional info that may be helpful:
As for other content after the invocation, it isn't clear there is a mode to get the Echo to recognize anything. I've heard some suggest providing very large intent sample lists or long slot dictionaries and it convinces the system to provide a more open recognition, but I've never seen that behavior myself.
If you list of items can be constrained, you can create multiple skills. For a personal, aka developer setup, this works well. I have multiple echos on the same account. I have two defined skills that route to the same ASK service layer on my PI. The launch URL routes the request into two different paths that are parsed on my NodeJS logic setting up different defaults in my code.
This allows my wife's version of the skill to work differently than mine. We just use different invocation names without having to have separate accounts and implementing oAuth.
Sorry this is old but I just spotted it while searching something else. In case you have not solved it, the answer is yes. I use my Rpi with Alexa this way. If you are publishing a skill you need to use proper security measures that include account linking, Oauth2 etc. and there are limits on the types of commands you can accept without a user PIN. However, if you are willing to assume the risk on a skill for your own use in developer mode, you can put http calls, with or without basic authentication, directly into your skill code as though it were any other public ip address. As long as your pi is addressable from outside via http, you can command it. I use my pi with a web server to control a media center. I was sending Alexa commands to that via smart things, but now also have developed a custom skill to go straight fro Alexa tot he Pi and to link commands together. I can say "Alexa, start listening..." and then send multiple menu commands via voice that are recognized by the Pi and executed (e.g. menu, guide, page down, channel name, select, etc...) until I exit or it times out due to no input. I don't have to repeat "Alexa" or "turn on/off" as though each command were a device as is the case when going through smart things. I would only recommend this if your htpc and pi have no secure data and are firewalled from the rest of your network.

SIM Toolkit Permissions

I'm doing a research on STK, the thing that is missing is do I need user's permissions to send and receive data to the operator?
What I know so far is that this tool is preinstalled in operating system, so isn't already have full permissions to send and receive in the background?
Thanks in advance for the help :)
A lot of SIM cards support STK and yes it can be used to send/receive information.
Permission for a SIM to send an SMS is normally device dependent, I remember the older Nokia phones had a setting that would prompt the user "allow SIM to send message". In my experience most newer devices (both Android and IOS) are setup such that the SIM can send SMSs in the background without user awareness.

Connect via bluetooth to an android device without a custom application

I would like to use an arduino with a bluetooth module to modify the volume and skip songs on my phone.
All the information I found was about how to code an application that would communicate with a device via bluetooth, which isn't what I am looking for. I want to know what protocol I should follow to connect to an android device via bluetooth like a car radio would do.
My goal is to be able to use my device as a remote to control the built-in music application.
I think you are looking for the AVRCP protocol. Please send more info about your hardware so I can digg a better answer (if you need more, anyways...).

Programming techniques/libraries for locating a user with a mobile device within a building [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am looking to develop an application usable on the devices of visitors so that I can tell where they are. The initial idea I had, already done in some museums, is to have a number on specific locations within the museum, they call a phone number, enter that number, and get enhanced content, perhaps audio narration about that space. This is nicely device agnostic, though some WiFi only devices may not have a mechanism to call a phone number, but perhaps having folks on WiFi load a mobile website and choose their location (assuming the number of spots is not too many) from a list, and then click a button.
I'm new to this, and have been brainstorming on this, but I really don't know what I don't know. So here are my questions:
Can I use GPS indoors and get accurate information or will that basically not work in most buildings?
If I use a service like Skyhook Wireless, and use multiple WiFi routers, will I be able to locate the WiFi connected users accurately?
Can I use Bluetooth somehow? Setup for Bluetooth seems like a hassle, but maybe there's a Bluetooth mode that is simpler to use for an application like this?
For devices with a camera, what can I do with an image here. Photo of a QR Code? Are QR code reading libraries built into devices I can use, or would I need to find a library?
Are there are other techniques I might be able to use, maybe counting footsteps with the accelerometer somehow? Or using magnets somehow for devices with a compass?
Suggestions welcome, assume I'm trying to target as many smartphones as practical (Android, iOS, Blackberry, webOS, Windows Phone 7) that are popular in North America. If there is a way to also include devices that are not considered smartphones, that would be great too.
UPDATE
Why indoor navigation is so hard: Your phone can get you to the museum, but it can't guide you to the T-Rex by Nick Farina
UPDATE 2
Brooklyn Museum experiment with QR Codes: too soon to
tell/negative
Very few people can successfully scan and use a QR code
UPDATE 3
Think GPS is cool? IPS will blow your mind
QR codes are your best bet. They're cheap and, for example, in a museum you could put one next to every painting. For devices without a camera, you could choose to print a location-code next to the QR that they could enter manually in an app. Here's another solution as well:
Set up a wifi repeater/booster in each location you want to determine (ex: in a museum, each room) and record the SSID for each router. As the user walks from each room to the next, their device will automatically switch to the repeater with the highest quality signal (the one in that room). Simply have your application test for which SSID the user is connected to.
GPS is not accurate enough and may not work inside buildings and Skyhook wireless is only for one address. Having users call a number and/or go to a website to manually select a location is too many steps for the user, and the user may not have reception to place a call. Bluetooth is a huge hassle.
Can I use GPS indoors and get accurate
information or will that basically not
work in most buildings?
no, GPS needs a clear view of the sky. regardless, the accuracy of GPS is around +/- 50 feet and can be worse.
If I use a service like Skyhook
Wireless, and use multiple WiFi
routers, will I be able to locate the
WiFi connected users accurately?
aGPS is less accurate than GPS.
Can I use Bluetooth somehow?
bluetooth is not location aware.
android 2.3 introduces something called near-field communications. this would theoretically allow the person to wave their phone over a receiver and transmit information. it's quite new and i think the nexus s is the only device with hardware support for this. at best you are looking at some early adopter pain for that one.
Photo of a QR Code? Are QR code
reading libraries built into devices I
can use, or would I need to find a
library?
that's a good idea. QR codes are popular because they are simple. libraries are not part of the SDK but they exist. it would be hard to build one yourself if it came down to that. by the same token, you could just as the user to enter a simple location code. essentially the same thing and might be simpler than aligning the camera for a QR read.
it does depend on your application. if you want this to automatically locate everyone without an user intervention, QR codes / codes won't work because the user has to take some action. even NFC, from what i've read, operates on very short distances so the person would need to wave the phone across something closely not just walk by.
If you're talking indoors, I think you have some great ideas. GPS may be spotty depending on the building, and Wi-Fi triangulation only works if your signal is proportional to the proximity of the user to the unit. Here is my suggestion:
QR Codes sounds like the best option here if you don't mind having them all over the place. If someone can scan a QR code, (which they are on most all platforms, it's just making sure your users have a decoder installed and can actually use it), then you have three things going for you:
You know they have to be in range to scan it...so that's far more accurate than you can get with other location devices.
you can use the QR code to embed a link to a download site or embed the actual information into the QR code if it's not too much.
Most smartphones today have QR code scanner apps built in, and there are libraries (java and .net) that you could use to build your own app.
The downside here of course is that you're assuming the cameras are good enough quality and that someone isn't going to deface your QR code so that subsequent visitors can't read it.
Keep in mind the bump application. They don't use bluetooth or any form of wireless technique to determine if two people are near each other. http://bu.mp/faq
Since you have 1 building that you care about. Why not simply have a root device or network of devices in your building that you care about. This root device would communicate with all the clients to do your bidding.
Maybe cellphones canĀ“t solve your problem, have you considered cameras on each room and a QR code tag on each guest? you might get the images from the security camera since they are infrared. Another way of achieving this is by locating the camera in front of the door so that the guests are always seen by the QR code algorithm.
Cellphones are just too diverse to implement this, have you thought that the guests might not have a cellphone at all?

Resources