Page 1 of 2

Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 13:01
by derekd
How do I implement the Amazon Echo Dot into Domoticz?

Currently I have domoticz running on a Raspberry PI2. I followed the wiki page https://github.com/bwssytems/ha-bridgeto install the HA-bridge and it's activated. But then I am stuck....whats the next step to get it working?

pi@raspberrypi:~ $ sudo systemctl start habridge.service
pi@raspberrypi:~ $ tail -f /var/log/syslog
Jan 20 10:39:01 raspberrypi CRON[2364]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Jan 20 11:09:01 raspberrypi CRON[2407]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Jan 20 11:17:01 raspberrypi CRON[2444]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 20 11:39:01 raspberrypi CRON[2463]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Jan 20 12:09:01 raspberrypi CRON[2506]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Jan 20 12:17:01 raspberrypi CRON[2542]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 20 12:36:56 raspberrypi systemd[1]: Starting Session c2 of user pi.
Jan 20 12:36:56 raspberrypi systemd[1]: Started Session c2 of user pi.
Jan 20 12:39:01 raspberrypi CRON[2608]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Jan 20 12:40:51 raspberrypi systemd[1]: Started HA Bridge.

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 13:30
by chrisfraser05
Log into the ha Bridge, it should be pretty port 8080.

Once in the bridge go to the manual add device and create a device with the url's for your on and off actions in domoticz.

Lastly once the bridge device is created ask alexa to "find devices"

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 15:40
by chrisfraser05
Port 80 sorry. Domoticz is normally 8080

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 16:06
by derekd
Yes it's working :-) port 80

Now I have the next challange to get this configured.

I can follow this guide https://www.domoticz.com/wiki/Alexa or https://github.com/bwssytems/ha-bridge or are there better manuals?

How can I find the idx of a specific switch? What are the most important fields to configure?

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 18:24
by chrisfraser05
The domoticz alexa wiki seems pretty good.

Just go to the settings icon at the top right on domoticz and select devices.

This brings a list of all devices with their idx

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 18:35
by derekd
Got it configured with the right IDX (witch I found in the devices field in domoticz) and my 2 switches are discovered. It are Kaku devices, does it work anyway with the echo dot?

If I say for instance "turn on the tv lamp" Alexa say's:

Lamp is not responding, check connection and power supply.

What can be wrong?

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 19:56
by StanHD
Have you checked with the on and off test buttons in HA-Bridge web page?
You should get a response pop-up and the switches should turn on and off accordingly.
If not you will see an error, which probably means a command error.

Just a thought

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 20:07
by derekd
Yep I've tried that. I got no error that's right. What do you mean with command error, can you be more specific?

When I look into the log file i see an warning:

Error on calling url to change device state: http://192.168.2.17:8080/json.htm?
type=command&param=switchlight&idx=53&switchcmd=On

Component: com.bwssystems.HABridge.hue.HueMulator

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 20:14
by chrisfraser05
Did you tell alexa to find devices?

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 20:16
by derekd
Yes, and she discovered them.

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 20:19
by chrisfraser05
I call mine with http://192.168.1.10:8080/json.htm?type= ... itchcmd=On

I can't see it much different.

Do you have a space between htm and ?

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 20:24
by derekd
Hi Chris,

No space between it.

I rebooted my PI and let Alexa discover my devices again. She found it but can't turn it on or off.

When i look into the log file it has a warning:

WARN The upnp config address, 192.168.2.17, does not match any known IP's on this host.

Do I miss a part of the configuration?

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 20:25
by derekd
This is the whole log:

01-20-2017 20:18:05.290 INFO HA Bridge (v3.5.1) starting.... com.bwssystems.HABridge.HABridge
01-20-2017 20:18:05.334 INFO reading from config file: /home/pi/habridge/data/habridge.config com.bwssystems.HABridge.BridgeSettings
01-20-2017 20:18:05.752 WARN The upnp config address, 192.168.2.17, does not match any known IP's on this host. com.bwssystems.HABridge.BridgeSettings
01-20-2017 20:18:05.754 INFO HA Bridge initializing.... com.bwssystems.HABridge.HABridge
01-20-2017 20:18:05.830 INFO System control service started.... com.bwssystems.HABridge.SystemControl
01-20-2017 20:18:06.485 INFO HABridge device management service started.... com.bwssystems.HABridge.devicemanagmeent.DeviceResource
01-20-2017 20:18:06.574 INFO Hue description service started.... com.bwssystems.HABridge.upnp.UpnpSettingsResource
01-20-2017 20:18:06.588 INFO Initializing UDP response Seocket... com.bwssystems.util.UDPDatagramSender
01-20-2017 20:18:06.615 INFO UDP response Seocket initialized to: 50000 com.bwssystems.util.UDPDatagramSender
01-20-2017 20:18:06.885 INFO == Spark has ignited ... spark.webserver.JettySparkServer
01-20-2017 20:18:06.896 INFO >> Listening on 0.0.0.0:80 spark.webserver.JettySparkServer
01-20-2017 20:18:08.207 INFO Hue emulator service started.... com.bwssystems.HABridge.hue.HueMulator
01-20-2017 20:18:08.295 INFO UPNP Discovery Listener starting.... com.bwssystems.HABridge.upnp.UpnpListener
01-20-2017 20:18:08.300 INFO UPNP Discovery Listener running and ready.... com.bwssystems.HABridge.upnp.UpnpListener
01-20-2017 20:20:27.821 WARN Error on calling url to change device state: http://192.168.2.17:8080/json.htm?type= ... itchcmd=On com.bwssystems.HABridge.hue.HueMulator
01-20-2017 20:20:30.647 WARN Error on calling url to change device state: http://192.168.2.17:8080/json.htm?type= ... itchcmd=On com.bwssystems.HABridge.hue.HueMulator
Logging Configuration

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 20:53
by chrisfraser05
If both are running on the same pi maybe try the loop back address of 127.0.0.1

Re: Echo Dot + HA Bridge what's the next step?

Posted: Friday 20 January 2017 23:43
by chrisfraser05
Did you get anywhere with it?

Re: Echo Dot + HA Bridge what's the next step?

Posted: Saturday 21 January 2017 2:18
by sion
If they are on the same machine you could try using local host.
I also use a username and password in with the Json command :

http://user:password@localhost:8080/jso ... itchcmd=On


On ha bridge, I just fill in name,
Type: custom.
And then the on and off actions. I don't change anything else.

Re: Echo Dot + HA Bridge what's the next step?

Posted: Saturday 21 January 2017 12:05
by derekd
Finally I got it working.

I made a complete rebuild, because I couldn't find where the problem was.

I still got a warning in the log:

Error reading the file: /home/pi/habridge/data/habridge.config - Does not exist or is not readable. continuing... com.bwssystems.HABridge.BridgeSettings

WARN Issue getting directory listing for backups in directory: /home/pi/habridge/data com.bwssystems.util.BackupHandler

Can anybody help me with that?

Re: Echo Dot + HA Bridge what's the next step?

Posted: Monday 23 January 2017 16:23
by philchillbill
I also get the cannot read config file error. But I just added the switches manually and that worked fine. Looking at the config file I had it looked like valid JSON to me but HA-Bridge didn't like it for some reason.

By the way, version 4.0.0 was just released today and is a major update so you may want to try that.

Re: Echo Dot + HA Bridge what's the next step?

Posted: Tuesday 24 January 2017 0:07
by derekd
Thanks Phil,

I installed it (v 4.0.1) https://github.com/bwssytems/ha-bridge/ ... -4.0.1.jarhopefully it's a better version.

Re: Echo Dot + HA Bridge what's the next step?

Posted: Thursday 26 January 2017 13:53
by blackdog65
Hiya,
I've just installed v4.0.3 and the adding of devices (other than naming) is nothing like in the wiki which was written for 2.x.x.
I've used HA-Bridge in the past and it worked ok-ish with my Echo, which I returned due to (at the time) no IFTTT or UK specific features. I'm now trying again, but with a Dot (tired of waiting for Google Home), but having no joy with the new, updated HA-Bridge. Are you supposed to split the command into chunks and drop them into the different boxes?

Any pointers?

Sean