Control Domoticz using Harmony Hub and HA Bridge

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.
bellissimo
Posts: 29
Joined: Saturday 18 October 2014 18:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby bellissimo » Saturday 05 November 2016 12:44

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: 29
Joined: Saturday 18 October 2014 18:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby bellissimo » Saturday 05 November 2016 13:27

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: 200
Joined: Wednesday 11 March 2015 20:13
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby Thomasdc » Friday 23 December 2016 12:58

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: 499
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

Postby StanHD » Friday 23 December 2016 13:02

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.

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

[url][/url]
Domotica - Intel nuc Celeron, Domoticz - Windows, RFXTRX433E. 1-Wire USB. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub, Broadlink RM2, HA-Bridge with Amazon Echo / Alexa.

doh
Posts: 64
Joined: Monday 01 December 2014 14:28
Target OS: Linux
Domoticz version:
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby doh » Monday 09 January 2017 13:26

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: 499
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

Postby StanHD » Monday 09 January 2017 13:44

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
Domotica - Intel nuc Celeron, Domoticz - Windows, RFXTRX433E. 1-Wire USB. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub, Broadlink RM2, HA-Bridge with Amazon Echo / Alexa.

doh
Posts: 64
Joined: Monday 01 December 2014 14:28
Target OS: Linux
Domoticz version:
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby doh » Monday 09 January 2017 13:52

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: 200
Joined: Wednesday 11 March 2015 20:13
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby Thomasdc » Monday 09 January 2017 14:03

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: 499
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

Postby StanHD » Monday 09 January 2017 14:21

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?
Domotica - Intel nuc Celeron, Domoticz - Windows, RFXTRX433E. 1-Wire USB. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub, Broadlink RM2, HA-Bridge with Amazon Echo / Alexa.

Thomasdc
Posts: 200
Joined: Wednesday 11 March 2015 20:13
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby Thomasdc » Monday 09 January 2017 21:21

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: 200
Joined: Wednesday 11 March 2015 20:13
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby Thomasdc » Friday 27 January 2017 23:18

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

[email protected]:~/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                                                                 [email protected]{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...

User avatar
jeroenvanpelt
Posts: 12
Joined: Saturday 30 January 2016 14:19
Target OS: Raspberry Pi
Domoticz version: 3.6561
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby jeroenvanpelt » Saturday 28 January 2017 9:20

Check the readme at:
https://github.com/bwssytems/ha-bridge/blob/master/README.md#basic-script-setup-to-run-the-bridge-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/releases/download/v4.1.0/ha-bridge-4.1.0.jar
--
Domoticz latest beta - RaspberryPi 2 B - RFXCOM trx433 - MySensors - ha-bridge - Google Home - RFLink (w/MiLight)

Thomasdc
Posts: 200
Joined: Wednesday 11 March 2015 20:13
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby Thomasdc » Sunday 29 January 2017 20:47

jeroenvanpelt wrote:Check the readme at:
https://github.com/bwssytems/ha-bridge/blob/master/README.md#basic-script-setup-to-run-the-bridge-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/releases/download/v4.1.0/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

User avatar
jeroenvanpelt
Posts: 12
Joined: Saturday 30 January 2016 14:19
Target OS: Raspberry Pi
Domoticz version: 3.6561
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby jeroenvanpelt » Sunday 29 January 2017 21:04

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 beta - RaspberryPi 2 B - RFXCOM trx433 - MySensors - ha-bridge - Google Home - RFLink (w/MiLight)

Thomasdc
Posts: 200
Joined: Wednesday 11 March 2015 20:13
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby Thomasdc » Sunday 29 January 2017 21:19

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

[email protected]:~/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 21:26, edited 1 time in total.

User avatar
jeroenvanpelt
Posts: 12
Joined: Saturday 30 January 2016 14:19
Target OS: Raspberry Pi
Domoticz version: 3.6561
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby jeroenvanpelt » Sunday 29 January 2017 21:24

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 beta - RaspberryPi 2 B - RFXCOM trx433 - MySensors - ha-bridge - Google Home - RFLink (w/MiLight)

Thomasdc
Posts: 200
Joined: Wednesday 11 March 2015 20:13
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby Thomasdc » Sunday 29 January 2017 21:37

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

User avatar
jeroenvanpelt
Posts: 12
Joined: Saturday 30 January 2016 14:19
Target OS: Raspberry Pi
Domoticz version: 3.6561
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby jeroenvanpelt » Sunday 29 January 2017 21:44

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 beta - RaspberryPi 2 B - RFXCOM trx433 - MySensors - ha-bridge - Google Home - RFLink (w/MiLight)

Thomasdc
Posts: 200
Joined: Wednesday 11 March 2015 20:13
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Control Domoticz using Harmony Hub and HA Bridge

Postby Thomasdc » Sunday 29 January 2017 22:11

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)

[email protected]:~/habridge/data$ ls
device.db habridge.config

so it is all there..

and this is how i started it:

Code: Select all

[email protected]:/etc/systemd/system$ sudo nano habridge.service
[email protected]:/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

User avatar
jeroenvanpelt
Posts: 12
Joined: Saturday 30 January 2016 14:19
Target OS: Raspberry Pi
Domoticz version: 3.6561
Contact:

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

Postby jeroenvanpelt » Sunday 29 January 2017 22:23

Thomasdc wrote:[[email protected]:~/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 beta - RaspberryPi 2 B - RFXCOM trx433 - MySensors - ha-bridge - Google Home - RFLink (w/MiLight)


Return to “Third party and supplementary tools”

Who is online

Users browsing this forum: No registered users and 1 guest