Alexa Smart Home Skill V3 is now live!

Long ago (and with V2) I had a similar problem. During discovery there is a CPU jump and if there were other resources being consumed then I would see that error and discovery would fail. That was happening on a Raspi. Maybe you can turn off another resource intense binding during discovery or stop another intense process on your machine?

I tried this link: https://myopenhab.org/rest/items?fields=editable,groupNames,groupType,name,label,metadata,state,stateDescription,tags,type&metadata=alexa,channel,synonyms
It takes ~5 seconds to fully load. So, shouldn’t be a timeout issue.

yes, I’m also running on a raspi (3). I can try to shutdown all unneeded services and try again.
But I’m afraid, that my OH itself is consuming most of the CPU and Memoy.

Thanks for your patience @jeshab I have just made a call to: https://myopenhab.org/rest/items?fields=editable,groupNames,groupType,name,label,metadata,state,stateDescription,tags,type&metadata=alexa,channel,synonyms

The result:


There are about 3-4 image items (from IP Cameras) that would account for the size being returned. But in total 125 items in the items config file.

My OpenHAB instance is running on a VMware instance and the CPU/memory is all fairly normal (2% normally consumed by Java/OpenHAB and jumping to 7% when requesting the link above.

model name      : Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
cpu MHz         : 1895.612

anybody has some advice for rollershutters?

Besides using percentageController to give a command SET the Rollter shutter to XYZ I would like to have it react to the voice command OPEN or CLOSE the Rollershutter and applies 0 or 100
I don’t find a suitable option in the docs to achieve both …

I used to run my OH server on a Raspi as well and noticed a drastic improvement in response time when I moved to a faster CPU. Anyway, you can try what you mentioned above but since you mentioned it takes 5 seconds to get the content, it shouldn’t be the problem.

Would you be able to upload the data output of that call onto your favorite cloud storage provider and send me a link via pm so I can run some test?

I am not familiar with image items. Are you storing the camera raw image in the item state? Also, did you experience the same issue with the v2 discovery?

Can you try and provide me with the response times for the calls below?

So with the new skill can I replace my thermostat “homekit” configuration to the new alexa metadata labels? The homekit workaround so far was working not very impressive.

You can refer to my comment on the issue below.

So, I just disabled all unused services on my Raspi and did a new discovery request on my Amazon Echo.
And: It found my devices again :star_struck:

I didn’t change anything on my configuration (besides disabling not used services on raspbian).
What is strange is, that the error message didn’t appear in the logs, when doing the new discovery request.

So far it looks like everything is working as before.
I will now have a look at the new features and see, what I can use :grinning:

Thanks to @jeshab, @omatzyo and @sihui for helping me.

1 Like

The fix that prevents the “editable” field log error during discovery requests was pushed to the live skill yesterday night (EDT). So that would explain why you don’t see these anymore.

Good to hear :+1:

1 Like

Yeah it is storing the raw image in the item state. I will comment those items out and see how it goes.

  • v2 equivalent – 1.8 MB / 24.11 s
  • v3 no fields filtering - 1.8 MB / 26.06 s
  • v3 exclude state field - 21 KB / 1.35 s

Ok, commenting out the image items have allowed all alexa tagged devices to be discovered and used. I have to say the v3 speed at actioning commands seems way faster than v2.

Without the item items:

  • v3 no fields filtering - 31.8KB / 2.28 s

One of the commented out image items:
//Image BackdoorAxis "Axis Backdoor Camera" {channel="ipcamera:AXIS:69925544:image"}

Finally moved from a US Amazon account and linked skill to the AU Skill / Amazon account. v3 works well, an example on/ off item looks like this for me:
Switch carportlight "Carport Light" {alexa="Lighting", mqtt=">[mymqtt:carport/light:command:OFF:0],>[mymqtt:carport/light:command:ON:1]"}
and a Dimmable item:
Dimmer PorchLights "Porch Lights" {alexa="Lighting", mqtt=">[mymqtt:outside/porchlights:command:*:default]"}

Any ideas on getting a Door control to accept “Alexa, Lock the Shed Door” ? I tried this:
Switch shed_door "Shed Door" {alexa="LockController.lockState", mqtt=">[mymqtt:shed/door:command:LOCKED:0],>[mymqtt:shed/door:command:UNLOCKED:1]"}
but Alexa says Shed door does not support that.

Ive previously approached my ceiling fans as a dimmer - then translate that in Node-red that 1-33% = speed 1 etc. Is there a better way to control a fan now with “Alexa, set the Fan to High” ?

Thanks for confirming that this was related to the image items state. We will try to see what we can do to optimize based on that use-case. Keep in mind, you can uncomment your image items after the successful discovery request although you will have to remember to comment them each time you want to update your Alexa configuration.

Please refer to the capability regional availability matrix. Unfortunately, Amazon didn’t make the lock controller available in AUS as of yet.

Correction

It looks Amazon updated their documentation and the locking capability only is available in your region. I did a quick check of the skill logs and I don’t think you requested a discovery after updating your item which is probably the reason why it wasn’t recognized.

Depending on the native item type supported by the binding controlling your fan, you can use either the mode or range controllers but these are only available in the US currently. I have couple Insteon Fanlinc controllers which I have setup as below. This allows to control the fan speed presets along with turn on and off using a proxy switch and a rule that defaults turning on to the low setting preset.

items

Group:Switch:OR(ON, OFF) gFans "All Fans"
Group:Number:AVG gFansSpeed "Fans Speed"

Group gBedroomFan "Bedroom Fan" {alexa="Endpoint.Other"}
Number BedroomFanSpeed "Bedroom Fan Speed" (gBedroomFan, gFansSpeed) {insteonplm="xx.xx.xx:F00.00.1C#fan", alexa="RangeController.rangeValue" [supportedRange="0:3:1",presets="1=@Value.Low,2=@Value.Medium,3=@Value.High",friendlyNames="@Setting.FanSpeed,Speed"]}
Switch BedroomFanPower "Bedroom Fan Power" (gBedroomFan, gFans) {alexa="PowerController.powerState"}

rules

rule "Ceiling Fans Command"
when
  Member of gFans received command
then
  val String FanName = triggeringItem.name.split("Power").get(0)
  val String SpeedState = if (receivedCommand == ON) "1" else "0"

  sendCommand(FanName + "Speed", SpeedState)
end

rule "Ceiling Fans Speed Updates"
when
  Member of gFansSpeed received update
then
  val String FanName = triggeringItem.name.split("Speed").get(0)
  val String PowerState = if (triggeringItem.state == 0) "OFF" else "ON"

  postUpdate(FanName + "Power", PowerState)
end

Thanks heaps to everyone who worked on this update - it works great for me and the documentation is very good.
Question - I have a number of temperature sensors that I would like Alexa to be able to deal with (ie tell me the temperature on request).
I have added to tags as follows:

Number Livingroom_Temp "Living Room Temperature [%.1f°C]" <temperature> (gMapDBpersist,gSQLpersist_every10Min) { mqtt="<[broker:/broadlink/temperature:state:JS(broadlinkt.js)]",alexa="TemperatureSensor.temperature"}

I can see the living room temperature in the Alexa App - so she does know about it.
When I ask “Alexa, what is the living room temperature?” the response I get is “Living room fan does not support that”. What do I need to add to get the correct response? I have tried creating a living room group and adding the sensor to that group - no joy.

I had a similar issue when setting up my thermostat. You usually don’t want to have the function name in the label. So, you should label your temperature sensor “Living Room” instead. No need for groups. They are usually used to send commands to a set of similar devices.

Thanks heaps - that worked perfectly! :slight_smile:

for me I get the same as you but its an alexa voice syntax issue, try saying
what is the living room thermostat? and then it works.

[EDIT] Just read jeshab comment and I think I need to change the label on something, I will figure that out shortly :slight_smile:

Regards
Paul

I have used the disruption caused by the move to v3 followed almost at the same time as adding a Echo Show 5 to my stable of Echo devices as a good time to redo my current setup.

I have removed my thing file and instead created all the things using PaperUI, I halso added all the AmazonEchoControl channels using PaperUI too, this took along time and meant I had to redo my thermostats too as previously that was also configured using files. So I think most of Alexa stuff is now in Paper UI and not using files. Yay!

Ok so with that background to the current major revamp I have done to my OH system and alexa integration I will continue to ask my questions of this v3 skill.

Some time ago I tried to set up OH and Alexa to understand local room devices so if I say

  • Alexa, turn on the light, she turns on the lights in that room.
  • Alexa, Whats the temperature in here? and she advises the rooms name and the current temp,
  • Alexa, turn up the heat. The target temperature is increased by 1 degree in that room.

lastly I did try to add a Heater, Fan and Dehumidifer to each room and under v2 that of course did not work I have to give them a unique name and cannot refer to them as local device types :frowning:

I see in the documentation that there are now more device types defined, unfortunately Amazon have not included Heater, Fan or Dehumidifer, in fact the only extra one I can currently see some improvement with for me is that there is now a TV device type. (I will need to rename other stuff so that will work as I already have the livingroom TV called TV).

My question is have I interpreted the documentation correct and even with V3 API support I cannot have custom types such as Heater, Fan or Dehumidifier? My objective is simple to say Alexa, turn on heater and she will turn on the heater in that room.

Regards
Paul

Your interpretation is correct. The Alexa room awareness feature (aka Alexa-enabled groups) is derived from the majority of the current display categories. So, until Amazon adds new categories, there is no way to address these devices. You should vote on this improvement that covers your use case.

On a side note, you could use the Amazon Echo Control binding lastVoiceCommand channel and a proxy Alexa-linked activity item to mimic that feature from the OH side for unsupported categories.

Expanding from my previous fan example, here is how I set up room awareness for my fans in OH: (The Alexa activity device is just to allow a successful response back when issuing the voice command; it doesn’t control anything)

items

Group gAlexaVoiceCommand "Alexa Voice Command"
String BedroomEchoDotLastVoiceCommand "Last Voice Command" (gAlexaVoiceCommand) {channel="amazonechocontrol:echo:account:echodot_bedroom:lastVoiceCommand"}

Switch RoomAwarenessActivityFan "Fan" {alexa="Activity", autoupdate="false"}

rules

rule "Alexa Voice Command Updates"
when
  Member of gAlexaVoiceCommand received update
then
  val String Location = triggeringItem.name.split("Echo").get(0)
  val String FanPowerState = transform("REGEX", "turn (on|off) (?:the )?fan", triggeringItem.state.toString)

  if (FanPowerState !== null)
    sendCommand(Location + "FanPower", FanPowerState.toUpperCase)
end
1 Like