How to control speaker volume with Google Home? - actions-on-google

I've looked up device traits in manual https://developers.google.com/actions/smarthome/traits/ but I don't see any way to control speaker type devices (volume up/down/mute). But I see that it can control its own speaker volume, chromecast, and maybe some other smart speakers. Am I missing something or is it a functionality for some special cases and is not publicly available?

There is no trait for Volume at the moment for developers to use. Even if there were, the traits would only be usable on third party devices like for smart home devices (like a smart TV).
The behavior in a Google Home is a handler specific to the client device.

Related

Is it possible to create a Home control Actions to control Non-Android TV?

Is it possible to create a Home control Actions to control Non-Android TV?
Just like Amazon Smart Home Skills for Entertainment Devices to turn on/off TV, change channel, switch input source, change volume, control playback...
I did not found these types associated with TV in smart home device types.
This is described in the document:
The functionality for device types comes from the traits that you add to each one. Each device type has a number of recommended traits, but you can add whichever ones you want.
How do I add it?
If you watched the smart home talk at I/O, you will see that supporting media devices and traits are currently in development. Although they are not ready for every developer yet, you will see the content show up in the documentation when it is available.
In the short-term, you can assign a different device type for your TV, like LIGHT. The types are used primarily for semantics, like "turn off my lights". You may be able to use some of the traits as they currently exist. For example, a handful of modes are designed for media-type devices.

Can an app in Google TV Honeycomb access remote functions, such as turning on the Television

I've got an idea for a tool I would like to make for Google TV once honeycomb + market lands on it, but it would function worlds better if I could also turn on the TV rather than having to make the user do it themselves
My idea is simple: Schedule your favourite shows, tv turns on, activates the STB then tunes to the proper channel when the show starts.
For reference I would be devving this on a Revue, which I know has the IR blaster and such needed to send the remote signals.
Yes, you can do that and more using the Anymote Protocol. For sample code, take a look at the source of the Google TV Remote app: http://code.google.com/p/google-tv-remote/
If you can control the IR device, then turning on the TV should be a snap. Additionally, some newer TVs have an HDMI functionality that lets you turn it on using it; however, not all TVs support this. All TVs do support infrared, though.
You'd want to look for "System Standby" here:
http://en.wikipedia.org/wiki/Hdmi#CEC
The TV would have to technically be in its "sleep" mode for the device to turn it on, similar to how PC monitors work.

iPhone bluetooth

Is it possible to identify devices around me that have their bluetouth enabled?
I don't need to communicate with them, just know they are there.
I am looking for something similar to android's BluetouthDevice.startDiscovery()
Is something like this possible?
Apple turns out to be very restrictive about Bluetooth communications for iOS platform.
Focusing about a native application with Xcode (but not PhoneGap based - PhoneGap is a Xcode plugin that allows web apps to be converted into native ones; btw it gives a quite nice but limited access to underlying hardware resources) for a iOS device to communicate with bluetooth devices (even with discovery actions) the following conditions have to be met:
-) The device you're trying to discover must be equipped with Apple Bluetooth authentication chip (you can ask to Apple directly for the MFi program);
-) Internally your app must declare a protocol name (e.g.: net.yourcompany.proto0) which the devices you connect with must conform to;
-) You must use Apple's External Accessory Framework to establish communication with such devices.
In short, by this procedure Apple guarantees that the only Bluetooth communications an iOS device can establish are just with authorized and certified Bluetooth devices.
I've gone 400 Mph about this thing but I hope it can give you some pointer to start your search.
The topic is too wide to be treated here in its full length.
One thing you might want to look into is Bonjour and NSNetServiceBrowser.
You can publish a service and also search for other services around you. There are ways to run Bonjour in the background (http://stackoverflow.com/questions/6345554/bonjour-in-the-background).
The only limitation with this approach is that everyone else would also need to be running the app as well. Also, by default Bonjour discovers over both WiFi and Bluetooth, something else you would probably need to look into.

iOS app with hardware integration

I want to develop an iOS app that uses an external hardware plug-in, kind of like Square https://squareup.com. However I was unable to find any references in Apple's documentation. Can someone point me to the right direction?
If you want to use the iPod connector to connect to your hardware, the only option is the External Accessory framework. Be advised that you must be a registered accessory developer (more expensive than the standard developer license).
I believe Square uses the audio input (others may correct me), an ingenious hack that doesn't require use of the iPod connector. If your hardware can operate over (analog) audio in/out, that might be an option to consider.
This book might help you: Building iPhone OS Accessories: Use the iPhone Accessories API to Control and Monitor Devices
In order to develop hardware accessories, you must be a member of Apple's MFi program. Despite what the user above stated, it doesn't cost anything. But it does require a lot more work than becoming an app developer.
Accessories don't necessarily need to go through the MFi process if they are NOT over 30pin connector OR bluetooth (ie, the Square connecter goes through the headphone port, or any WiFi accessories).

What's needed to use the Apple Accessory Protocol?

I'm in the process of planning out a personal project that will be a media player and one of the things I would like to do is be able to dock my iPod touch (or any iPod or iPhone) and control it and play music off it like the speaker docs do that you can buy.
I found some information while searching around online for this but my question is can I make up a cable and use the serial protocol from any device or does Apple have this locked down so only certified/approved devices can communicate this way?
If you are looking to do this for yourself, I would recommend jailbreaking and the following resources on the web. These describe some methods of the Apple Accessory Protocol, and include some parts (at sparkfun) to execute. To get approved for the Apple method you need a corporation (or similar structure) and even legal counsel before you can get approved to even see the agreement you have to agree to in order to join.
http://nuxx.net/wiki/Apple_Accessory_Protocol
http://www.sparkfun.com/categories/101
There are even some great articles out there such as:
http://courses.cit.cornell.edu/ee476/FinalProjects/s2007/awr8_asl45/awr8_asl45/index.html
Good luck!
EDIT:
Since this is a relatively popular post, keep in mind that you can now use Bluetooth 4.0 LE for serial communication without approval from Apple (other than AppStore approval).
https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html
Only devices in the Made for iPod program which use Apple's proprietary authentication chip can communicate with the External Accessory framework on the iPhone or iPod touch. Such devices must also expose a protocol that iPhone applications can use.
It is a reasonably involved process to be approved as a Made for iPod vendor of products (similar to the App Store approval process, but for hardware), but it has become a lot easier than it used to be. With iPhone OS 3.0, Apple has opened up the program to many more third parties than just the usual large accessory providers.
In your case, I'd actually wait and use another vendor's iPhone-controllable stereo. Manufacturers are just starting to come out with hardware controllable via iPhone applications, so it's only a matter of time before one of the larger accessory providers creates something like what you want. If they expose a protocol for controlling the device, all you'll have to do is write your application to control the device via that protocol.