This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Jupiter System For gas tanks monitor
#1
Hello Dears,
I have Jupiter System for gas tanks, it uses HTTP GET and Response 
Is it possible to make an integration.

the documents attached.

BR,
.pdf   Wac_ERP_Interface_V1.0.25 October2019.pdf (Size: 519.51 KB / Downloads: 19)
Best Regards,
Reply
#2
Should be easy to do. Can provide real data output from the system and which data points you need?
Reply
#3
(08.12.2021, 13:10)admin Wrote: Should be easy to do. Can provide real data output from the system and which data points you need?

Thank you admin for the answer.
Right now I just need the answer, so the customer will confirm the installation of Jupiter system. 
we should read the analog values (Gas level in the tanks) and Alarms
BR,
Best Regards,
Reply
#4
Hello Admin
How to read these values CurrentLevelPercent, /MeterCounter, CombinedAlertStatus?
regards,
Best Regards,
Reply
#5
Adjust URL and all parameters as needed. The resulting sites table will have the data that you need.
Code:
url = 'http://192.168.1.1/WacMobileService/WebService1.asmx/GetWacStatuses?UserName=string&Password=string&GroupId=string&SubGroupId=string&bOnlyWithAlerts=string&RequiredAlertsBitmap=string&MaxResults=string'
data, err = require('socket.http').request(url)

log('result', data, err)

if not data then
  return
end

sites = {}

callbacks = {
  StartElement = function(p, tag)
    ctag = tag

    if tag == 'wSiteStatus' then
      site = { status = {} }
      state = 'site'
    elseif tag == 'wBulkStatus' then
      status = {}
      state = 'status'
    end
  end,
  EndElement = function(p, tag)
    ctag = nil

    if tag == 'wSiteStatus' then
      state = nil

      if site.SiteId then
        sites[ site.SiteId ] = site
      end
    elseif tag == 'wBulkStatus' then
      state = 'site'

      if status.BulkId then
        site.status[ status.BulkId ] = status
      end
    end
  end,
  CharacterData = function(p, value)
    value = value:trim()

    if #value == 0 or not ctag then
      return
    end

    if state == 'site' then
      site[ ctag ] = value
    elseif state == 'status' then
      status[ ctag ] = value
    end
  end
}

parser = require('lxp').new(callbacks)
parser:parse(data)
parser:close()

log(sites)
Reply


Forum Jump: