PDA

View Full Version : How to get UNIT STATUS from Omin Pro II



rbh
July 26th, 2008, 01:12 PM
Using Girder 4.0.15 with HAI plugin 1.6.3 downloaded today on Vista SP1.

I have ALC lights turning on and off from NetRemote. Now I am trying to get Unit Status (message type 0x17) out of the Omni. I am referring to the Girder 4 HAI plugin manual.

Questions:

1. How to access the HAI object? When I look in the Girder variable display I don't see it there. Do I have to do something to make it appear?
I am trying a script with HAI:GetCommunicationStatus() and get the error

[string "MyHai.gml:\New\Scripting"]:3: attempt to call method `GetCommunicationStatus' (a nil value)

2. Will any of the HAI object methods Get Unit Status?

Mike C
July 27th, 2008, 12:02 AM
use the variable inspector to look at the hai object. i believe states are stored in the .Units table

rbh
July 28th, 2008, 07:24 PM
That's my problem.

"How to access the HAI object? When I look in the Girder variable display I don't see it there. Do I have to do something to make it appear?"

Mike C
July 28th, 2008, 08:26 PM
That's my problem.

"How to access the HAI object? When I look in the Girder variable display I don't see it there. Do I have to do something to make it appear?"


did you hit refresh after opening the variabe display?

otherwise it is working fine correct?

rbh
July 29th, 2008, 08:45 PM
Oops!

Didn't think of that.

Thanks!

Now I see HAI and the units. I expect I can find the names to attach to the units.
Thanks for the help. I will try some lua to hook unit status.

I am vaguely familiar with the HAI protocol as I wrote a Java driver for it about two years ago.

One other point.
If I look in the Lua console, I am getting messages:

LOG: HAI : 5 - Que Full

scrolling off the screen, about two a second. So the console is full of these messages.

What is happening there?

Mike C
July 29th, 2008, 09:12 PM
likely the connection to the console has been lost - at least something along those lines. you can change the loglevel to 0 to see more info (do it in the var. inspector).

as a side note: alot of what you want to do is probably all automate with the G5 device manager.