Re: Control Your Harmony Hub with Domoticz.
Posted: Friday 09 May 2014 8:15
Bought an Harmony too! Really nice piece of equipment....
Open source Home Automation System
https://forum.domoticz.com/
A toggle is a really bad thing for use in home automation.gb160 wrote:Hi there, hoping someone can help a noob with what I'm hoping is a really stupid question.
I'm running Domoticz on a raspberry pi, I've got my lights and central heating all working and can operate my harmony hub with no issues.
i have an air conditioner operated via the harmony hub, however it only has one power button, the same o button turns it on and off.
I've got the switch setup so that it operates ok, on turns it on, off turns it off.
However I've set up a scene called bedtime that switches all my lights off in the lounge, turns the air conditioner off, and turns on the bedroom lights.
The issue is, when i go to bed, the air con gets turned on if it is currently off....if the air con is running when i hit the bedtime scene, it turns off correctly.
Im banging my head against the wall as i can't see a solution....anyone ???
Many thanks for replying....and I thought that was the case,I don't think there's any chance to get the discreet codes for the device so I have been 'attempting' to use the bash method with a php script to check the current switch status, but with my limited programming skills this is proving a bit tricky !!Raspberry Piet wrote:
A toggle is a really bad thing for use in home automation.
You need discrete on & off infrared codes.
You can contact logitech and ask them for it or contact the manufactury of the airconditioning.
You also might look here:
http://files.remotecentral.com/library/3-1/index.html
Or make a bash/lua bedtime_script that will send IR signal only if status is on.
Try this:gb160 wrote:Many thanks for replying....and I thought that was the case,I don't think there's any chance to get the discreet codes for the device so I have been 'attempting' to use the bash method with a php script to check the current switch status, but with my limited programming skills this is proving a bit tricky !!Raspberry Piet wrote:
A toggle is a really bad thing for use in home automation.
You need discrete on & off infrared codes.
You can contact logitech and ask them for it or contact the manufactury of the airconditioning.
You also might look here:
http://files.remotecentral.com/library/3-1/index.html
Or make a bash/lua bedtime_script that will send IR signal only if status is on.
I didn't think it would be so difficult to do something as simple as "if device is on, do not send on command"....is this explained in more detail anywhere?
Code: Select all
mkdir /home/pi/domoticz/scripts/bash
touch /home/pi/domoticz/scripts/bash/AC_Off.sh
chmod +x /home/pi/domoticz/scripts/bash/AC_Off.sh
nano /home/pi/domoticz/scripts/bash/AC_Off.sh
Code: Select all
#!/bin/bash
##################################################
DOMO_IP="127.0.0.1"
PORT="8080"
idx_AC="14" #Air Conditioner idx number
##################################################
curl -s "http://$DOMO_IP:$PORT/json.htm?type=devices&rid=$idx_AC" | grep "Status" | grep "On"
if [[ $? -eq 0 ]] ; then
echo "Air Conditioner is on, let's turn it off"
curl -s "http://$DOMO_IP:$PORT/json.htm?type=command¶m=switchlight&idx=$idx_AC&switchcmd=Off&level=0"
else
echo "Air Conditioner is allready off"
fi
Mate, thanks so much for taking the time to help me, I've followed every stage to perfection , but for some reason, the AC_Off.sh is not being triggered when i enter bedtime scene.Raspberry Piet wrote: Invoke your AC_Off.sh through your domoticz bedtime scene => Edit=> Off Action: script://home/pi/domoticz/scripts/bash/AC_Off.sh
Sorry to bang on about this again but I would really appreciate a pointer in the right direction on this please. The wiki gives instructions for installing on a Pi but I'm running Domoticz on windows. I'm stuck here:markk wrote:I would love to be able to integrate my Harmony Hub with Domoticz but I'm running mine on a windows PC. The wiki only explains how to do it with a Pi. Any help would be much appreciated. Thank you.
Thanks v much for the pointer.mbliek wrote:Take a look here:
http://sourceforge.net/projects/harmony ... rce=navbar
You need Microsoft Visual Studio 2010 on you windows PC.
Don't know how to install this and how to use it with domoticz, sorry
I'd try the native support first...although I can't get it working on the Pi, others seem to have it working on other platforms.joske522 wrote:Hi guys,
I'm stuck![]()
Did everything in the wiki, but the last step gives me following error:
make: cc: Command not found
make: *** [HarmonyHubControl.o] Error 127
This happens when I execute: make HarmonyHubControl
Any ideas how I can work around this?
Thanks!
You ned to install GCC on your raspberry.joske522 wrote:Hi guys,
I'm stuck![]()
Did everything in the wiki, but the last step gives me following error:
make: cc: Command not found
make: *** [HarmonyHubControl.o] Error 127
This happens when I execute: make HarmonyHubControl
Any ideas how I can work around this?
Thanks!
Is this on the pi mate?...glad to hear it works for you.im having no luck with native support thoughjoske522 wrote:Allright, it worked with the native support in the beta build!![]()
Thanks guys! I tried installing the GCC first but my head started spinning and I don't really know which procedure to folluw with all the different builds and versions...
Do I need it for something else?
Thanks!
Domoticz should update the switch when using the remote. Take a look at the wiki page again.gb160 wrote:Is this on the pi mate?...glad to hear it works for you.im having no luck with native support thoughjoske522 wrote:Allright, it worked with the native support in the beta build!![]()
Thanks guys! I tried installing the GCC first but my head started spinning and I don't really know which procedure to folluw with all the different builds and versions...
Do I need it for something else?
Thanks!seems to work ok for about two or three switches
Which beta version are you using ?
I've had to revert to the old method, it's very reliable, only drawback is that domoticz doesn't update if I switch the harmony from the remote, I can live with it though...I'd really like to get this native support working though.