Control Domoticz using Harmony Hub and HA Bridge

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.

Moderator: leecollings

bellissimo
Posts: 15
Joined: Saturday 18 October 2014 18:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by bellissimo »

Got the Ha-Bridge set up now and it is controlling all my Harmony activities and some of the my Domoticz switches.

However I can't seem to get the dimming working. I see there is a 'Dim URL', which does not seem to handle a variable dim level (?) but I did try adding the following url to get it to dim to 50%

Code: Select all

http://192.168.0.99:8080/json.htm?type=command&param=switchlight&idx=44&switchcmd=Set%20Level&level=50
However pressing on 'Test Dim' does not seem to do anything and nothing appears in the Domoticz logs.

Has anyone got this working with a dimmer in Domoticz and if so could they post how they configured it?
bellissimo
Posts: 15
Joined: Saturday 18 October 2014 18:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by bellissimo »

D'oh. Should have read the manual. For others information, the following is required for dimming:

Code: Select all

http://192.168.0.99:8080/json.htm?type=command&param=switchlight&idx=44&switchcmd=Set%20Level&level=${intensity.percent}
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by Thomasdc »

remb0 wrote:Can somebody add a nice instruction to the wiki (same username and password)
Is someone working on this? i would like to try this HA bridge out in my setup!

it would be great to just see how to install and configure and integrate this on one page instead of scrolling through the forum :)

Thanks!
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: RE: Re: Control Domoticz using Harmony Hub and HA Bridge

Post by StanHD »

Thomasdc wrote:
remb0 wrote:Can somebody add a nice instruction to the wiki (same username and password)
Is someone working on this? i would like to try this HA bridge out in my setup!

it would be great to just see how to install and configure and integrate this on one page instead of scrolling through the forum :)

Thanks!
Have a look here. Worked fine for me. Image Image

https://www.domoticz.com/wiki/Alexa

Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
doh
Posts: 82
Joined: Monday 01 December 2014 13:28
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: London, UK
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by doh »

I'm using HABridge with my Echo and it's working fine. I'm trying to use it to add devices to my Harmony Hub so that when I start my TV it can also power-on some LED backlights, etc. The Harmony finds the HA Bridge as a Hue device and adds it, but it only seems to add one device out of the 17 I have in there. Any ideas how to get this to detect all the devices in there? Thanks
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by StanHD »

Not sure if this helps, but I do it slightly differently:-

I have added the Harmony Hub hardware to Domoticz. This gives me a switch for each "activity" plus "power off".
I then use a simple blockley to call a lighting scene and other switches when "Watch TV" is on.

So when I say:- "Alexa, turn on Watch TV", the HA-Bridge tells the harmony hub what to do, and Domoticz detects the harmony activity and sorts the lights out. ;)

Image
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
doh
Posts: 82
Joined: Monday 01 December 2014 13:28
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: London, UK
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by doh »

doh wrote:I'm using HABridge with my Echo and it's working fine. I'm trying to use it to add devices to my Harmony Hub so that when I start my TV it can also power-on some LED backlights, etc. The Harmony finds the HA Bridge as a Hue device and adds it, but it only seems to add one device out of the 17 I have in there. Any ideas how to get this to detect all the devices in there? Thanks
Never mind - figured it out. I had created multiple switches as copies and updated the URL's, but they all had the same Hue ID so it only kept the last one it found. I've re-created them and they're all now visible.
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by Thomasdc »

Can someone explain how to ad 'devices ' in the ha bridge?

i use 'manual add' in the web interface from habridge

this is selected:

Target - Encapsulated
Device Type - Custom
Map Type - --Please Select--

then a use a json link ( its working from my browser)

but when i juse the 'test on' and 'test off' its not working..

do i need to do something more?
the http header and verb i dont need to use do i?


the habridge is running on the same rpi as domoticz (other port off course) i dont need to use 'localhost' instead of the rpi ip adress? (ive tried this, but this is not working neither)

or are there some divices that ar not supported? now i've id (in the json link) from an rfx dimmer (but i only use the on and off commando to test.. but without result.

Thanks!
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by StanHD »

Thomasdc wrote:Can someone explain how to ad 'devices ' in the ha bridge?

i use 'manual add' in the web interface from habridge

this is selected:

Target - Encapsulated
Device Type - Custom
Map Type - --Please Select--

then a use a json link ( its working from my browser)

but when i juse the 'test on' and 'test off' its not working..

do i need to do something more?
the http header and verb i dont need to use do i?


the habridge is running on the same rpi as domoticz (other port off course) i dont need to use 'localhost' instead of the rpi ip adress? (ive tried this, but this is not working neither)

or are there some divices that ar not supported? now i've id (in the json link) from an rfx dimmer (but i only use the on and off commando to test.. but without result.

Thanks!
That all looks ok. I am using LightwaveRF dimmers with RFX, here are my working JSON URL's:-

On URL:-http://IP:PORT/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=On
Off URL:-http://IP:PORT/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=Off

Use your IP:PORT and idx and watch out for case sensative On & Off

Do you get an error message from the HA-Bridge when you test?
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by Thomasdc »

StanHD wrote:
Thomasdc wrote:Can someone explain how to ad 'devices ' in the ha bridge?
Spoiler: show
i use 'manual add' in the web interface from habridge

this is selected:

Target - Encapsulated
Device Type - Custom
Map Type - --Please Select--

then a use a json link ( its working from my browser)

but when i juse the 'test on' and 'test off' its not working..

do i need to do something more?
the http header and verb i dont need to use do i?


the habridge is running on the same rpi as domoticz (other port off course) i dont need to use 'localhost' instead of the rpi ip adress? (ive tried this, but this is not working neither)

or are there some divices that ar not supported? now i've id (in the json link) from an rfx dimmer (but i only use the on and off commando to test.. but without result.

Thanks!


That all looks ok. I am using LightwaveRF dimmers with RFX, here are my working JSON URL's:-

On URL:-http://IP:PORT/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=On
Off URL:-http://IP:PORT/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=Off

Use your IP:PORT and idx and watch out for case sensative On & Off

Do you get an error message from the HA-Bridge when you test?
this is the error i get:
Request Error, Pleae look in your habridge log: error {"type":6,"address":"/lights/6","description":"Error on calling url to change device state","parameter":"/lights/6state"
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by Thomasdc »

i got it working
there was a setting not right (UPNP IP Address in the web interface was wrong)

but now i have an other question...

i want to change the default port to port '80' (because thats the only way to let it work with google home)
but wen i use the command:
sudo java -jar -Dserver.port=80 ha-bridge-3.5.1.jar

this happens:

Code: Select all

pi@raspberrypi:~/habridge$ sudo java -jar -Dserver.port=80 ha-bridge-3.5.1.jar
2017-01-27 22:07:20,061 [main] INFO  com.bwssystems.HABridge.HABridge - HA Bridg                                                                 e (v3.5.1) starting....
2017-01-27 22:07:20,179 [main] INFO  com.bwssystems.HABridge.BridgeSettings - re                                                                 ading from config file: data/habridge.config
2017-01-27 22:07:20,600 [main] INFO  com.bwssystems.HABridge.HABridge - HA Bridg                                                                 e initializing....
2017-01-27 22:07:20,702 [main] INFO  com.bwssystems.HABridge.SystemControl - Sys                                                                 tem control service started....
2017-01-27 22:07:21.342:INFO::Thread-0: Logging initialized @4038ms
2017-01-27 22:07:21,864 [Thread-0] INFO  spark.webserver.JettySparkServer - == S                                                                 park has ignited ...
2017-01-27 22:07:21,875 [Thread-0] INFO  spark.webserver.JettySparkServer - >> L                                                                 istening on 0.0.0.0:80
2017-01-27 22:07:21.894:INFO:oejs.Server:Thread-0: jetty-9.3.z-SNAPSHOT
2017-01-27 22:07:22.262:INFO:oejs.ServerConnector:Thread-0: Started ServerConnec                                                                 tor@1476d3d{HTTP/1.1,[http/1.1]}{0.0.0.0:80}
2017-01-27 22:07:22.269:INFO:oejs.Server:Thread-0: Started @4983ms
2017-01-27 22:07:23,198 [main] INFO  com.bwssystems.harmony.HarmonyServer - setu                                                                 p initiated ....
2017-01-27 22:07:26,342 [main] ERROR com.bwssystems.harmony.HarmonyHome - Cannot                                                                  get harmony client (Harmony) setup, Exiting with message: Failed communicating                                                                  with Harmony Hub
java.lang.RuntimeException: Failed communicating with Harmony Hub
        at net.whistlingfish.harmony.HarmonyClient.connect(HarmonyClient.java:17                                                                 9)
        at com.bwssystems.harmony.HarmonyServer.execute(HarmonyServer.java:78)
        at com.bwssystems.harmony.HarmonyServer.setup(HarmonyServer.java:50)
        at com.bwssystems.harmony.HarmonyHome.<init>(HarmonyHome.java:45)
        at com.bwssystems.HABridge.HABridge.main(HABridge.java:70)
Caused by: org.jivesoftware.smack.SmackException$ConnectionException: null
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguratio                                                                 n(XMPPTCPConnection.java:433)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPC                                                                 onnection.java:808)
        at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:396                                                                 )
        at net.whistlingfish.harmony.HarmonyClient.connect(HarmonyClient.java:11                                                                 5)
        ... 4 common frames omitted
2017-01-27 22:07:26,464 [main] INFO  com.bwssystems.HABridge.devicemanagmeent.De                                                                 viceResource - HABridge device management service started....
2017-01-27 22:07:26,537 [main] INFO  com.bwssystems.HABridge.upnp.UpnpSettingsRe                                                                 source - Hue description service started....
2017-01-27 22:07:26,551 [main] INFO  com.bwssystems.util.UDPDatagramSender - Ini                                                                 tializing UDP response Seocket...
2017-01-27 22:07:26,567 [main] INFO  com.bwssystems.util.UDPDatagramSender - UDP                                                                  response Seocket initialized to: 50000
2017-01-27 22:07:28,223 [main] INFO  com.bwssystems.HABridge.hue.HueMulator - Hu                                                                 e emulator service started....
2017-01-27 22:07:28,277 [main] INFO  com.bwssystems.HABridge.upnp.UpnpListener -                                                                  UPNP Discovery Listener starting....
2017-01-27 22:07:28,283 [main] INFO  com.bwssystems.HABridge.upnp.UpnpListener -                                                                  UPNP Discovery Listener running and ready....
and then it all works (habridge is running on port 80)

but..

as long i keep running putty it works, but when i close putty, or use 'Control + C' to end the action (because it doesnt end on its own for some reason?) then it is not running on port 80 anymore...
jeroenvanpelt
Posts: 20
Joined: Saturday 30 January 2016 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by jeroenvanpelt »

Check the readme at:
https://github.com/bwssytems/ha-bridge/ ... ge-on-a-pi

It tells you how to use a simple starthabridge.sh script to start ha-bridge and keep it running. If you want ha-bridge to run on port 80, you may also just configure that under the "Bridge Control" tab. After saving the new config, and restarting ha-bridge, you will find it will listen on port 80 by default.

BTW, I also noticed you're running an older version of ha-bridge. You might want to consider downloading v4.1.0 at:
https://github.com/bwssytems/ha-bridge/ ... -4.1.0.jar
--
Domoticz latest stable - RaspberryPi 2 B - MySensors - Controlicz - Google Home - RFLink (w/MiLight)
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by Thomasdc »

jeroenvanpelt wrote:Check the readme at:
https://github.com/bwssytems/ha-bridge/ ... ge-on-a-pi

It tells you how to use a simple starthabridge.sh script to start ha-bridge and keep it running. If you want ha-bridge to run on port 80, you may also just configure that under the "Bridge Control" tab. After saving the new config, and restarting ha-bridge, you will find it will listen on port 80 by default.

BTW, I also noticed you're running an older version of ha-bridge. You might want to consider downloading v4.1.0 at:
https://github.com/bwssytems/ha-bridge/ ... -4.1.0.jar

in the new version (4.1.0) you can add 'Domoticz Names and IP Addresses"
when i do that, and i save it.. then i look again in that page.. but it isn't there anymore?

i get this in the log:

Code: Select all

01-29-2017 19:41:42.508	INFO	Domoticz Home created. No Domoticz devices configured.	com.bwssystems.HABridge.plugins.domoticz.DomoticzHome
01-29-2017 19:41:42.510	WARN	Error reading the file: data/device.db - Does not exist or is not readable. continuing...	com.bwssystems.HABridge.dao.DeviceRepository
01-29-2017 19:41:42.511	INFO	HABridge device management service started....	com.bwssystems.HABridge.devicemanagmeent.DeviceResource
jeroenvanpelt
Posts: 20
Joined: Saturday 30 January 2016 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by jeroenvanpelt »

The UI of ha-bridge is a bit confusing. When you enter all the Domoticz information, you need to click the green "Add" button on the right (next to the line you just added information on) to add the Domoticz information and then click the "Save" button at the top of the settings page in ha-bridge. Same goes for adding action for ha-bridge devices.
--
Domoticz latest stable - RaspberryPi 2 B - MySensors - Controlicz - Google Home - RFLink (w/MiLight)
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by Thomasdc »

jeroenvanpelt wrote:The UI of ha-bridge is a bit confusing. When you enter all the Domoticz information, you need to click the green "Add" button on the right (next to the line you just added information on) to add the Domoticz information and then click the "Save" button at the top of the settings page in ha-bridge. Same goes for adding action for ha-bridge devices.
yeah i did that,
i also tried it for adding the Harmony hub.. but everytime (after i added it (domoticz/harmony) and saved it) it wasnt there anymore after it saved an reinitilazed..

can it be that it uses an old config file or something (from the previous version?) instad of the new one after reinitialzing or something?

why do i think that?
--> there was an harmony device device allready in it (my harmony with the old ip adress) , i deleted this, and added the harmony with the new ip adresss and saved.. but then the new one was gone, an the old one was there again..
so what i did then was (with putty) i opened:

Code: Select all

pi@raspberrypi:~/habridge/data$ sudo nano habridge.config

and in that file was the harmony with the old ip adress.. then i changed the harmony ip in this file.. and after i did this i was abbly to see my harmony in the habridge...
Last edited by Thomasdc on Sunday 29 January 2017 20:26, edited 1 time in total.
jeroenvanpelt
Posts: 20
Joined: Saturday 30 January 2016 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by jeroenvanpelt »

Have you stopped and started the ha-bridge after you updated it? From the log you quoted earlier, it looks like ha-bridge can't read your device.db.

Let's start at the beginning: How did you update ha-bridge? I have done so this morning by just downloading the 4.1.0 jar file and placing it in the habridge directory I had created. After that I killed the old ha-bridge process. After updating the starthabridge.sh script with the correct version, I started ha-bridge again.
--
Domoticz latest stable - RaspberryPi 2 B - MySensors - Controlicz - Google Home - RFLink (w/MiLight)
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by Thomasdc »

jeroenvanpelt wrote:Have you stopped and started the ha-bridge after you updated it? From the log you quoted earlier, it looks like ha-bridge can't read your device.db.

Let's start at the beginning: How did you update ha-bridge? I have done so this morning by just downloading the 4.1.0 jar file and placing it in the habridge directory I had created. After that I killed the old ha-bridge process. After updating the starthabridge.sh script with the correct version, I started ha-bridge again.
no i didn't stop the old one, i just installed the new one (following the instructions on github) but i did a reboot of the rpi allready.. the old habridge didnt start up at reboot..
yeah i changed the Starthabridge.sh script to the new version..

but it still doens't work to edit the config file from the webinterface
jeroenvanpelt
Posts: 20
Joined: Saturday 30 January 2016 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by jeroenvanpelt »

That is really strange. I am just trying to eliminate most likely causes. Did you start starthabridge.sh as root? Is the data/device.db file there if you check from the command line? Is the config file in the data directory?

And, do you see any of the config you did before the update?
--
Domoticz latest stable - RaspberryPi 2 B - MySensors - Controlicz - Google Home - RFLink (w/MiLight)
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Post by Thomasdc »

jeroenvanpelt wrote:That is really strange. I am just trying to eliminate most likely causes. Did you start starthabridge.sh as root? Is the data/device.db file there if you check from the command line? Is the config file in the data directory?

And, do you see any of the config you did before the update?

the only thing i saw in the config from before the update was the harmony hub with the old ip.. (my devices that i added allready (with manual ad) were gone)
pi@raspberrypi:~/habridge/data$ ls
device.db habridge.config

so it is all there..

and this is how i started it:

Code: Select all

pi@raspberrypi:/etc/systemd/system$ sudo nano habridge.service
pi@raspberrypi:/etc/systemd/system$ sudo systemctl daemon-reload
even when i try to delete the harmony hub in the bridge control it appears again when i click the "save" button..

its just like that the "save" button doesnt change the config file..
i
jeroenvanpelt
Posts: 20
Joined: Saturday 30 January 2016 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: RE: Re: Control Domoticz using Harmony Hub and HA Bridge

Post by jeroenvanpelt »

Thomasdc wrote: [codepi@raspberrypi:~/habridge/data$ ls
device.db habridge.config
[/code]

so it is all there
Can you do a 'ls -l' on your data directory, so we can check the permissions to be absolutely sure?

And, the contents of your service file?

Sent from my Nexus 6P using Tapatalk
--
Domoticz latest stable - RaspberryPi 2 B - MySensors - Controlicz - Google Home - RFLink (w/MiLight)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest