Haiku Using Amazon Alexa devices (Echo, Dot, Tap, etc.) with HAI

try this
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Disabled</key>
	<false/>
	<key>KeepAlive</key>
	<true/>
	<key>Label</key>
	<string>com.ha-bridge</string>
	<key>ProgramArguments</key>
	<array>
		<string>java</string>
		<string>-jar</string>
		<string>/Users/neilheuer/ha-bridge-master/target/ha-bridge-3.2.0.jar</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>StandardErrorPath</key>
	<string>/Users/neilheuer/ha-bridge-master/target/stderr</string>
	<key>StandardOutPath</key>
	<string>/Users/neilheuer/ha-bridge-master/target/stdout</string>
	<key>WorkingDirectory</key>
	<string>/Users/neilheuer/ha-bridge-master/target/</string>
</dict>
</plist>
 
Nah theres something else wrong fellas.  I had it running in the LaunchDaemons in the users Library folder.  But when I move it to the root version of Library (why there are two I don't get) it doesn't work.  That was my file.  I never had your file and I had the proper working directory...
 
Again to be clear:
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>HA-Bridge</string>
  <key>ProgramArguments</key>
  <array>
    <string>java</string>
    <string>-jar</string>
    <string>ha-bridge-3.2.1.jar</string>
  </array>
  <key>RunAtLoad</key>
  <true/> <!-- run the program at login -->
  <key>KeepAlive</key>
  <true/> <!-- run the program again if it terminates -->
  <key>WorkingDirectory</key>
  <string>/Users/neilheuer/ha-bridge-master/target</string>
</dict>
</plist>
 
Sort of running out of ways to help you here. If you have it working in your account's own library, then why are you trying to change it?  I keep suggesting a way to solve your issue, providing configuration files, but you continue to try to get things to run another way, which I'm unfamiliar with, so it's hard to help.  The issues you're having are all pretty confusing to me, so I'd probably just suggest you start using google to figure out whatever problem you're having.  Sorry for being terse, I don't know how to troubleshoot the issues you're having as this should be dead simple.
 
Mine works fine with the configuration I've provided.
 
There are two libraries because one causes the program to run in your own user account, the other runs as system, ala root.  The daemons directory starts things at boot time, while the Agents directory launches things at login time.
 
Running the service from /Library/LaunchDaemons shouldn't have any sort of permission issue as root is the user context.  If you're running it from /Users/neilheuer/Library/LaunchDaemons, and it works, that's fine.
 
If you're not good at CLI's, I'd continue to recommend you use LaunchControl http://www.soma-zone.com/LaunchControl/
 
Well IHF helped very much! He logged in to the box and straightened out some permissions issues and other stuff lurking in memory that we cleared out.  Thanks to all you guys for the help.  What a great community!
 
More than one thing was changed but the permissions (group, owner) on the plist were wrong. They needed to be (wheel,group). It was in a somewhat strange state in that it appeared that it was trying to start the bridge repeatedly but a launchctl unload failed to find the service. A reboot seemed to cure that. Not sure what else I changed (if anything), perhaps @heffnell can recall.
 
It was mostly permissions.  We did have something trying to restart but I had removed the file so the only way to really stop that absurd process / attempts was to reboot!
 
Question for those having this working: is it working reliably?  When I login to the Alexa website it says all my devices are offline.  I also noticed that when I use the Echo to turn on and off devices it will perform the property (however slow) but then responds that device isn't responding?
 
heffneil said:
Question for those having this working: is it working reliably?  When I login to the Alexa website it says all my devices are offline.  I also noticed that when I use the Echo to turn on and off devices it will perform the property (however slow) but then responds that device isn't responding?
Since I added mine as a service, it's been quite reliable.  The only time I've had issues is if my mini was doing an OS update and didn't reboot automatically - another piece of software didn't quit quickly enough and the box was at one of those "xxx didn't close, click here to reboot" insinuating it was on its way down but never got there, thusly killing the ha-bridge service.
 
So, if you own a HAI System (e.g. OP2), could someone outline the steps to get this up and running? Understand you need a HomeTroller Zee S2 Automation controller and an Amazon device, but what else and exactly how do you integrate with HAI? Thanks.
 
I find that since no longer adding devices it seems to be consistently reliable.  I don't know why sometimes my Echo would not work but the Dot would or the Tap.  Seems like things are solid and the only problem I have is remembering what I named certain devices :)
 
Back
Top