Giter Site home page Giter Site logo

iioter / iotgateway Goto Github PK

View Code? Open in Web Editor NEW
734.0 21.0 220.0 58 MB

A cross-platform IoT gateway based on .net6. Through visual configuration, you can easily connect to any of your devices and systems (such as PLC, barcode scanner, CNC, database, serial device, host computer, OPC Server, OPC UA Server, Mqtt Server, etc.), so as to interact with Thingsboard, IoTSharp or Your own IoT platform for two-way data communication. Provide a simple driver development interface; of course, edge computing can also be performed.

Home Page: http://iotgateway.net/docs/enterprise/intro/

License: MIT License

C# 67.36% HTML 3.17% Dockerfile 0.03% JavaScript 28.87% CSS 0.57%
iot iiot scada modbus gateway iotsharp thingsboard thingsboard-gateway s7 snap7

iotgateway's Introduction

IoTGateway

  • 用户名:admin 密码:iotgateway.net

基于.NET6的跨平台工业物联网网关

B/S架构,可视化配置

南向连接到你的任何设备和系统(如PLC、扫码枪、CNC、数据库、串口设备、上位机、非标设备、OPC Server、OPC UA Server、Mqtt Server等)

北向连接IoTSharpThingsCloudThingsBoard、华为云或您自己的物联网平台(MES、SCADA)等进行双向数据通讯

当然也可以进行边缘计算。

运行部署

| 发行包运行 | docker运行 | 源码运行 | 发布部署

社区

微信扫我进群 公众号 QQ群:895199932
qq wx qq

南向

  • 支持西门子PLC三菱PLCModbus欧姆龙PLCOPCUAOPCDAABPLCMT机床Fanuc CNC
  • 驱动支持扩展
  • 支持设备数据写入 set-variabl
  • 支持计算表达式
    express
  • 支持变化上传和定时归档 change-uploa

北向

  • iotsharp、thingscloud、thingsboard、华为云等第三方平台
  • 遥测、属性上传
  • RPC反向控制 rpc

服务

  • 内置Mqtt服务(1888,1888/mqtt),支持websocker-mqtt,直连你的MES、SCADA等 mqtt
  • 内置OpcUA(opc.tcp://localhost:62541/Quickstarts/ReferenceServer),你的设备也可以通过OPCUA和其他设备通信 opcua
  • 内置ModbusSlave(模拟设备),端口503

展示

  • Websocker免刷新 variables

  • 3D数字孪生Demo 3d

  • 支持接入web组态项目 scada scada-config

声明

  • 使用OPCUA协议请联系OPC基金会进行授权,产生一切纠纷与本项目无关
  • 我们接受并感谢资金以及任何方式的的赞助,但并不意味着我们会为您承诺或担保任何事情
  • 若你使用IoTGateway获利,我们希望你对IoTGateway是有贡献的(不限于代码、文档、意见建议或力所能及的赞助)
  • 严格遵循MIT协议
  • 企业版介绍点我

获得奖项(部分)

  • .NET20周年云原生开发挑战赛一等奖

  • Gitee 2022 GVP

  • OSC 2022 最火热**开源项目社区

企业客户(部分)

国家电网(电力)、**移动、歌尔股份(3C)、经纬纺机(央企上市)、BOSCH(汽车零部件)、凌坤智能(AGV)、容恒、卧晨、惠斯通、益信......

友情链接

ThingsCloud公有云

项目地址: https://www.thingscloud.xyz/ 概述: ThingsCloud 在设备和用户之间建立开箱即用的云平台和云应用,实现数据采集、实时控制、数据可视化、开放 API,构建灵活强大的物联网应用。

IoTClient通讯库

开源地址: https://github.com/zhaopeiym/IoTClient 概述: 这是一个基于.NET Standard 2.0物联网设备通讯协议实现客户端,包括主流PLC、Bacnet等。

致谢

Star、代码贡献、文档贡献和赞助是我持续更新的动力。

感谢贡献代码的各位:麦壳饼、谷草、老翁钓大鱼、dapeng17951、ccliushou、BenjaminChenGH、sugerlcc、wqliceman

打赏列表:

昵称 金额 时间
TerryHj 8.88 不可考证
Amengone 50 不可考证
xiaotuxing 66 20220520
华仔 28.88 20220524
Mr.Ethan 5 20220611
刘金平 50 20220712
农民也疯狂 600 20220725
. 10 20220725
Gary 50 20220808
. 200 20220902
匿名 20 20220908
浪上飞郑 10 20220915
SPA 50 20221119
iKuo 100 20221212
陶白白 100 20230109
Carrey 100 20230113
MC 400 20230114
LoveChina8888 6.66 20230121
guoke 200 20230207

打赏请留微信或QQ

微信 支付宝
wx-pay ali-pay

iotgateway's People

Contributors

280780363 avatar abdalamask avatar alinayaa avatar benjaminchengh avatar cancelpj avatar ccliushou avatar dapeng17951 avatar iioter avatar jimojiangdahu avatar maikebing avatar zhanghuang515 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iotgateway's Issues

从属设备如何通过iotgateway获取数据???

大佬,我想使用iotgateway推送数据到thingsboard,那在iotgateway中只能使用mqtt-client,但和iotgateway在一起的设备也想获取设备相关的参数值,使用[http://iotgateway.net/docs/iotgateway/mqtt 的主题没有获得消息,或者我的配置不对(文档写的不太明白),希望指点,求教了,各位大佬。

can't be built after recent update

The error:

Plugins\Drivers\DriverFanuc\Fanuc.cs(12,26,12,33): error CS0535: 'Fanuc' does not implement interface member 'IDriver.connect()'

编译报错

为 #line 指令指定的行号缺少或无效 WalkingTec.Mvvm.Mvc D:\iotgateway-master\WalkingTec.Mvvm\WalkingTec.Mvvm.Mvc\obj\Debug\net5.0\Razor\Views_CodeGen\Gen.cshtml.g.cs 114 活动
win10 64,.netcore 5.0 vs2019

bug:默认登录密码无法登录

复现步骤:构建master分支,生成解决方案后运行,输入用户名 admin 密码 00000 提示“无法登录”
image
image
LoginVM.cs 调试发现密码MD5和代码中 Utils.GetMd5String 的返回值不同
image
image

项目文档

大佬,你的项目文档域名没有备案

源代码启动的时候报错

源代码下载后启动调试出错,DeviceService.cs这个文件,第90行ConstructorInfo constructor = driver.Type.GetConstructor(types); 提示错误信息为:System.NullReferenceException:“Object reference not set to an instance of an object.”
另外,我想问一下这个项目是否可以建一个技术交流群,我本身也是在做智慧工厂这一块的,我也做了有几年了

变化上传改进

你好!我们是一家开源erp软件实施商,项目上有IIoT的需求,很高兴有你开源这么一款非常出色的IIot工业物联网网关,我在测试变化上传时遇到了一个问题,就是value不变化时,不上传,这是对的,但是它构成的多级json报文是上传的,这个也应该不上传,对吧?
以下为我的测试数据:
b'{"Modbus-Copy1":[{"ts":1655170338376,"devicestatus":0,"values":{"outQty":500}}]}'
b'{"Modbus-Copy1":[{"ts":1655170343380,"devicestatus":0,"values":{"outQty":500}}]}'
b'{"device":"Modbus-Copy1","id":"44743e54-9f2c-4134-aad0-c790040296c2","data":{"success":true,"description":null}}'
b'{"Value":400,"CookedValue":400,"Message":null,"StatusType":"Good","VarId":"f3a0a5fa-e9f7-4c33-b209-4b136241c907"}'
b'400'
b'{"Modbus-Copy1":[{"ts":1655170348381,"devicestatus":0,"values":{"outQty":400}}]}'
b'{"Modbus-Copy1":[{"ts":1655170353384,"devicestatus":0,"values":{"outQty":400}}]}'
b'{"Modbus-Copy1":[{"ts":1655170358385,"devicestatus":0,"values":{"outQty":400}}]}'
b'{"Modbus-Copy1":[{"ts":1655170363388,"devicestatus":0,"values":{"outQty":400}}]}'
b'{"Modbus-Copy1":[{"ts":1655170368390,"devicestatus":0,"values":{"outQty":400}}]}'
b'{"device":"Modbus-Copy1","id":"420f6a1f-a7e2-4dc3-840b-97fc12c3cb3c","data":{"success":true,"description":null}}'
b'{"Value":600,"CookedValue":600,"Message":null,"StatusType":"Good","VarId":"f3a0a5fa-e9f7-4c33-b209-4b136241c907"}'
b'600

0.8.0版本镜像启容器报错

:{"Message":"Application startup exception","{OriginalFormat}":"Application startup exception"}}
iotgateway | Unhandled exception. System.Exception: Could not resolve a service of type 'Plugin.DeviceService' for the parameter 'deviceService' of method 'Configure' on type 'IoTGateway.Startup'.

启动时报错

目前 我启动项目的时候 发现有个driver加载不了

info: Plugin.DriverService[0]
LoadDriverFiles Start
info: Plugin.DriverService[0]
LoadDriverFiles End,Count28
info: Plugin.DriverService[0]
LoadAllDrivers Start
fail: Plugin.DriverService[0]
LoadAllDrivers Error E:\CShapeProject\iotgateway\IoTGateway\bin\Debug\net6.0\drivers/net6.0\CNC.Fanuc.dll
System.IO.FileLoadException: Could not load file or assembly 'CNC.Fanuc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Plugin.DriverService.LoadAllDrivers() in E:\CShapeProject\iotgateway\Plugins\Plugin\DrvierService.cs:line 129
info: Plugin.DriverService[0]
LoadAllDrivers CNC.Fanuc.H.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers CNC.MTConnect.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers Mock.TcpClient.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers OPC.DaClient.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers OPC.UaClient.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers Other.Toledo.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers PLC.AllenBradley.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers PLC.MelsecMc.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers PLC.ModBusMaster.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers PLC.OmronFins.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers PLC.SiemensS7.dll OK
info: Plugin.DriverService[0]
LoadAllDrivers End,Count11

这里我是重新生成了解决方案,之后在vs2022的环境下运行,但是不明白为什么 在加载 \IoTGateway\bin\Debug\net6.0\drivers\net6.0\CNC.Fanuc.dll 的时候会出问题。

这个加载的失败会导致在调用西门子plc的时候 产生错误,没有办法获取 方法
我们后面的时候
期待得到您的回复

实际测试没有OPC-UA

软件版本:0.9.4
测试步骤:编译运行
发现问题:通讯配置-->配置组--->create--->设备 , 在这个里面找不到 OPC UA, 但是在网页里面就可以找到
image

image

西门子S7驱动使用ReadMultipleVars代替Read方法

目前逻辑是按照DeviceVariables循环串行读取,在个数多的情况下,性能会明显变慢
可以使用ReadMultipleVars方法批量读取数据加快响应,提高吞吐量

                var pageSize = plcPageSize;
                var pages = (ioarg.Count / pageSize) + 1;
                for (int pageIndex = 0; pageIndex < pages; pageIndex++)
                {
                    var source = ioarg.Skip(pageIndex * pageSize).Take(pageSize).ToList();
                    var items = source.Select(x =>
                    {
                        var dataItem = S7.Net.Types.DataItem.FromAddress(x.arg.Address);
                        return dataItem;
                    }).ToList();
                    plc.ReadMultipleVars(items);
                    for (int i = 0; i < source.Count; i++)
                    {
                        source[i].Value = items[i].Value;
                    }
                }

Nlog.Targets.Mqtt

开发Nlog Mqtt扩展,前端通过WebSocket Mqtt订阅系统日志进行调试

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.