Alexa group/endpoint

Hi all,
I’m really struggling to get my head around alexa groups and end points etc.
I have a custom built controller that manages a coolroom for me. It supplies temperature and humidity information to Openhab and using rules, OH can turn the cooler off an on as required.
I also want to be able to say "
Alexa, what is the coolroom temperature"
and
“Alexa, turn on the coolroom”
I also need it to be labelled nicely in the sitemap (eg - “coolroom temperature” and “coolroom” for the switch.

This is my current items config

 Switch Coolroom                     "Coolroom [%s]" <switch> (gPowerSave,gLogChangesInfo) 

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom"  , alexa="Switchable" , homekit="Switchable"}

Number Coolroom_STA                 "Coolroom State Age [JS(t_mins.js):%s]" <time>

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom_STA" }

String Coolroom_CMD             "Coolroom_CMD" 

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom_CMD" }

     

Number Coolroom_POW_V               "Coolroom Volts [%dv]" <energy>

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom_POW_V" }

Number Coolroom_POW_W "Coolroom Power [%dW]" <energy> (gMapDBpersist,gSQLpersist_everyChange, gSQLpersist_everyHour)

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom_POW_W" }

Number Coolroom_POW_TD          "Coolroom Power Today [%dWh]" <sun_clouds>

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom_POW_TD" }

Number Coolroom_POW_TN          "Coolroom Power Night [%dWh]" <moon>

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom_POW_TN" }

Number Coolroom_POW_YD          "Coolroom Power Yester-Day [%dWh]" <sun_clouds>

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom_POW_YD" }

Number Coolroom_POW_YN          "Coolroom Power Yester-Night [%dWh]" <moon>

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom_POW_YN" }

String Coolroom_STATE               "Coolroom MQTT State [%s]" <switch> (gMapDBpersist,gDeviceOffline,gMQTT_Monitor)

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom_STATE" }

//========================================================================================================================= 

//Coolroom Sensor

Number Coolroom_Temp "Coolroom Temp[%.1f°C ]" <temperature> (gSQLpersist_everyChange) 

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Sensor:Coolroom_Temp",alexa="TemperatureSensor.temperature"}

Number Coolroom_Humid "Coolroom Humidity [%.0f%%RH]" <water> (gSQLpersist_everyChange) 

        { channel="mqtt:topic:pi1_mqtt:Coolroom_Sensor:Coolroom_Humid",homekit = "HumiditySensor.RelativeHumidity", alexa="CurrentHumidity" } 

The issue I’m having is that Alexa sees the coolroom temperature item and the switch as the same thing and complains about duplicate items. I understand that this is because the description is the same - but I don’t understand how to resolve this and still have it look ok in the interface and work ok using voice commands.
Thanks in advance for any help.

You just need to create a functional group as thermostat endpoint and add Coolroom, Coolroom_Temp, Coolroom_Humid items to it.

Group gCoolroom "Coolroom" {alexa="Endpoint.Thermostat"}

If you care about the Alexa app thermostat integration, you might want to use a ThermostatController.thermostatMode capability instead. Unfortunately, this will prevent you from requesting Alexa, turn on the coolroom

Items

Switch Coolroom "Coolroom [%s]" <switch> (gCoolroom, gPowerSave,gLogChangesInfo) {channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom", alexa="ThermostatController.thermostatMode" [OFF="OFF", COOL="ON"], homekit="Switchable"}

Utterances
Alexa, set Coolroom thermostat to cooling
Alexa, set Coolroom thermostat to off
Alexa, turn on the cooling (only if you have one thermostat device modeled in Alexa)

Thanks @jeshab. The cool room does not have a thermostat that is accessible to OpenHab (it is set inside the coolroom), but I can turn it on and off from Openhab, but would like to turn it on/off using Alexa. I also want to be able to ask Alexa what the temperature is.

So then you just have to create the functional group, add the items I mentioned above, and you should be all set. The “Thermostat” endpoint is just how it will be displayed on the Alexa side. This way all three items will roll up into one device. Keep in mind that you must delete your previously discovered items in your Alexa account.

You will be able to interact with your coolroom device as follow:

Alexa, turn on the coolroom
Alexa, what’s the temperature in coolroom
Alexa, what’s the humidity in coolroom

Thanks @jeshab - I have tried that. I deleted the old items from Alexa, but now now running discovery does not find any new items (I added some simple test items, and Alexa does not find those either.)
I have…
Removed the cloud service and re-added
Checked that the UUID and secret are correct (the log shows a message that “Connected to the openHAB Cloud service” - any ideas?

Not sure. Check for other errors in your server logs. Remove all Alexa item configuration you may have and stagger changes starting with simple test item as you did. You can also disable and re-enable the skill on the Alexa side.

The problem seems to be the alexa tag on the group item…

Group gCoolroom "Coolroom" {alexa="Endpoint.Thermostat"}


Switch Coolroom "Coolroom [%s]" <switch> (gCoolroom, gPowerSave,gLogChangesInfo) 
		{channel="mqtt:topic:pi1_mqtt:Coolroom_Power:Coolroom", alexa="ThermostatController.thermostatMode" [OFF="OFF", COOL="ON"], homekit="Switchable"}

if I remove all items from the Alexa interface, then discover with that tag enabled, discovery fails. If I remove that alexa tag, I get all my items back when I discover.

Sorry, just to clarify that last comment. When the alexa tag is on the group item, discover fails to find any other items in that group.

Not sure what to tell you. The item definition I provided should work. Have you included the other coolroom sensor items I mentioned?

Not sure what to tell you. The item definition I provided should work. Have you included the other coolroom sensor items I mentioned?

Yes, I did as suggested - removed all other items files, deleted all items from Alexa and then did a discover.
I will do some more testing and see what I can find out.
Interestingly, I have a Tasmota fan controller (with endpoint meta tags) that used to work just fine, but has suddenly stopped working . I wonder if this is a change at the Amazon end?

No change on the Amazon end that I am aware of. If it would be the case, I would expect a lot more users having the same issue. Maybe try to clear your cache as some other users have recommended. You can also try to disable and re-enable the skill if you haven’t done so.

So by a process of elimination I have discovered that the RangeController tag has an issue with …

		alexa="RangeController.rangeValue" [supportedRange="0:3:1",presets="0=@Value.Off,1=@Value.Minimum:@Value.Low:Lowest,2=@Value.Medium:Middle,3=@Value.Maximum:@Value.High:Highest",friendlyNames="@Setting.FanSpeed,Speed"]}

but is ok with

		alexa="RangeController.rangeValue" [supportedRange="0:3:1",presets="1=@Value.Minimum:@Value.Low:Lowest,2=@Value.Medium:Middle,3=@Value.Maximum:@Value.High:Highest",friendlyNames="@Setting.FanSpeed,Speed"]}

The first example (with the off pre-set) was working until a few days ago.

Value.Off is not a valid asset id. This means that the skill will discard that value which will cause your 0 preset to have no associated friendly names and ultimately break the discovery process.

You should simply use a text label for that preset instead (presets="0=Off,...") and make sure your regional settings are set properly.

Many thanks for your help. I’m still getting my head around this - but this certainly has helped.