(Translated by https://www.hiragana.jp/)
GitHub - LAGonauta/opc-rest-api: Python Rest API using OpenOPC to provide direct API access for any os platform.
Skip to content

Python Rest API using OpenOPC to provide direct API access for any os platform.

License

Notifications You must be signed in to change notification settings

LAGonauta/opc-rest-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

HOW TO USE

import json, requests
payload = {"method": "read", "params": ["TAG1", "TAG2"]}
response = requests.get("http://IP:PORT/", payload, timeout=1)

values = json.loads(response.content)

# print TAG1 and TAG2
print(values(0)(1))
print(values(1)(1))

OPC Rest Api

Python Rest API using OpenOPC to provide direct API access for any OS platform. This proxy has to be installed on a Windows box with Python and OpenOPC installed to provide a API Gateway to other platforms.

Dependencies

This code is dependent on https://sourceforge.net/projects/openopc/files/ by Barry Barnreiter and Python 2.7

Installation

On your Windows server, install OpenOpc. Make sure that OpenOPC connects properly to your OPC Server. Documentation for OpenOPC on http://openopc.sourceforge.net/. Once OpenOPC is connected, download http2opc code above and drop it in your preferred diretory.

Usage

Run python main.py from the http2opc directory to start the API Daemon. Function documentation on http://headstation.com/archives/using-opc-rest-api/

Copyright

Copyright 2016 Headstation. (http://headstation.com) All rights reserved. It is free software and may be redistributed under the terms specified in the LICENSE file (Apache License 2.0).

About

Python Rest API using OpenOPC to provide direct API access for any os platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%