Openhab2.5 and ... Alexa-Google-Apple

Which on-line instructions?

@H102
Sorry, I didn’t pretend, mine was a request for help, if possible.
My English probably has many shortcomings.

@Bruce_Osborne

https://www.openhab.org/docs/ecosystem/alexa/

and others 3D on this community.

I configured my items from the Paper UI, not from items files, but I tried this also.

this:

Group  gTermostatoTorretta              "Termostato Torretta" (gFF) [ "Thermostat" ]
Number TermostatoTorrettaCurrentTemp "Termostato Torretta Current Temperature [%.1f °C]" (gTermostatoTorretta) [ "CurrentTemperature" ] {mqtt="<[openhab:/Termostato/switch8/temperature:state:default]"}
Number TermostatoTorrettaTargetTemperature "Termostato Torretta Target Temperature"     (gTermostatoTorretta) [ "TargetTemperature" ] {channel=':set_temperature'}
String TermostatoTorrettaHeatingCoolingMode "Termostato Torretta Heating/Cooling Mode"  (gTermostatoTorretta) [ "homekit:TargetHeatingCoolingMode" ] {channel=':operation_mode'}
Switch LuceCameraTorretta               "Luce Camera Torretta" <light>                  (CameraTorretta)      [ "Lighting" ]


Or this:

Group  Termostato    "Camera Torretta"                        {alexa="Endpoint.Thermostat"}
Number Temperature   "Temperatura [%.0f °C]"   (Termostato)   {alexa="TemperatureSensor.temperature"}
Number CoolSetpoint  "Cool Setpoint [%.0f °C]" (Termostato)   {alexa="ThermostatController.upperSetpoint"}
Number HeatSetpoint  "Heat Setpoint [%.0f °C]" (Termostato)   {alexa="ThermostatController.lowerSetpoint"}
Number Mode          "Mode [%s]"               (Termostato)   {alexa="ThermostatController.thermostatMode"}
Number Umidita       "Umidita [%.0f %]"        (Termostato)   {alexa="ThermostatController.humidity"}

and my conf. in paper UI:

I already thank those who can and want to help me.

Jad

You have to be more specific. Which apps?

For the items you listed, I would recommend sticking to tags if you need all 3 integrations.

As far as Alexa integration, the v3 skill supports v2 tags. If your devices are discovered in your Alexa account but are experiencing some issues interacting with them, make sure to go over the troubleshooting guide.

This apps:

I have a look about the tags, TnX for the moment.

Jad

Only create items using files or by PaperUI. Do not create item’s in both places for the same device.

Start with one device, your light, LuceCameraTorretta and get it working with Alexa. Then move to other items and groups.

For Alexa see this topic and follow the instructions to set up your light.

If you have problems with Alexa and controlling the light post your configuration here and also what error you have in the logs we will help.

TnX H102,
Is what I’m doing, now I can switch on-off the light from Alexa ed google, but IOS system say “Non risponde” I think mean “No answer” in english.
So, now I’m looking for fix this problem and then move to other items.

Stay tuned :wink:

Jad

1 Like

:+1:

I do not use IOS but you may find this link helpful:

Hi,
after lots test, now I can switch the item from all the system (Alexa, Google, IOS Apple, openHab sitemap), but I tried to configure a temperature item and, I can see the value from openhab PaperUI, but not from the sitemap, I can see the value from Alexa, but not from the other system (google or IOS).
Similar for the Humidity, I can see the value from IOS, but not from google and Alexa.
I attach my items file:

Switch Presence_iPhoneFra               "Fra iPhone" <network> { channel="network:device:iPhoneFra:online" }
Switch Termostato "Termostato" (Termostato) [ "Switchable" ]
Number Umidita  "Umidita [%.1f %%]" (Termostato) [ "CurrentHumidity" ]
Number Temperatura "Temperatura [%.1f °C]" (Termostato) [ "CurrentTemperature" ]
//Group  gTermostato "Termostato" (gFF) [ "Thermostat" ]
//Number TermostatoTorrettaTargetTemperature "Temperatura"      (gTermostato)   [ "TargetTemperature" ]
//String TermostatoTorrettaHeatingCoolingMode "Temperatura"     (gTermostato)   [ "homekit:TargetHeatingCoolingMode" ]

and sitemap:

sitemap default label="My first sitemap"
{
    Switch item=Presence_iPhoneFra label="Fra iPhone"
        Switch item=Termostato label="Termostato"
        Text item=Temperatura label="Temperatura [%.1f °C]" icon="temperature" valuecolor=[>25="orange",>15="green",<=15="blue"]
}

Do you have an idea of the problem?
I already clean the cache and did lots of change with no luck.

TnX for your help

Jad

Start with why you can not see the value in sitemap. Does the logs give any errors about this?

Start changing the sitemap file temp to be like this:

Text item=Temperatura 

TnX for your interest.
This evening I’ll try, but can be possible that the problem is to change in sitemap this:

Text item=Temperatura label="Temperatura [%.1f °C]"

with this:

Text item=Temperatura label="Temperatura [%d °C]"

And for items I didn’t use this <light> or <switch> sort of parameter, is this essential for google, IOS, etc?

TnX

Jad

You have that defined in your item so it should not be needed in sitemap.

No, that is for icons on sitemap and has nothing to do with google, IOS, Alexa. For those you use tagging e.g. [ “Lighting” ].

1 Like

Hi, I tried with the assistant, and I correct the error.

Now I can use alexa correctly Switch, Temperature, Humidity.
Google is not yet working at all.
IOS as Google.
Paper UI OK
sitemap ok for switch and Humidity, but still not working the Temperature.

In the log I found:
2020-01-09 21:44:59.983 [vent.ItemStateChangedEvent] - TermostatoTorrettaCurrentTemp changed from NULL to 22.1

But This TermostatoTorrettaCurrentTemp was the name before, after I changed it in Temperatura

And also I’m trying to delete an old MQTT broker that I’not using, but at every reboot this broker is in the InBox.
I already remove the /var/lib/openhab2/mqttembedded.bin after removed the broker from PaperUI, but is still back.

Slowly, but something is changing.
I correct the problem in PaperUI about the name of Temperature link.
Now everithing is OK in PaperUI and sitemap, but I still have problems with Umidity and temperature.
Humidity is Working in Alexa, but not in Google and IOS
Temperature is working in google, and 50% in IOS.
To have the switch working I hade to take it off from Thermostat Group.

Work in progress.

Jad

Ok this is my items file:

Switch Presence_iPhoneFra "Fra iPhone" <network> { channel="network:device:iPhoneFra:online" }
Switch Termostato "Termostato" (Termostato) [ "Switchable" ]
Group  gTermostato "Termostato FF" (gFF) [ "Thermostat" ]
Number Temperatura "Temperatura [%.1f °C]" (gTermostato) [ "CurrentTemperature" ]
String TermostatoTorrettaHeatingCoolingMode "Temperatura FF" (gTermostato) [ "homekit:HeatingCoolingMode" ]
Number SetpointTermostato "Setpoint Temperatura %.1f °C" (gTermostato) [ "TargetTemperature" ]
Number Umidita "Umidita [%.1f %%]" (Termostato) [ "CurrentHumidity" ]

and this is the sitemap file:

sitemap default label="My first sitemap"
{
        Switch item=Presence_iPhoneFra label="Fra iPhone"
        Switch item=Termostato label="Termostato"
        Text item=Temperatura label="Temperatura [%.1f °C]" icon="temperature" valuecolor=[>25="orange",>15="green",<=15="blue"]
        Text item=Umidita label="Umidita [%.1f %%]" icon="humidity"
}

Right now almost everything is working, only the humidity is missing in google.
Then, however, I have these warnings in the log:

2020-01-09 23:50:46.814 [WARN ] [al.accessories.HomekitThermostatImpl] - The tag homekit:HeatingCoolingMode has been renamed to homekit:TargetHeatingCoolingMode; please update your things, accordingly

2020-01-09 23:50:46.818 [WARN ] [al.accessories.HomekitThermostatImpl] - The tag TargetTemperature has been renamed to homekit:TargetTemperature; please update your things, accordingly

Jad

If you created these things in paperUI and files then you may have duplicates. Have you stopped OH and cleaned cache?

The commands are:

sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemctl start openhab2 or you can sudo reboot

This may help remove any duplicates if not you will need to check in /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.thing.link.ItemChannelLink.json and make sure there isn’t a Link hanging around. Also, for items check: /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.items.Item.json

If you see duplicates in either of these file you can remove them using text editor but make sure to stop OH before changing anything in these files. To simply look at the file you can use cat e.g. cat /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.thing.link.ItemChannelLink.json

I create the broker, the generic MQTT and the channel in PAPER UI than linked the items create in the items file to channel, is it correct?

Good advice to check duplicate inside the file (I didn’t know that) for a link hanging, I still have an old Broker hanging.

I’ll do this night.

TnX

Jad

Yes, that sounds correct. :+1:

Is that the embedded on or other?

Embedded

Jad

If it will not go away by removing it from PaperUI and cleaning the cache then stop OH and remove it from /var/lib/openhab2/config/org/openhab/addons.config and make sure it’s not listed in /etc/openhab2/services/addons.cfg

I found this two items
Termostato -\u003e mqtt:topic:94757268:Termostato”: {
“class”: “org.eclipse.smarthome.core.thing.link.ItemChannelLink”,
“value”: {
“channelUID”: {
“segments”: [
“mqtt”,
“topic”,
“94757268”,
“Termostato”
“configuration”: {
“properties”: {
“profile”: “system:default”
“itemName”: “Termostato”
Termostato -\u003e mqtt:topic:3248c919:Termostato”: {
“class”: “org.eclipse.smarthome.core.thing.link.ItemChannelLink”,
“value”: {
“channelUID”: {
“segments”: [
“mqtt”,
“topic”,
“3248c919”,
“Termostato”
“configuration”: {
“properties”: {
“profile”: “system:default”
“itemName”: “Termostato”

But I only have
Termostato
mqtt:topic:3248c919:Termostato
Switch
I think I can delete the other one.

Right?

Jad