Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SNMP Driver
#71
A lot of SNMP devices just don't return a response if the OID, Community String, value, etc are wrong. That results in a timeout on the drivers side.

Try to write to it in the MIB browser, get it working there and then replicate those settings in the config file.
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#72
wuench Wrote:A lot of SNMP devices just don't return a response if the OID, Community String, value, etc are wrong. That results in a timeout on the drivers side.

Try to write to it in the MIB browser, get it working there and then replicate those settings in the config file.

I did see some differences in the community string values here and there, so I'll check into that....among other things Smile
Reply
#73
The device examples are great, but I reckon in a years time they awill be hard to find.

Can we start a new thread or maybe Dean could add them to the CQC web site like he has IR Repo's.

I reckon we need a repository for these sort of configurations so others dont have to re-invent the wheel.

Mick
Mykel Koblenz
Illawarra Smart Home
Reply
#74
I have been adding links in the first post...
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#75
Bugman Wrote:I did see some differences in the community string values here and there, so I'll check into that....among other things Smile

Wuench: Thanks for the tip on the community privilages.

I obtained 5 of these boxes and all had different read/write permissions associated. Now I know that firmware 1.1.0 and 1.1.1 are equally suitable for the SNMP driver. You just have to be careful how the Network Access is configured. In some cases it was Read only, so thus the Gets were fine, but the Sets (yes, I've been reading a lot on this lately), were failing.

While not an expert on these, I guess I'm "pretty" familiar with these units by now. At some point I'll need to undersand how to set these properly to avoid network breaches, as now they are wide open for testing purposes, but will be unplugged until needed, and configured.

Cheers,

Bugman
Reply
#76
Here is a config for the APC Masterswitch 9224 controller. This is a controller used to control one or more Masterswitch VM vertical mount power strips. I recently purchased one of these for my AV rack, it has 8 controllable switched outlets and also monitors the % amperage in use (20 amps max) and can take action in the event of an overload condition. Multiple powerstrips can be daisychained using the included cable and controlled via a single control box via Web/Telnet/SNMP. Also the controller is powered by the strip via the serial cable.

The config assumes you only have one power strip attached. Not sure what you will get with more than one as I only have one to test with.

[Image: ap9224_f_h_200x100.jpg]
[Image: ap9227_f_v_200x100.jpg]

[Image: normal_AVPower.png]


Attached Files
.zip   APC-AP9224.zip (Size: 694 bytes / Downloads: 4)
.zip   BlueGlass-Pop_AVPower.zip (Size: 30.13 KB / Downloads: 1)
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#77
Sometimes my APC S20's SNMP driver gets in a weird error state, then seems to magically fix itself. It shows this for a while in the log, then it goes away. Any idea how I track it down?

Thanks for any advice!
Code:
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for CalibrationDate
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for HighTransVolt
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for LowTransVolt
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for Alarm
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for AlarmTimer
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for MinReturnCapacity
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for Sensitivity
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for LowBattRunTime
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for ReturnDelay
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for ShutoffDelay
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for SleepTime
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for PowerOff
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for PowerOn
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for Sleep
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for Reboot
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for SimulatePowerFail
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for FlashAndBeep
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for Bypass
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for RunDiags
}
06/25 18:25:53-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-SendGet: Send Failed for Calibrate
}
Reply
#78
You could enable debug mode and try to capture more info. It will log a lot of info to a file.

If your lucky the device will be sending back an actual SNMP error message saying what is wrong, but a lot of devices don't do that these days as a poor man's form of security.

But your best bet is to catch it in the act and then try to hit it with iReasonings MIB browser, telnet to it, etc and try to narrow down if it is the driver, your PC, or the switch.
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#79
Alright it happened again this morning while I was watching, so I put it in debug mode and ran the device diagnostics and got one interesting result in the CQC log:
Code:
06/26 13:29:04-Automation, CQCServer, CQCDrv_Workstation-UPS_Thread1
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.110, Status/App Status
    Workstation-UPS-ProcessResponse: Unhandled Exception (MEng.System.CQC.Runtime.CQCDriverBase #7) - Value '0030 ' exceeds the limits for field $FailedWrite
}

When I searched for the '0030' value in the SNMP debug output, here's the surrounding area:
Code:
06/26/11 13:29:04.793 - Workstation-UPS-ProcessResponse: Card Field Updated OutputLoad = 29
06/26/11 13:29:04.793 - Workstation-UPS-Poll: -----------------------------------------------------------------
06/26/11 13:29:04.793 - Workstation-UPS-Poll: Field OutputStatus (15 of 38)
06/26/11 13:29:04.793 - Workstation-UPS-Poll: -----------------------------------------------------------------
06/26/11 13:29:04.793 - SNMPV2Eng.MemGet: OIDMap Lookup Succeeded for: OutputStatus
06/26/11 13:29:04.793 - SNMPV2Eng.MemGet: OID Type = Simple
06/26/11 13:29:04.793 - SNMPV2Eng.MemGet: Getting:OutputStatus OID=1.3.6.1.4.1.318.1.1.1.4.1.1.0
06/26/11 13:29:04.793 - SNMPV2Eng.Send: Sending Get 192.168.0.40:161 (public)
06/26/11 13:29:04.793 - SNMPV2Eng.Send: OID = 1.3.6.1.4.1.318.1.1.1.4.1.1.0
06/26/11 13:29:04.793 - SNMPV2Eng.Send: SNMP Version = 2
06/26/11 13:29:04.793 - GetResp: -----------------------------------------------------------------
06/26/11 13:29:04.840 - SNMPV2Eng.GetResp: From: 192.168.0.40(57 bytes)
06/26/11 13:29:04.840 - SNMPV2Eng.GetResp: Version:SNMPv2(1) Community:public
06/26/11 13:29:04.840 - SNMPV2Eng.GetPDU: PDUType:162(Response) RequestID:564245
06/26/11 13:29:04.840 - SNMPV2Eng.GetPDU: ErrorStatus:0(No Error) ErrorIndex:0
06/26/11 13:29:04.840 - GetResp: -----------------------------------------------------------------
06/26/11 13:29:04.840 - GetAllResp: -----------------------------------------------------------------
06/26/11 13:29:04.840 - SNMPV2Eng.GetAllResp: Variable # = 1
06/26/11 13:29:04.840 - SNMPV2Eng.GetAllResp: OID = 1.3.6.1.4.1.318.1.1.1.4.1.1.0
06/26/11 13:29:04.840 - SNMPV2Eng.GetAllResp: ValueType: 0x2 (Integer)
06/26/11 13:29:04.840 - SNMPV2Eng.CvtToStr: SNMP Syntax = Integer
06/26/11 13:29:04.840 - SNMPV2Eng.CvtToStr: Converted to: '0' (DEC)
06/26/11 13:29:04.840 - SNMPV2Eng.GetAllResp: Value = 0
06/26/11 13:29:04.840 - SNMPV2Eng.ProcResp: Process OutputStatus(0) Value: 0
06/26/11 13:29:04.840 - SNMPV2Eng.ProcResp: Encoding:DEC CQCType:STRING
06/26/11 13:29:04.840 - MathParse.MemCalc: No Calculation Found for OutputStatus/IN-1
06/26/11 13:29:04.840 - SNMP.XlatSNMPToCQC: Value Not Found.
06/26/11 13:29:04.840 - SNMPV2Eng.ProcResp: String Value = 0
06/26/11 13:29:04.840 - SNMPV2Eng.MemGet: Response Key: Index:0
06/26/11 13:29:04.840 - Workstation-UPS-ProcessResponse: String Field Updated OutputStatus = 0
06/26/11 13:29:04.840 - Workstation-UPS-ProcessResponse: Unhandled Exception (MEng.System.CQC.Runtime.CQCDriverBase #7) - Value '0030 ' exceeds the limits for field $FailedWrite
06/26/11 13:29:04.840 - Workstation-UPS-Poll: -----------------------------------------------------------------
06/26/11 13:29:04.840 - Workstation-UPS-Poll: Field DiagResults (16 of 38)
06/26/11 13:29:04.840 - Workstation-UPS-Poll: -----------------------------------------------------------------
06/26/11 13:29:04.840 - SNMPV2Eng.MemGet: OIDMap Lookup Succeeded for: DiagResults
06/26/11 13:29:04.840 - SNMPV2Eng.MemGet: OID Type = Simple
06/26/11 13:29:04.840 - SNMPV2Eng.MemGet: Getting:DiagResults OID=1.3.6.1.4.1.318.1.1.1.7.2.3.0
06/26/11 13:29:04.840 - SNMPV2Eng.Send: Sending Get 192.168.0.40:161 (public)
06/26/11 13:29:04.855 - SNMPV2Eng.Send: OID = 1.3.6.1.4.1.318.1.1.1.7.2.3.0
06/26/11 13:29:04.855 - SNMPV2Eng.Send: SNMP Version = 2
06/26/11 13:29:04.855 - GetResp: -----------------------------------------------------------------
06/26/11 13:29:04.871 - SNMPV2Eng.GetResp: From: 192.168.0.40(57 bytes)
06/26/11 13:29:04.871 - SNMPV2Eng.GetResp: Version:SNMPv2(1) Community:public
06/26/11 13:29:04.871 - SNMPV2Eng.GetPDU: PDUType:162(Response) RequestID:564246
06/26/11 13:29:04.871 - SNMPV2Eng.GetPDU: ErrorStatus:0(No Error) ErrorIndex:0
06/26/11 13:29:04.871 - GetResp: -----------------------------------------------------------------
06/26/11 13:29:04.871 - GetAllResp: -----------------------------------------------------------------
06/26/11 13:29:04.871 - SNMPV2Eng.GetAllResp: Variable # = 1
06/26/11 13:29:04.871 - SNMPV2Eng.GetAllResp: OID = 1.3.6.1.4.1.318.1.1.1.7.2.3.0
06/26/11 13:29:04.871 - SNMPV2Eng.GetAllResp: ValueType: 0x2 (Integer)
06/26/11 13:29:04.871 - SNMPV2Eng.CvtToStr: SNMP Syntax = Integer
06/26/11 13:29:04.871 - SNMPV2Eng.CvtToStr: Converted to: '1' (DEC)
06/26/11 13:29:04.871 - SNMPV2Eng.GetAllResp: Value = 1
06/26/11 13:29:04.871 - SNMPV2Eng.ProcResp: Process DiagResults(0) Value: 1
06/26/11 13:29:04.871 - SNMPV2Eng.ProcResp: Encoding:DEC CQCType:STRING
06/26/11 13:29:04.871 - MathParse.MemCalc: No Calculation Found for DiagResults/IN-1
06/26/11 13:29:04.871 - SNMPV2Eng.XlatSNMPtoCQC: Translate 1 to Ok.
06/26/11 13:29:04.871 - SNMPV2Eng.ProcResp: String Value = Ok
06/26/11 13:29:04.871 - SNMPV2Eng.MemGet: Response Key: Index:0
06/26/11 13:29:04.871 - Workstation-UPS-ProcessResponse: String Field Updated DiagResults = Ok
06/26/11 13:29:04.871 - Workstation-UPS-Poll: -----------------------------------------------------------------
06/26/11 13:29:04.871 - Workstation-UPS-Poll: Field DiagDate (17 of 38)
06/26/11 13:29:04.871 - Workstation-UPS-Poll: -----------------------------------------------------------------
06/26/11 13:29:04.871 - SNMPV2Eng.MemGet: OIDMap Lookup Succeeded for: DiagDate
06/26/11 13:29:04.871 - SNMPV2Eng.MemGet: OID Type = Simple
06/26/11 13:29:04.871 - SNMPV2Eng.MemGet: Getting:DiagDate OID=1.3.6.1.4.1.318.1.1.1.7.2.4.0
06/26/11 13:29:04.871 - SNMPV2Eng.Send: Sending Get 192.168.0.40:161 (public)
06/26/11 13:29:04.871 - SNMPV2Eng.Send: OID = 1.3.6.1.4.1.318.1.1.1.7.2.4.0
06/26/11 13:29:04.871 - SNMPV2Eng.Send: SNMP Version = 2
06/26/11 13:29:04.886 - GetResp: -----------------------------------------------------------------
06/26/11 13:29:04.902 - SNMPV2Eng.GetResp: From: 192.168.0.40(66 bytes)
06/26/11 13:29:04.902 - SNMPV2Eng.GetResp: Version:SNMPv2(1) Community:public
06/26/11 13:29:04.902 - SNMPV2Eng.GetPDU: PDUType:162(Response) RequestID:564247
06/26/11 13:29:04.902 - SNMPV2Eng.GetPDU: ErrorStatus:0(No Error) ErrorIndex:0
06/26/11 13:29:04.902 - GetResp: -----------------------------------------------------------------
06/26/11 13:29:04.918 - GetAllResp: -----------------------------------------------------------------
06/26/11 13:29:04.918 - SNMPV2Eng.GetAllResp: Variable # = 1
06/26/11 13:29:04.918 - SNMPV2Eng.GetAllResp: OID = 1.3.6.1.4.1.318.1.1.1.7.2.4.0
06/26/11 13:29:04.918 - SNMPV2Eng.GetAllResp: ValueType: 0x4 (OctetString)
06/26/11 13:29:04.918 - SNMPV2Eng.CvtToStr: SNMP Syntax = OctetString
06/26/11 13:29:04.918 - SNMPV2Eng.CvtToStr: Converted to: '06/26/2011' (ASC)
06/26/11 13:29:04.918 - SNMPV2Eng.GetAllResp: Value = 06/26/2011
06/26/11 13:29:04.918 - SNMPV2Eng.ProcResp: Process DiagDate(0) Value: 06/26/2011
06/26/11 13:29:04.918 - SNMPV2Eng.ProcResp: Encoding:ASC CQCType:STRING
06/26/11 13:29:04.918 - MathParse.MemCalc: No Calculation Found for DiagDate/IN-1
06/26/11 13:29:04.918 - SNMPV2Eng.ProcResp: String Value = 06/26/2011

Interestingly, this did not kick off the multitude of errors I've been seeing, just the one.

I think another user here has one of these also; i'll try to ping him or her about seeing anything similar.
Reply
#80
That's interesting, the only thing the driver does with that field is call the IncFieldWrite function when a user tries to update a field. That might be a CQC bug of some sort, maybe the FailedWrite field is wrapping or something? Where you changing a field?

What version of CQC are you on? And what version of the driver are you running?

EDIT: Actually, I see in the code where it would be failing, but it must be a bug with CQC. Below is the code fragment, I am calling WriteStringFldByName(OutputStatus, "0"). The write must be failing and CQC must be trying to increment the $FailedWrite field and that is throwing an exception, which I catch and move on.

Code:
Case CQCFldTypes.String:
   // Write String to Field and Return
   LogIt(LogMsgs.FldUpdate, "ProcessResponse", 3, "String",strName,strValue);
   WriteStringFldByName(strName, strValue);
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Issues debugging IP based driver jnolting 5 115 34 minutes ago
Last Post: Dean Roddey
  Enhance Driver Test Harness Field Monitor rbroders 1 5 1 hour ago
Last Post: Dean Roddey
  Koyo Click PLC Driver rbroders 75 26,610 Yesterday, 01:18 PM
Last Post: rbroders
  Carrier Infinity HVAC Driver beelzerob 34 12,274 09-07-2018, 01:15 PM
Last Post: lleo
  Amazon Echo Hue Simulator Driver wuench 113 35,731 09-02-2018, 07:24 AM
Last Post: TurboSam
  Sony TV IP driver dogman 10 704 08-01-2018, 03:53 PM
Last Post: znelbok
  Generic Modbus Driver - Serial & IP znelbok 24 10,904 07-20-2018, 01:21 PM
Last Post: znelbok
  Sony Bravia TV Driver znelbok 12 1,650 06-11-2018, 09:19 AM
Last Post: Dean Roddey
  XBMC Driver wuench 427 153,372 05-29-2018, 03:02 AM
Last Post: znelbok
  OpenHAB Driver whozeawhat 5 715 05-28-2018, 08:50 AM
Last Post: whozeawhat

Forum Jump:


Users browsing this thread: 1 Guest(s)