Announcement

Collapse
No announcement yet.

Problem with an AAG TAI8558

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kclark
    replied
    Been up and running for a half day now. All looks good!

    Thanks again Michael.

    Ken

    Leave a comment:


  • Michael McSharry
    replied
    I'll try a little different approach. Give V5.2.19 a try.

    Leave a comment:


  • kclark
    replied
    I agree, the AAG requires the Port Output Latch lower nibble to be set to ON (bits high). In other words the Latch has to be set to xFh. With x being the upper nibble control bits for the four relays. Using V5.2.18 I still get:

    Code:
    1/28/2007 4:12:47 PM   mcsTemperature Debug  SetDS2408 Channel 0, NewValue=240 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  LogDiscrete tbl3500000000A84229S, UseDatabase=True, databaseSchemaIsBeingChanged=False 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  Log Discrete INSERT INTO tbl3500000000A84229S (SampleDate,Discrete) SELECT #2007-01-28 4:12:47 PM# AS QT,0 AS Q1 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  ReadDS2408 Channel=0, FullValue=240, DC=`1, SensorIndex=0 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=1 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  SetDS2408 Channel 1, NewValue=240 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  ReadDS2408 Channel=1, FullValue=240, DC=`2, SensorIndex=1 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=2 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  SetDS2408 Channel 2, NewValue=240 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  ReadDS2408 Channel=2, FullValue=240, DC=`3, SensorIndex=2 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=3 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  SetDS2408 Channel 3, NewValue=240 
    1/28/2007 4:12:47 PM   mcsTemperature Debug  ReadDS2408 Channel=3, FullValue=240, DC=`4, SensorIndex=3
    By full value of 240 (F0h) it looks to me like the lower nibble is set low, not high.
    I confirm this by
    starting 1-wire viewer,
    setting the low nibble bits high (Latch = FFh),
    turning off 1-wire viewer,
    starting mcsTemperature,
    capturing the log above,
    stopping mcsTemperature,
    starting 1-wire viewer and noting that the Latch value is now F0h.

    I now understand what you are saying about my sunlight! Thanks.

    Ken

    Leave a comment:


  • Michael McSharry
    replied
    The DS2405/06 relay interface described on the MidonDesign site requires the Latch output to be set to OFF for the input side to function properly. Based upon your description it looks as if the AAG design expects it to be ON. I changed the DS2408 output init to set the Latch output to be ON for the 4 inputs. It is posted as V5.2.18.

    The Sunlight was a unitless device type. Index is also an unitless one. This means that no Y axis label will be produced for it on the trend charts. If you want a label then use one of the 4 user-defined types and you can select whatever label you want. If you do not need a lable then use index type.

    Leave a comment:


  • kclark
    replied
    Using V5.2.17, here's when it first sets up the board after turning on the DS9490. After this exchange the four pins p-0 through p-3 are pulled low.
    Code:
    1/27/2007 11:54:41 PM   mcsTemperature Debug  SetDS2408 Channel 0, NewValue=254 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  ReadDS2408 Channel=0, FullValue=254, DC=`1, SensorIndex=0 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  LogDiscrete tbl3500000000A84229S, UseDatabase=True, databaseSchemaIsBeingChanged=False 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  Log Discrete INSERT INTO tbl3500000000A84229S (SampleDate,Discrete) SELECT #2007-01-27 11:54:41 PM# AS QT,1 AS Q1 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=1 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  SetDS2408 Channel 1, NewValue=252 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  ReadDS2408 Channel=1, FullValue=252, DC=`2, SensorIndex=1 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  LogDiscrete tbl3500000000A84229S1, UseDatabase=True, databaseSchemaIsBeingChanged=False 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  Log Discrete INSERT INTO tbl3500000000A84229S1 (SampleDate,Discrete) SELECT #2007-01-27 11:54:41 PM# AS QT,1 AS Q1 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=2 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  SetDS2408 Channel 2, NewValue=248 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  ReadDS2408 Channel=2, FullValue=248, DC=`3, SensorIndex=2 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  LogDiscrete tbl3500000000A84229S2, UseDatabase=True, databaseSchemaIsBeingChanged=False 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  Log Discrete INSERT INTO tbl3500000000A84229S2 (SampleDate,Discrete) SELECT #2007-01-27 11:54:41 PM# AS QT,1 AS Q1 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=3 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  SetDS2408 Channel 3, NewValue=240 
    1/27/2007 11:54:41 PM   mcsTemperature Debug  ReadDS2408 Channel=3, FullValue=240, DC=`4, SensorIndex=3
    Then subsequent communication after changes are made to the setup:
    Code:
    1/28/2007 10:02:45 AM   mcsTemperature Debug  SetDS2408 Channel 0, NewValue=240 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  ReadDS2408 Channel=0, FullValue=240, DC=`1, SensorIndex=0 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=1 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  SetDS2408 Channel 1, NewValue=240 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  ReadDS2408 Channel=1, FullValue=240, DC=`2, SensorIndex=1 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=2 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  SetDS2408 Channel 2, NewValue=240 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  ReadDS2408 Channel=2, FullValue=240, DC=`3, SensorIndex=2 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=3 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  SetDS2408 Channel 3, NewValue=240 
    1/28/2007 10:02:46 AM   mcsTemperature Debug  ReadDS2408 Channel=3, FullValue=240, DC=`4, SensorIndex=3
    You lost your sunshine because there was no code behind the label. I had only implemented the Sunshine/HB solar sensor in xapmcs1Wire.
    So can you recommend a sensor type for the Solar Radiation data that comes from my weather station plugin - not 1-wire?

    Thanks,
    Ken

    Leave a comment:


  • Michael McSharry
    replied
    If you enable General Debug then the log output will show lines that contain

    SetDS2408 Channel

    each time the DS2408 is being controlled. It is done on a bit-by-bit basis that should corrrelate to HS device-to-device.

    In the original implementation of the multiio I wrote directly to the adapter and pushed bits to the devices registers. With the current implementation I use a library function to communcate with the DS2408 and now only use the bit-level control for the LCD Text.

    I did not see any init code that would set the registers unless perhaps it is the startup with HS device status being conveyed to the DS2408. Also, in case there is some init code for the LCD that is being exercised I also added a debug output to V5.2.17 whenever the DS2408 is being written via the apapter directly.

    You lost your sunshine because there was no code behind the label. I had only implemented the Sunshine/HB solar sensor in xapmcs1Wire.

    Leave a comment:


  • kclark
    replied
    Back to work for me!

    I had what appeared to be a very unstable 1-wire system so I put this project aside for a while to regroup. The whole 1-wire thing seemed so unstable I was going to find some other way to go about monitoring these data points. After looking at other options, I decided to give 1-wire a last try.

    To that end I got a new DS9490, pulled in new wire through a different route, bought some additional sensors from hobby-boards and got them running, and tested it connected to different computers and through different ports.

    The 1-wire network is now stable.

    The last thing to get working is the AAG.

    Michael, I may be the only person using this I/O board, so if it's not high on your priority list, I sure understand.

    But here's what I figured out.
    I monitored the Aag TAI8558 with the one wire viewer for a week with no problem. I switched it over to mcsTemperature and all the input port indicator leds came on. It looks as if you are sending low bits to the lower nibble of the output latch. This forces p0 through p3 low. Since the output of these pins in the 2408 is wire-ored with the opto-isolator inputs, pulling them low effectively blinds the inputs and they always show low. I think if you can just always 'or' the control bytes you send to the board with 0F, it should play nice. I know this may break other boards out there that use the 2408, so I understand if support for this board doesn't happen.

    And if you're in a giving mood, could I have my sunlight back?
    The first image shows what I had in 5.2.12. The second shows the lack of sunlight in 5.2.16
    Attached Files

    Leave a comment:


  • kclark
    replied
    I am happy to report that, pending more testing, the AAG is working! I tried just replacing the .exe but it insisted on re-adding all the 1-wire devices at higher device codes. So I had to delete the .ini and .mdb and start fresh.

    But ...

    On the Forecast page, the WeatherPLUG boxes are still permachecked. Though the ACCID field is acting normal again.

    Setting the Screen and Chart Dimensions from the web page, then going to the graph works. But if you then go back to the Display page and do a Save Changes, all the Screen Size settings (not just default) revert back to 600.

    Still no "sunlight" type available in the GUI. It's still there on the web page. [edit] Actualy it went away on the web page too. It was between the "Baro Trend" and "Switch" type in the drop down, but now htere is a hole there.

    Pressing the Select button on the Weather page still takes me to the trend page. What should it do?

    Thanks again,
    Ken
    Last edited by kclark; December 22, 2006, 03:26 PM.

    Leave a comment:


  • Michael McSharry
    replied
    Thank you for the feedback. I belive I have them all resolved in V5.2.16

    Leave a comment:


  • kclark
    replied
    Back from Vegas with a clearer head and empty pockets.

    I found my main problem. During my earlier setup attempts I had not pressed the "Create plugin house codes and devices". I thought that was optional and I wanted to pick the house code instead of letting HomeSeer assign it. Sorry for not catching this sooner.

    No more errors in the log, however I am still tracking down a few problems.

    My main problem - The AAG has four relays and four switches. When I change a relay, the displayed status of one of the switches changes and the relay status changes not.

    The following are some other OT things I have noticed. None are show stoppers but I thought you might like to know about 'em.

    On the Web interface Forecast page, the WeatherPLUG boxes are always checked. Unchecking doesn't stick. I looked in the .ini and it's set correctly there. It's just not reflected on the page. GUI is OK.

    Setting the default Client Screen Size from the web page doesn't stick. It always reverts to 600 even though the Client0="Default,X" .ini setting changes appropriately. The GUI reflects the change but it has no effect. The client windows are always displayed at the dimensions set in the first line of the Screen and Chart Dimensions table.

    Changes made to the ACCID field on the Forecast web page don't update the .ini file. In fact if you do a Save Changes from the Forecast web page, the ACCID is blanked on the web page and in the .ini file. GUI works the way it should.

    The GUI and web pages don't have the same choices for device type. For example I can only see "sunlight" from the web page. I can't find it in the GUI.

    Pressing the Select button on the Weather page takes me to the trend page. I'm not sure what's supposed to happen here. I probably have to set something up that I missed.

    Using IE 6.

    Thanks again for your great support!

    Ken

    Leave a comment:


  • kclark
    replied
    Michael,

    Just a quick FYI.

    In case you do any more on this in the next couple of days, I'm heading to Vegas with the spousal unit for some fast R&R. Time to refill the HA budget account. Be back Monday.

    If you don't make any progress, maybe then I should send you the AAG unit so you don't have to try to debug through me.

    Either way - TTFN.

    And thanks again for all your work on this excelent plugin!
    Ken

    Leave a comment:


  • kclark
    replied
    Originally posted by Michael McSharry
    There should be no need to delete devices. If this does not work then enable debug and control a relay.
    I shut down, replaced the .exe and restarted.
    No errors, but everything was the same as before (no on/off buttons for the relays).
    Shut down, deleted the .mdb and .ini and restarted.
    Set mcsTemperature to use the DS9x9x. Polled for the DS9x9x.
    All devices repopulated as type virtual.
    Went to sensor page and did a save.
    All devices got correct type.
    Still no on/off buttons for relays.

    So I guess the immediate problem is getting the buttons to appear so I can control a relay.

    One other little thing. I can't get the default client screen size to stick from the web page control. It sticks from the GUI, but doesn't have any affect on the display.

    If there is anything else I should do to test, please let me know.

    Thanks,
    Ken

    Leave a comment:


  • Michael McSharry
    replied
    There should be no need to delete devices. If this does not work then enable debug and control a relay.
    Attached Files

    Leave a comment:


  • kclark
    replied
    Okay, here's what I did and what happened.

    Closed HS.
    Replaced mcsTemperature.exe with new one.
    Started HS.
    Refreshing Status page and device status is bouncing around as before.
    Turning relays on/off changed the reported state of the switches (not the relays).
    Deleted all mcsTemperature devices from HS.
    Shut down HS.
    Deleted mcsTemperature.ini and mcsTemperature.mdb.
    Started homeseer.
    Changed some display related setup and enabled the DS9x9x.
    It detected the sensors, created the devices and database fields.
    Then started throwing errors:
    Code:
    12/11/2006 6:49:58 PM mcsTemperature SetupDS2408 on line 110 com.dalsemi.onewire.OneWireException: 1-Wire Adapter communication exception 
    12/11/2006 6:50:00 PM mcsTemperature SetupDS2408 on line 100 com.dalsemi.onewire.OneWireException: 1-Wire Adapter communication exception 
    12/11/2006 6:50:01 PM mcsTemperature SetupDS2408 on line 190 com.dalsemi.onewire.OneWireException: 1-Wire Adapter communication exception 
    12/11/2006 6:50:01 PM mcsTemperature GetDS2408 on line 280 com.dalsemi.onewire.adapter.OneWireIOException: Error during putByte(), echo was incorrect 
    12/11/2006 6:50:05 PM mcsTemperature SetupDS2408 on line 200 com.dalsemi.onewire.OneWireException: 1-Wire Adapter communication exception 
    12/11/2006 6:50:06 PM mcsTemperature SetupDS2408 on line 190 com.dalsemi.onewire.OneWireException: 1-Wire Adapter communication exception 
    12/11/2006 6:50:06 PM mcsTemperature GetDS2408 on line 280 com.dalsemi.onewire.adapter.OneWireIOException: Error during putByte(), echo was incorrect
    On HS device status page all device types showed as virtual.
    Went to mcsTemperature sensors page.
    All sensors were typed correctly.
    Pressed Save Setup Changes
    Went back to hs Status page - all sensors were typed correctly.
    mcsTemperature stopped throwing errors.


    No on/off buttons for the Relays
    Shut down HS and restarted
    Got these messages during startup
    Code:
    12/11/2006 6:57:17 PM mcsTemperature SetupDS2408 on line 110 com.dalsemi.onewire.OneWireException: 1-Wire Adapter communication exception 
    12/11/2006 6:57:17 PM mcsTemperature Discrete Data sample tbl3500000000A84229S discarded because database schema is being adjusted 
    12/11/2006 6:57:17 PM mcsTemperature Discrete Data sample tbl3500000000A84229S1 discarded because database schema is being adjusted 
    12/11/2006 6:57:17 PM mcsTemperature Discrete Data sample tbl3500000000A84229S2 discarded because database schema is being adjusted 
    12/11/2006 6:57:17 PM mcsTemperature Discrete Data sample tbl3500000000A84229S3 discarded because database schema is being adjusted 
    12/11/2006 6:57:17 PM mcsTemperature Discrete Data sample tbl3500000000A84229Y4 discarded because database schema is being adjusted 
    12/11/2006 6:57:17 PM mcsTemperature Discrete Data sample tbl3500000000A84229Y5 discarded because database schema is being adjusted 
    12/11/2006 6:57:17 PM mcsTemperature Discrete Data sample tbl3500000000A84229Y6 discarded because database schema is being adjusted 
    12/11/2006 6:57:17 PM mcsTemperature Last temperature sample recorded at 12/11/2006 6:55:59 PM
    Went to HS status page. Still no buttons for relays.
    Renamed sensors.
    No Buttons - unlike last build
    Shut down and restarted HS.
    No Buttons
    All AAG Switches and Relays show off - not the correct status.
    Non AAG sensors seem to be working properly

    Thanks again,
    Ken

    Leave a comment:


  • Michael McSharry
    replied
    There may be a few trys at this. See what the attached does.
    Last edited by Michael McSharry; December 12, 2006, 02:00 PM.

    Leave a comment:

Working...
X