Jump to content


Photo
* * * * * 2 votes

HAI and the iPAD


  • Please log in to reply
458 replies to this topic

#376 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 05 December 2011 - 06:52 PM

Lupinglade:
I just finished installing and doing basic programming on my Lutron RadioRa2 system and have integrated the switches into HAI. The RA2 system allows you to program Phantom Buttons (which are virtual button useful for programming in HAI). HAI purports to recognize these Phantom Buttons as scenes. However, I can't seem to find these scenes/Phantom Buttons on Haiku. As a backup, I've gone ahead and created "buttons" in HAI and programmed it where if the HAI button is pressed, the Phantom Button is "pressed". These show up on Haiku and work just fine. However, it's a bit of a roundabout way of accomplishing what I believe is built in. Am I missing something?


I'll look into adding support for the Phantom buttons. The main issue is there is really no way to get a listing of them from the controller with names or anything like that. That is why its not currently supported. It would just be a hard coded list of numbered buttons that you can rename at best.

#377 SHRemote

SHRemote

    Cocooner

  • Registered
  • PipPip
  • 51 posts

Posted 05 December 2011 - 08:46 PM


I'll look into adding support for the Phantom buttons. The main issue is there is really no way to get a listing of them from the controller with names or anything like that. That is why its not currently supported. It would just be a hard coded list of numbered buttons that you can rename at best.

I was going to ask whether the problem had to do with the fact that you can't name them but only describe them. It would be a nice feature, but I'm probably OK for now with the button work around.

#378 mdpeterman

mdpeterman

    Cocooner

  • Registered
  • PipPip
  • 17 posts

Posted 07 December 2011 - 01:38 AM


Sure, its quite simple:

function onButtonActivate(button) {
	helper.sendNotification(controller, 'Button ' + button.bestDescription() + ' Pressed');
 
	if(button.name() == 'Goodbye') { // If we push the goodbye button...
		var someUnit = controller.unitWithName('Some Unit'); // The unit you want to work with -- you can also do .unitWithNumber(555) if you prefer
		if(someUnit.isOn()) { // Check if 'Some Unit' is on...
			someUnit.off(); // Turn 'Some Unit' off.
		}
	}
}


Excellent! Thank you!
Now one question. When I press a button, instead of getting the button name in the push notification, I get the number instead. Is there a way to get the name that the button has assigned to it to display in the notification? The controller of course knows the names so should HH pick that up with the button.bestDescription() but just doesn't?
Thanks!

#379 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 07 December 2011 - 01:47 AM

Add:

function onConnect(controller) {
    controller.refreshButtons();
}

And disconnect/reconnect the controller in HaikuHelper's Preferences->Settings section.

Once the next HaikuHelper update comes out, change onConnect(controller) to onRefreshConfig(forced)

Edited by lupinglade, 07 December 2011 - 11:46 AM.


#380 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 08 December 2011 - 01:27 AM

Here's a little sample of what's possible with the logging feature and a bit of PHP:

Graph generated from HaikuHelper stats logging script

Edited by lupinglade, 08 December 2011 - 01:30 AM.


#381 Desert_AIP

Desert_AIP

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1120 posts
  • Location:Washington
  • Experience:average
  • Hardware:HAI OmniPro II, Ocelot, RUC-01
  • Tech:X10-PLC, UPB, ZigBee, Custom
  • Audio:HAI
  • CCTV:ip, dvr
  • Phone:POTS

Posted 08 December 2011 - 01:23 PM

lupinglade, you're gonna force me to buy a Mac...:)

#382 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 08 December 2011 - 01:28 PM

lupinglade, you're gonna force me to buy a Mac... :)


Haha :) Oh there is more coming, the next HaikuHelper update is pretty big.

#383 jaydubb1

jaydubb1

    Cocooner

  • Registered
  • PipPip
  • 78 posts
  • Hardware:HAI OmniPro II
  • Tech:Z-Wave
  • Audio:Nuvo
  • Video:Custom
  • CCTV:analog, ip

Posted 08 December 2011 - 08:57 PM

Wow... very impressed with Haiku!

#384 SHRemote

SHRemote

    Cocooner

  • Registered
  • PipPip
  • 51 posts

Posted 08 December 2011 - 09:09 PM

lupinglade, you're gonna force me to buy a Mac... :)

I know the feeling. I've always loved Macs (in fact I was given a first generation Mac for graduation in June 1984) but haven't had one for years having felt the need to switch to PCs. Powerful is the Dark Side. Anyway, this gives me an excuse to pony up a little extra money and get another mac. I've got my eye on the Mac Mini.

#385 heffneil

heffneil

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 295 posts

Posted 11 December 2011 - 07:53 PM

I have a question is there some way to get the event logs and then have haiku helper email them somewhere?

Thanks!

Neil

#386 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 11 December 2011 - 11:07 PM

Sure, load them with controller.refreshEvents() then use controller.events() to read them (see Event.bestDescription()). Finally, email using helper.mail(). Let me know if you need an example.

#387 Misterjenkins

Misterjenkins

    Newbie

  • Registered
  • Pip
  • 3 posts

Posted 11 December 2011 - 11:32 PM

Could anyone recommend a good 16 channel cctv dvr that works well with haiku?

Alternatively, I just got an everfocus brand dvr and can't figure out the Mjpeg URL. If anyone has a guess, I'd appreciate it.

Very happy with haiku, by the way.

Thanks

#388 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 11 December 2011 - 11:45 PM

@Misterjenkins: It looks like you can get the MJPEG image URL by going to http://dvr-address/m/live.htm

View source at this address and get the URL that points to the MJPEG stream itself and enter that into Haiku.

Any MJPEG output stream capable DVR should work fine.

Edited by lupinglade, 11 December 2011 - 11:47 PM.


#389 Misterjenkins

Misterjenkins

    Newbie

  • Registered
  • Pip
  • 3 posts

Posted 12 December 2011 - 12:21 AM

Thx. I've looked at the source but I must be missing something. Maybe it is not truly Mjpeg?

Can I pm you with the URL?

#390 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 12 December 2011 - 12:41 AM

Another new feature coming in the subsequent HaikuHelper update, AppleScript control:

Controlling iTunes via AppleScript

function onButtonActivate(button) {
  if(button.name() == 'iTunes Play') {
	helper.executeAppleScript(controller,'tell application "iTunes" to play');
  } else if(button.name() == 'iTunes Pause') {
	helper.executeAppleScript(controller, 'tell application "iTunes" to pause');
  } else if(button.name() == 'iTunes Prev') {
	helper.executeAppleScript(controller, 'tell application "iTunes" to skip to previous track');
  } else if(button.name() == 'iTunes Next') {
	helper.executeAppleScript(controller, 'tell application "iTunes" to skip to next track');
  }
}

This will let you control iTunes using a few simple named buttons on the controller, for example. You can control almost any application using AppleScript.

Edited by lupinglade, 12 December 2011 - 05:44 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users