- Platform information:
- Hardware: laptop, on 192.168.1.27
- OS: windows 10
- Java Runtime Environment: 1.8.0_191
- openHAB version: 2.4 M8
- one Echo and one Echo Dot, latest revisions (bought in December 2018)
I’m new to openHab, and trying to setup an integration with Alexa trough hue-emulation for the last 2 weeks.
I read several topics related to hue-emulation and Alexa, and got this far:
- openHAB is correctly configured with my KNX/IP gateway, here’s the .things file:
Bridge knx:ip:bridge [
ipAddress="192.168.1.217",
portNumber=3671,
localIp="192.168.1.27",
type="TUNNEL",
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=10,
localSourceAddr="0.0.0"
] {
Thing device generic {
Type switch : P7_ingresso_switch "P7 Ingresso" [ ga="1/0/0+<1/0/100" ]
}
}
- I have one item configured, here’s the .item file:
Switch P7_ingresso_switch "P7 Ingresso" <light> ["Lighting"]
I can turn on and off the light from the “control” page in openHAB: so far, so good.
I then installed and configured hue emulation (including redirect to port 80), here’s what I get from my openHAB:
- http://192.168.1.27/api/description.xml :
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://192.168.1.27:80/</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
<friendlyName>openHAB Hue Emulation (192.168.1.27)</friendlyName>
<manufacturer>Royal Philips Electronics</manufacturer>
<manufacturerURL>http://www.openhab.org</manufacturerURL>
<modelDescription>Philips hue compatible Personal Wireless Lighting</modelDescription>
<modelName>Philips hue bridge 2015</modelName>
<modelNumber>BSB002</modelNumber>
<modelURL>http://www.meethue.com</modelURL>
<serialNumber>493781123655</serialNumber>
<UDN>uuid:49378112-3655-40e4-9bcc-bb2cdea51546</UDN>
<presentationURL>index.html</presentationURL>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<height>48</height>
<width>48</width>
<depth>24</depth>
<url>hue_logo_0.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<height>120</height>
<width>120</width>
<depth>24</depth>
<url>hue_logo_3.png</url>
</icon>
</iconList>
</device>
</root>
- http://192.168.1.27/api/discovery.xml :
// 20181216160441
// http://192.168.1.27/api/discovery.xml
{
"config": {
"uuid": "49378112-3655-40e4-9bcc-bb2cdea51546",
"timeformat": "24h",
"timezone": "+01:00",
"UTC": "2018-12-16T15:04:40.027",
"localtime": "2018-12-16T16:04:40.027",
"devicename": "Philips Hue",
"fwversion": "0x262e0500",
"rfconnected": true,
"zigbeechannel": 15,
"linkbutton": false,
"panid": 19367,
"dhcp": true,
"gateway": "192.168.0.1",
"ipaddress": "192.168.1.27",
"netmask": "255.255.255.0",
"networkopenduration": 60,
"proxyaddress": "none",
"proxyport": 0,
"whitelist": {
"discovery.xml": {
"name": "Formerly authorized device",
"createDate": "2018-12-16T12:41:09.955",
"lastUseDate": "2018-12-16T16:04:40.027"
},
"testuser": {
"name": "Formerly authorized device",
"createDate": "2018-12-16T13:38:31.933",
"lastUseDate": "2018-12-16T14:53:33.497"
}
},
"apiversion": "1.16.0",
"bridgeid": "493781123655",
"datastoreversion": "60",
"starterkitid": "",
"modelid": "BSB002",
"name": "openHAB Devices",
"swversion": "2.5.46",
"mac": "AC:7B:A1:4E:BD:DA",
"factorynew": false
},
"lights": {
"1": {
"state": {
"bri": 0,
"ct": 500,
"on": false,
"reachable": true,
"mode": "homeautomation",
"alert": "none"
},
"type": "Color Temperature Light",
"modelid": "LTW001",
"uniqueid": "49378112-3655-40e4-9bcc-bb2cdea51546-1",
"manufacturername": "Philips",
"swversion": "66012040",
"friendsOfHue": true,
"colorGamut": "2200K-6500K",
"hascolor": false,
"name": "P7 Ingresso",
"config": {
"archetype": "classicbulb",
"function": "functional",
"direction": "omnidirectional"
},
"capabilities": {
"certified": true,
"streaming": {
"renderer": false,
"proxy": false
},
"control": {
}
}
}
},
"groups": {
"0": {
"name": "All lights",
"type": "LightGroup",
"action": {
"hue": 0,
"sat": 0,
"xy": [
0.0,
0.0
],
"effect": "none",
"transitiontime": 0,
"colormode": "ct",
"bri": 0,
"ct": 500,
"on": false,
"reachable": true,
"mode": "homeautomation",
"alert": "none"
},
"lights": [
"1"
]
}
},
"scenes": {
},
"rules": {
},
"sensors": {
},
"schedules": {
},
"resourcelinks": {
}
}
- And from 192.168.1.27/api/testuser/lights :
// 20181216231458
// http://localhost:8080/api/testuser/lights
{
"1": {
"state": {
"bri": 0,
"ct": 500,
"on": false,
"reachable": true,
"mode": "homeautomation",
"alert": "none"
},
"type": "Color Temperature Light",
"modelid": "LTW001",
"uniqueid": "49378112-3655-40e4-9bcc-bb2cdea51546-1",
"manufacturername": "Philips",
"swversion": "66012040",
"friendsOfHue": true,
"colorGamut": "2200K-6500K",
"hascolor": false,
"name": "P7 Ingresso",
"config": {
"archetype": "classicbulb",
"function": "functional",
"direction": "omnidirectional"
},
"capabilities": {
"certified": true,
"streaming": {
"renderer": false,
"proxy": false
},
"control": {
}
}
}
}
Still, after I enable Device Pairing and Amazon Echo Device Discovery Fix, in hue-emulation, Alexa is not finding any device.
Already tried scanning from alexa.amazon.it, from the mobile app and from the Echo devices.
Here are the logs that are generated (set to DEBUG):
2018-12-16 15:59:00.869 [DEBUG] [.io.hueemulation.internal.LightItems] - Added items: P7 Ingresso
2018-12-16 15:59:01.572 [INFO ] [eemulation.internal.ConfigManagement] - Hue Emulation pairing enabled for 60s at /api
2018-12-16 15:59:01.574 [DEBUG] [org.openhab.io.hueemulation ] - ServiceEvent MODIFIED - {org.openhab.io.hueemulation.internal.HueEmulationService}={service.id=354, service.bundleid=207, service.scope=bundle, restrictToTagsWhiteLights=Lighting,Switchable, component.name=org.openhab.io.hueemulation.internal.HueEmulationService, service.config.label=Hue Emulation, component.id=214, createNewUserOnEveryEndpoint=true, restrictToTagsSwitches=Switchable, restrictToTagsColorLights=ColorLighting, discoveryHttpPort=80, pairingTimeout=60, pairingEnabled=true, service.config.category=io, discoveryIp=192.168.1.27, service.config.description.uri=io:hueemulation, service.pid=org.openhab.hueemulation} - org.openhab.io.hueemulation
2018-12-16 16:00:01.593 [DEBUG] [.io.hueemulation.internal.LightItems] - Added items: P7 Ingresso
2018-12-16 16:00:02.233 [INFO ] [eemulation.internal.ConfigManagement] - Hue Emulation pairing disabled. Service available under /api
2018-12-16 16:00:02.234 [DEBUG] [org.openhab.io.hueemulation ] - ServiceEvent MODIFIED - {org.openhab.io.hueemulation.internal.HueEmulationService}={service.id=354, service.bundleid=207, service.scope=bundle, restrictToTagsWhiteLights=Lighting,Switchable, component.name=org.openhab.io.hueemulation.internal.HueEmulationService, service.config.label=Hue Emulation, component.id=214, createNewUserOnEveryEndpoint=false, restrictToTagsSwitches=Switchable, restrictToTagsColorLights=ColorLighting, discoveryHttpPort=80, pairingTimeout=60, pairingEnabled=false, service.config.category=io, discoveryIp=192.168.1.27, service.config.description.uri=io:hueemulation, service.pid=org.openhab.hueemulation} - org.openhab.io.hueemulation
Really don’t know what to try now, any suggestion would really be much appreciated!
Martin