Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SNMP Driver
#1
Simple Network Management Protocol (SNMP) Driver
Version 1.9

Description:

This driver controls devices using the Simple Network Management protocol. The driver is capable of communicating with any network device supporting SNMPv1 or SNMPv2. (SNMPv3 is not supported).

All configuration is done via an XML file located under MacroFileRoot\SNMP, when loading the driver you will be prompted for the filename. Please see the attached PDF file for information on how to build the XML file.

The driver supports polling of, writing commands to, and asynchronous SNMP traps from network devices. Multiple devices may be polled from a single driver instance, or you can run multiple driver instances. However, only one trap receiver may be configured per system on specific port (usually UDP 161). You can have multiple trap receivers in different driver instances on different ports.

Quote:Release Info
[indent]Version 1.0 - Original Version
Version 1.1 - Moved SNMP methods to separate Class
Version 1.2
  • SNMPDB Implementation
  • CQC Events for Traps
Version 1.3
  • SNMP Type Discovery
  • Critical Error Detection
Version 1.4
  • SNMP Version Configruation <SNMPVersion>
  • Logging of skipped fields during polling (Poll.SkipField, MED)
  • Automatically creates \\SNMP directory under MacroFileRoot
Version 1.5
  • Fixed Issue with leading “.” in OID in StaticTables
  • Fixed Issue with no initial poll after reload
Version 1.6
  • Fixed Issue with Nulls (0x00) in OctetStrings
  • Forced Poll on ReloadConfig
Version 1.7
  • Purge socket buffer on Error
  • Purge socket buffer before Send
  • Disable Critical Error Detection
  • Fixed CQCType Validation Issue
  • Added StaticTable Calc Index/Key Tokens
  • Added moniker token replacement in all parm values
  • Set ReloadConfig to Reload Driver
Version 1.8
  • Fixed IntervalFormat Mins=Moniker Bug
  • Moniker Repl now uses %(moniker) (was %(m))
Version 1.9
  • Version 1.9 Fixed - Malformed Tokens not triggering Loadfile exception (ConfigFile)
[/indent]
Default Fields
[indent]
  • SNMP_DebugMode - Boolean R/W - Turns on the driver's debug mode. This will output extensive information to a log file for troubleshooting purposes. See configuration guide for details. Use sparingly, this generates a lot of info.
  • SNMP_Filename - String R/W - The name of the configuration file. This can be changed and the driver reloaded using the SNMP_ReloadConfig field.
  • SNMP_Interval - Integer R/W - Default polling interval in seconds.
  • SNMP_ReloadConfig - Boolean R/W - Setting this to True will reload the driver/configuration.
[/indent]

Examples
[indent]I will be adding several examples and would also like to ask that other users to contribute their XML configuration files. They will be listed here.

[post=96467]APC Masterswitch 9210[/post]
APC Masterswitch AP9224 Vertical Mount Controller
[post=95875]APC UPS[/post]
Nortel Switches
Microsoft Windows
OpenWrt/Linux


[/indent]

Available in CQC 4.2.922+
[indent]
SNMP Driver Configuration Guide
[/indent]
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#2
just curious, but what home automationy type equipment uses snmp?
NOTE: As one wise professional something once stated, I am ignorant & childish, with a mindset comparable to 9/11 troofers and wackjob conspiracy theorists. so don't take anything I say as advice...
Reply
#3
APC UPS Example

Description
In this example I will show you how to manage an APC UPS. Usually you will need a management card for your APC UPS in order for it to support SNMP. The MIB used for APC UPS's is the Powernet MIB (also attached).

Installation
You will need to copy the XML file to the CQC\CQCData\MacroFileRoot\SNMP directory, and enter the location \\SNMP\APCUPS-SNMP.xml when loading the driver. Before loading you will need to change the <Device>AVUPS</Device> entry in the XML file to the name or IP Address of your UPS, and configure the <ReadCommunity> and/or <WriteCommunity> if it is not the defaults of public and private.

Sample Template
The template below assumes the driver's name is UPS

[Image: normal_UPS_Popup.PNG]


Attached Files
.zip   powernet3.4.3_mib.zip (Size: 50.75 KB / Downloads: 14)
.cqctmplpack   BlueGlass-Pop_AVUPS.CQCTmplPack (Size: 38 KB / Downloads: 3)
.zip   APCUPS-SNMP.zip (Size: 1.84 KB / Downloads: 24)
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#4
SomeWhatLost Wrote:just curious, but what home automationy type equipment uses snmp?

Lots of network equipment support SNMP, like router and switches, etc. Including those made by Linksys. Also, most operating systems support it, including Windows and Unix/Linux. My Epson projector and UPS support it as well.
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#5
Congrats on a great driver.

Although I have not used it yet, building a driver based on an already established comms system is common sense at its best.

Now to play with it with my switches, ups and router.

Mick
Reply
#6
znelbok Wrote:Congrats on a great driver.

Although I have not used it yet, building a driver based on an already established comms system is common sense at its best.

Now to play with it with my switches, ups and router.

Mick

This should also be the better way to talk to the MasterSwitch. That will probably be easier than debugging what's going on with the HTML scraping in some installs.
Reply
#7
Working on that right now. I need to ask some questions, do you want me to ask them here or in a new thread.

Mick
Reply
#8
znelbok Wrote:Working on that right now. I need to ask some questions, do you want me to ask them here or in a new thread.

Mick

You can ask them here...
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#9
This is for an APC Master Switch

I have set up two XML file's to get the system up time and system name, one for the Masterswitch and the other for my Nortel Baystack switches. The Nortel works fine and returns values accordingly, the MS does not.

I get a SendGet failed for some reason.

Log file and xml file are attached (the log file has some extra fields from my original set-up, but the results are the same.)

Here is the screen shot from the MIB Browser. The OID shown [at the top] is the system up time and the OID used in the xml file.

[Image: MIB_Screen.jpg]


Here are two shots of the SNMP setup for the Maserswitch. I will confess I do not know what they all mean, the Trap Receiver IP was originally 0.0.0.0 in all fields (with same results) and so I changed the IP to the test server which is where I had the CQC driver installed with no change.

Community access 3 & 4 were both originally set to disabled as well.

[Image: html1.jpg]
[Image: html2.jpg]

Any help appreciated

Thanks

Mick


Attached Files
.txt   CIDLogFileSnap.Txt (Size: 5.27 KB / Downloads: 3)
.txt   APCMS-SNMP1.xml.txt (Size: 947 bytes / Downloads: 5)
Reply
#10
znelbok Wrote:This is for an APC Master Switch
Mick

I haven't been able to get my Masterswitch to respond at all to SNMP, so I'm about to try checking the serial port connection to make sure SNMP is properly enabled.

Did your MS respond to the MIB browser outside of the driver?
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Monoprice Blackbird 4x4 HDMI Switcher - Driver request batwater 9 3,859 10-14-2017, 05:30 PM
Last Post: rtarver
  XBMC Driver wuench 419 110,104 07-02-2017, 11:04 AM
Last Post: Dean Roddey
  IMAP Email Driver whozeawhat 11 1,671 06-14-2017, 11:53 AM
Last Post: whozeawhat
  Which JVC Projector Driver indygreg 29 5,119 05-12-2017, 08:29 AM
Last Post: Dean Roddey
  Amazon Echo Hue Simulator Driver wuench 101 20,323 05-02-2017, 09:38 AM
Last Post: Dean Roddey
  SageTV Player V2 Driver chmilar 6 1,329 04-14-2017, 03:36 PM
Last Post: chmilar
  SageTV Driver George M 16 2,520 02-16-2017, 07:10 PM
Last Post: Dean Roddey
  ADA Suite 16 driver assistance zane 3 1,136 01-17-2017, 06:27 AM
Last Post: zane
  Sage Media Server driver (beta) Fonceur 696 116,024 01-06-2017, 05:34 PM
Last Post: Dean Roddey
  Need some help with developing a driver adamalli 11 2,161 01-02-2017, 07:00 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)