• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Batch or Bulk change discovered bacnet point device Names

    User help
    2
    5
    1.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • raylatbasixR
      raylatbasix
      last edited by raylatbasix

      I have over 400 points from about 45 different bacnet controllers that were discovered under one local bacnet ip device called "bacnet_network" using Mango 3.3.0. The issue is that I now have all of these points referring to their device name as "bacnet_network" instead of their actual bacnet device name (ie. VAV1). So when look at a list of points, the only thing that i can see is a column called "Device" that refers to the correct numerical bacnet device id for the particular device for a given set of bacnet points. I need to display the "friendly name" of the bacnet device, and not the device id.
      Example: I now have 45 points listed as "bacnet_network - zonetemp", where as I need them to display "VAV1 - zonetemp, VAV2 - zonetemp, etc.).

      It appears that I could open up each point individually, and change the device name to something other than the local bacnet device name of "bacnet_network", but that could be rather tedious, and prone to error. Any help on this would be appreciated. The funny thing is, when these points were initially discovered, Mango correctly indicated the correct "friendly" name of each parent bacnet device before I added their points to the system.

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        Hmm. Yes this can be automated, but there'd have to be some input that made it known to the program. For instance, if you had a table of named to device ids, like,

        1234,BACnet_Device_001
        1235,BACnet_Device_002
        

        you could have a script fix up the JSON for you, like this python script:

        import json
        
        mapping = {}
        mappingDef = open("/path/to/csvInPartOne.csv")
        for line in mappingDef :
          info = line.split(",")
          if len(info) < 2 :
            continue
          mapping[int(info[0])] = info[1]
        mappingDef.close()
        
        #Export the points from the data points tab of the edit data source page, 
        # or the whole source from the upper table on data sources page
        configFile = open("/path/to/exportedPoints.json")
        config = json.load(configFile)
        configFile.close()
        print(mapping)
        for dp in config["dataPoints"] :
          if dp["pointLocator"]["remoteDeviceInstanceNumber"] in mapping :
            dp["deviceName"] = mapping[dp["pointLocator"]["remoteDeviceInstanceNumber"]]
        
        outputFile = open("/path/to/output.json", "w+")
        outputFile.write( json.dumps( config, indent=4, sort_keys=False, separators=(",",": ")) )
        outputFile.close()
        
        1 Reply Last reply Reply Quote 0
        • raylatbasixR
          raylatbasix
          last edited by raylatbasix

          Thanks Phil. I'm not all that familiar using python scripts in Mango. In playing around a little, I've noticed that I can export these points to a CSV file. It seems to arrange the point data quite nicely. From there, it looks like I can easily update the Device Names a lot faster using excel. After making my Device name changes in the CSV, can I import this like I would a JSON file, and have it update the existing data point device names automatically? Or, do i need to stick to trying to modify this import using JSON.

          Thanks again for the help!

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            You should always do what makes the most sense to you! I can definitely complicate things sometimes.

            Yes you can import the CSV. You will need to import it on the old /emport.shtm page. There is a drop down in the import section to choose between JSON and CSV

            1 Reply Last reply Reply Quote 0
            • raylatbasixR
              raylatbasix
              last edited by

              Thanks Phil. I should be all set.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post