Google Assistant ignores FanSpeed, Toggles traits on Thermostat - actions-on-google

I have a thermostat, which has capabilities of
Setting temperature. Works through Home app.
Setting thermostat mode. Works through Home app.
Setting fan speed. Does not work. Google Assistant ignores setting the fan speed and just shows results from regular Google search
Setting horizontal swing toggle. Google Assistant ignores it, same as above.
According to https://developers.google.com/actions/smarthome/tools/validator/ my Sync response should be correct. Below is an example of my sync response.
{"requestId":"ff36a3cc-ec34-11e6-b1a0-64510650abcf","payload":{"agentUserId":"1","devices":[{"id":"1","type":"action.devices.types.THERMOSTAT","traits":["action.devices.traits.TemperatureSetting","action.devices.traits.FanSpeed","action.devices.traits.Toggles","action.devices.traits.OnOff"],"name":{"defaultNames":["Controller"],"name":"Controller","nicknames":["Controller"]},"roomHint":"livingRoom","deviceInfo":{"manufacturer":"Airpatrol","model":"Wifi","hwVersion":"1","swVersion":"1"},"attributes":{"availableThermostatModes":"off,heat,cool,on,dry,auto,eco","thermostatTemperatureUnit":"C","commandOnlyTemperatureSetting":false,"availableFanSpeeds":{"speeds":[{"speed_name":"auto","speed_values":[{"speed_synonym":["auto"],"lang":"en"}]},{"speed_name":"min","speed_values":[{"speed_synonym":["min"],"lang":"en"}]},{"speed_name":"norm","speed_values":[{"speed_synonym":["norm"],"lang":"en"}]},{"speed_name":"max","speed_values":[{"speed_synonym":["max"],"lang":"en"}]}],"ordered":true},"availableToggles":[{"name":"swingHorizontal","name_values":[{"name_synonym":["horizontal-swing"],"lang":"en"}]}],"reversible":true},"willReportState":true},{"id":"432423","type":"action.devices.types.THERMOSTAT","traits":["action.devices.traits.TemperatureSetting","action.devices.traits.FanSpeed","action.devices.traits.Toggles","action.devices.traits.OnOff"],"name":{"defaultNames":["Another controller"],"name":"Another controller","nicknames":["Another controller"]},"roomHint":"livingRoom","deviceInfo":{"manufacturer":"Secret","model":"Secret","hwVersion":"1","swVersion":"1"},"attributes":{"availableThermostatModes":"off,heat,cool,on,dry,auto,eco","thermostatTemperatureUnit":"C","commandOnlyTemperatureSetting":false,"availableFanSpeeds":{"speeds":[{"speed_name":"auto","speed_values":[{"speed_synonym":["auto"],"lang":"en"}]},{"speed_name":"min","speed_values":[{"speed_synonym":["min"],"lang":"en"}]},{"speed_name":"norm","speed_values":[{"speed_synonym":["norm"],"lang":"en"}]},{"speed_name":"max","speed_values":[{"speed_synonym":["max"],"lang":"en"}]}],"ordered":true},"availableToggles":[{"name":"swingHorizontal","name_values":[{"name_synonym":["horizontal-swing"],"lang":"en"}]}],"reversible":true},"willReportState":true}]}}
Why is it not working and what can I do about it? I also tried using AC_UNIT, but FanSpeed and Toggles still do not seem to have any effect.

Related

Enable location detection in TestRigor

could you please explain how I can enable location detection in the TestRigor browser? For user it looks like browser pop-up, but rigor skip this pop-up and I receive only errors which caused by unavailable location (important for my project). I mean this pop-up
testRigor automatically accepts location popups and other browser-based permission requests. There is no need to add an action in your custom steps to handle them.
Update: testRigor has updated this to allow you to click on these browser pop-ups. You can click these by using OCR only if you have screenshots enabled at the OS level.
To do this, you can check it in Settings->Advanced, then scroll down to Desktop Web Fine Tuning and select Use OS (more features) from the How to take screenshots: dropdown.
Once that is done, you can use a command to click on the browser pop-up. For the one in the picture, you can say the following:
click "Allow" using OCR only using the mouse

Deep links not working on speaker and smart display

When testing our AoG, we noticed that deep links currently no longer work properly on speakers (e.g. Google Home) and smart displays (e.g. Google Nest Hub). This behavior has been occurring for several days. Before that, everything was functioning normally. In contrast, deep links in the Google Assistant App still work normally.
Deep links like "OK Google, ask ActionName for abc" won't trigger the AoG but return the error message "The agent returned an empty TTS". Deep links like "OK Google, start ActionName and do abc" are working fine.
We tested this behavior in the Actions Console and on real devices like Google Home and Google Nest Hub.
Is there any way to fix this?
There may have been a bug at the time of posting the question. The bug has since been resolved and I'm unable to reproduce this error today.

Where are google home cards displayed if not using smartphone?

On amazon alexa, cards are displayed in the amazon alexa app or on the screen of an echo show ?). If I call my google actions on my smartphone, I am also able to view the cards. But what happens if I use a different non-screen surface, like the google home? Do the cards appear in the google home app anywhere or do they just get lost?
Cards (and other visual elements you can add) aren't shown if the surface you're currently interacting with doesn't support them. This is intentional since the user may not expect them there and might open the app later and be surprised.
You can always check what surfaces are being supported in your current conversation by using app.getAvailableSurfaces() or the equivalent JSON properties. If you need to show the user something, you can prompt them to change to a surface that supports display by using app.askForNewSurface(). See the documentation about Surface Capabilities for detailed information.
In general, it is a good design to expect the user to only interact with their voice and to require visual information only minimally. Visual information should be used to supplement and enhance the voice as much as possible.

Intraweb for iphone, how to keep the webbrowser hidden

I've just written my first app in intraweb (control pack for the iphone)
It works, but after several hours I still cannot get the iphone to not show safari.
I've added a link to my homescreen and I start the (web)app from there and things start out ok.
But when I change a page safari shows up and breaks the look I'm an iphone appĀ® magic and eats up 25% of my screen.
The intraweb documentation says this is due to the fact that the webadres changes (parameters in the url), so I switched to hidden fields, but to no avail.
How do I make sure my iphone webapp stays full screen and never goes to safari?
It works for me, and I suggest you ask in the TMS Software newsgroups, with steps to reproduce this behaviour, so they can look into it (which will give you a better chance of solving the issue that asking here, to be honest)...

iPhone - Disable UIWebView from prompting to enable location services

During the development of my iPhone app, I decided to integrate Google Maps by including a UIWebView with a URL I construct pointing to maps.google.com. The problem is that the website tries to get the user's location, displaying the "This app wants to use your location". This creates a number of issues for me, which I can explain if necessary.
Is there any way to disable the UIWebView / Mobile Safari from asking for the user's location. The only workaround I can think of is to use Google's Javascript v3 API to make my own map, but I would have to get a license and I'm not 100% certain I would be able to disable asking for location (although I think I can).
Does anyone have an alternate workaround or way of tackling this issue? Thanks!
I believe I found a suitable workaround for now. I remembered that you can embed maps from Google in your website using an iframe. I checked the url they construct to do this and noticed they appended an extra parameter, "output=embed". I appended the "output" variable in the url and pasted this into Mobile Safari on the simulator and it no longer asks me for my location.
The only drawback of this is that I can see so far is that there are some extra UI components on the page as it includes both the mobile controls and website embed controls on the page. Also, I have not tested this on an actual device yet.
Edit: Testing on the device showed that the embed controls don't work, but the mobile controls work as does every other aspect of the map.
Use an MKMapView instead.
(I'm assuming there's a reason you're not using MKMapView for this task and you're stuck with the UIWebView)
You might try asking for user location earlier in your application via CLLocationManager, i.e. right after launch. The permission alert will not be shown more than once. (whether the user chooses to allow or not, which you do not seem to care about)
Not entirely sure that this will work in your case though, UIWebView may still prompt for permission to share location data with the websites it shows.
Assuming it's done via JavaScript, you could try injecting some javascript in - (void)webViewDidStartLoad:(UIWebView *)webView using -[UIWebView stringByEvaluatingJavaScriptFromString:] (e.g. you could set the location-requesting function to null). I'm not entirely sure how well that works while the page is still loading, though...