Coder Social home page Coder Social logo

iotsharp / iotsharp Goto Github PK

View Code? Open in Web Editor NEW
935.0 46.0 224.0 34.35 MB

IoTSharp is an open-source IoT platform for data collection, processing, visualization, and device management.

Home Page: https://iotsharp.io

License: Apache License 2.0

C# 76.12% JavaScript 0.51% Dockerfile 0.15% Batchfile 0.03% TypeScript 7.27% Shell 0.02% HTML 0.02% Vue 14.84% SCSS 1.04%
visualization iot-platform iot-cloud iotsharp coap-server docker mqtt broker

iotsharp's Introduction

IoTSharp logo

Build status GitHub .NET Core build pages-build-deployment Building and Packaging Docker Cloud Build Status Docker Pulls GitHub all releases FOSSA Status star fork

IoTSharp is an open-source IoT platform for data collection, processing, visualization, and device management.

Here is a blessing for all users of this project

  • May you do good and not evil.
  • May you find forgiveness for yourself and forgive others.
  • May you share freely, never taking more than you give.

What databases are supported?

What time series databases are supported??

  • InfluxDB
  • IoTDB
  • TDengine
  • TimescaleDB
  • PinusDB
  • Relational databases are also supported, either single tables or sharding.

What EventBus Message Queue are supported?

  • RabbitMQ
  • Kafka
  • InMemory
  • ZeroMQ
  • NATS
  • Pulsar
  • RedisStreams
  • AmazonSQS
  • AzureServiceBus

What EventBus Store are supported?

  • PostgreSql,
  • MongoDB,
  • InMemory,
  • LiteDB,
  • MySql,
  • SqlServer

IoTSharp Demo

IoTSharp cloud

https://cloud.iotsharp.net/

doc

https://docs.iotsharp.net/

How to deploy?

How to configure?

IoTSharp.SDKs

  • IoTSharp.Sdk.Http IoTSharp.Sdk.Http
  • IoTSharp.Sdk.MQTT IoTSharp.Sdk.MQTT

IoTSharp-C-Client-Sdk

IoTSharp-C-client-Sdk is mqttt client, write by c;

https://github.com/IoTSharp/IoTSharp.Sdks.MQTT-C

paho.mqtt.c's demo

It' like IoTSharp-C-Client-Sdk, but is use paho.mqtt.c https://github.com/IoTSharp/IoTSharp.Edge.paho.mqtt.c

IoTSharp for nanoFramework

IoTSharp.Edge.nanoFramework is a nanoFramework's mqtt client , it run on STM32 !

https://github.com/IoTSharp/IoTSharp.Edge.nanoFramework

more info read https://www.cnblogs.com/MysticBoy/p/13159648.html or click https://www.nanoframework.net/

IoTSharp for RTthread Package

https://github.com/IoTSharp/iotsharp-rtthread-package

IoTSharp's ecosystem

  • IoTSharp.Sdk.Http IoTSharp.Sdk.Http Nuget
  • IoTSharp.Sdk.MQTT IoTSharp.Sdk.MQTT Nuget
  • MQTTnet.AspNetCore.Routing MQTTnet.AspNetCore.Routing Nuget
  • IoTSharp.EntityFrameworkCore.Taos IoTSharp.EntityFrameworkCore.Taos Nuget
  • IoTSharp.X509Extensions IoTSharp.X509Extensions Nuget
  • IoTSharp.Extensions.RESTful IoTSharp.Extensions.RESTful Nuget
  • IoTSharp.Extensions.QuartzJobScheduler IoTSharp.Extensions.QuartzJobScheduler Nuget
  • IoTSharp.Extensions.EFCore IoTSharp.Extensions.EFCore Nuget
  • IoTSharp.Extensions.BouncyCastle IoTSharp.Extensions.BouncyCastle Nuget
  • IoTSharp.Extensions.AspNetCore IoTSharp.Extensions.AspNetCore Nuget
  • IoTSharp.Extensions IoTSharp.Extensions Nuget

Contributing

PRs Welcome

If you would like to contribute, feel free to create a Pull Request, or give us Bug Report.

Contributors

This project exists thanks to all the people who contribute.

Donation

This project is an Apache 2.0 licensed open source project. In order to achieve better and sustainable development of the project, we expect to gain more backers. We will use the proceeds for community operations and promotion. You can support us in any of the following ways:

Community Support

If you encounter any problems in the process, feel free to ask for help via following channels. We also encourage experienced users to help newcomers.

公众号 QQ群63631741 微信群
企业微信群

dotNET China

DotNetChina

优秀开源社区

  • LinkWeChat LinkWeChat 是基于企业微信的开源 SCRM 系统,是企业私域流量管理与营销的综合解决方案。
  • IoTSharp IoTSharp 是一个 基于.Net Core 开源的物联网基础平台, 支持 HTTP、MQTT 、CoAp 协议
  • 流之云 信息化、数字化服务提供商
  • translate.js 网页自动翻译,页面无需另行改造,加入两行js即可让你的网页快速具备多国语言切换能力!
  • IoTGateway IoTGateway是一个基于.Net6.0 开源的物联网网关,通过可视化配置,轻松的连接到你的任何设备和物联网平台。

iotsharp's People

Contributors

280780363 avatar blueli0428 avatar ccliushou avatar david0718 avatar dependabot-preview[bot] avatar dependabot[bot] avatar deric0314 avatar geffzhang avatar iioter avatar jeremywu917 avatar jimojiangdahu avatar kkangert avatar kunyi avatar liumanduo avatar lyt-top avatar maikebing avatar masterchen avatar monksoul avatar oweqian avatar qc2168 avatar rennner avatar siaszhang avatar siaszhangjie avatar sunrise666s avatar think-ya avatar wacoom avatar wjs0509 avatar wq1234wq avatar wuliupo avatar xuejmnet 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  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

iotsharp's Issues

docker-compose 启动 rabbit_mongo_influx 创建设备失败

An error occurred while saving the entity changes. See the inner exception for details.\n ---\u003E System.InvalidCastException: Cannot write DateTime with Kind=Local to PostgreSQL type \u0027timestamp with time zone\u0027, only UTC is supported. Note that it\u0027s not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.

我提交过一次pr,源码启动已经解决了这个问题,可能docker镜像的版本没有合并?

        AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
        AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);

源码启动iotsharp,rabbit+mongo+influx 遥测数据写入influx失败

IoTSharp.Storage.InfluxDBStorage[0]
4e587702-fc6e-4239-aac3-4d1df0681635数据处理失败Method not found: 'Void RestSharp.RestClient.set_UserAgent(System.String)'.
System.MissingMethodException: Method not found: 'Void RestSharp.RestClient.set_UserAgent(System.String)'.
at InfluxDB.Client.InfluxDBClient..ctor(InfluxDBClientOptions options)
at InfluxDB.Client.InfluxDBClientFactory.Create(InfluxDBClientOptions options)
at InfluxDB.Client.InfluxDBClientFactory.Create(String connectionString)
at IoTSharp.Startup.<>c__DisplayClass5_0.b__23() in D:\Repos\IoTSharp\IoTSharp\Startup.cs:line 267
at Microsoft.Extensions.ObjectPool.DefaultObjectPool1.Create() at Microsoft.Extensions.ObjectPool.DefaultObjectPool1.Get()
at IoTSharp.Storage.InfluxDBStorage.StoreTelemetryAsync(RawMsg msg) in D:\Repos\IoTSharp\IoTSharp\Storage\InfluxDBStorage.cs:line 236

网关设备请求属性

目前只实现了直连设备属性请求支持, 网关设备请求子设备请求未实现。

IStorage InfluxDB

InfluxDB 1.0

- [ ] 存储数据
- [ ] 加载最新
- [ ] 按时间加载

InfluxDB 2.0

  • 存储数据
  • 加载最新
  • 按时间加载

使用docker-compose启动后报错,iotsharp退出139

使用docker-compose启动后报错,

iotsharp | at IoTSharp.Program.Main(String[] args) in /src/IoTSharp/Program.cs:line 20
iotsharp | Exception data:
iotsharp | Severity: ERROR
iotsharp | SqlState: 42704
iotsharp | MessageText: index "IX_DataStorage_Catalog_DeviceId_KeyName_DateTime" does not exist
iotsharp | File: tablecmds.c
iotsharp | Line: 1185
iotsharp | Routine: DropErrorMsgNonExistent
iotsharp exited with code 139

https://gitee.com/IoTSharp/IoTSharp/issues/I1VGU6

Warning: Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths.

Build at: 2022-06-18T16:38:48.121Z - Hash: 7d7682d06be0cd0d - Time: 73828ms

./src/styles.less.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].rules[0].oneOf[0].use[2]!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[8].rules[1].use[0]!./src/styles.less - Warning: Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths.
Invalid dependencies may lead to broken watching and caching.
As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior.
Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories).
Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories).
Globs: They are not supported. Pass absolute path to the directory as context dependencies.
The following invalid values have been reported:
 * "node_modules\\ng-zorro-antd\\code-editor\\style\\entry.less"
 * "node_modules\\ng-zorro-antd\\code-editor\\style\\index.less"
 * "node_modules\\ng-zorro-antd\\resizable\\style\\entry.less"
 * and more ...



GetHealthReport threw an exception when trying to get report from /healthz configured with name IoTSharp

  fail: HealthChecks.UI.Core.HostedService.HealthCheckReportCollector[0]
     GetHealthReport threw an exception when trying to get report from /healthz configured with name IoTSharp.
       System.Net.Http.HttpRequestException: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName') ([::]:80)
      ---> System.ArgumentException: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName')
         at System.Net.Dns.GetHostEntryOrAddressesCoreAsync(String hostName, Boolean justReturnParsedIp, Boolean throwOnIIPAny, Boolean justAddresses)
          at System.Net.Sockets.MultipleConnectAsync.StartConnectAsync(SocketAsyncEventArgs args, DnsEndPoint endPoint)
        at System.Net.Sockets.Socket.ConnectAsync(SocketAsyncEventArgs e, Boolean userSocket)
       at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ConnectAsync(Socket socket)
         at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP, CancellationToken cancellationToken)
       at System.Net.Http.HttpConnectionPool.DefaultConnectAsync(SocketsHttpConnectionContext context, CancellationToken cancellationToken)
        at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)
        --- End of inner exception stack trace ---
        at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)
        at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
       at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
       at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
      at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
     at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancel

BlockingCollection引发的asp.net core服务不能启动问题

简单改了下代码,还没有完全看完整个流程,所以不确定会不会引发其它问题

                        if (!_handler.IncomingMessages.TryTake(out message))
                        {
                            return;
                        }

                       // message = _handler.IncomingMessages.Take(cancellationToken);
                        if (message == null || cancellationToken.IsCancellationRequested)
                        {
                            return;
                        }

docker版Devices?customerId=接口查不到设备数据

“网关”设备添加成功,数据库中查看TenantId和CustomerId也正确,调用Devices获取客户的设备返回:

{"data":"00000000-0000-0000-0000-000000000000","code":10013,"msg":"The customer does not have any device"}

DTU透传数据上来,dtu算设备还是网关??

比如一个485的DTU,
下面接了6个modbus设备,站号1,2,3,4,5,6
{
"dev-name": "Token",
"poll-data": {
"设备1": "11.11",
"设备2": "2.22",
"设备3": "3.33",
"设备4": "-4.44",
"设备5": "2.22",
"设备6": "abcd1234efgh"
}
}

那么这个DTU是设备还是网关???
那么不管设备还是网关Token能不能自定义或者编辑修改????

按照步骤,linux里跑不起来,报错

centos里按照教程执行:
mkdir /var/lib/iotsharp/
cp ./* /var/lib/iotsharp/
chmod 777 /var/lib/iotsharp/IoTSharp
cp iotsharp.service /etc/systemd/system/iotsharp.service
sudo systemctl enable /etc/systemd/system/iotsharp.service
sudo systemctl start iotsharp.service
sudo journalctl -fu iotsharp.service

报错!!!:“failed at step USER spawning /var/lib/iotsharp/IoTSharp: No such process”

http://127.0.0.1:80/

>无法解决“BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=null”与“BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942”之间的冲突。正在随意选择“BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=null”。

无法解决“BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=null”与“BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942”之间的冲突。正在随意选择“BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=null”。

datastorage和telemetrydata中部分数据字段的是否应允许为空

以下字段默认为非空:
Value_Boolean、Value_Long、Value_DateTime、Value_Double
是否考虑设置为可空,同时实体类设置为类型bool?等。

解决问题:不同数据库的字段例如TIMESTAMP最小值可能不同,例如mysql就无法保存"0-0-0 0:0:0"
如果不允许为空,则必须设置一个值,反而更麻烦。

数据断面聚合

需求
一天内 一万条数据, 整合成一小时一条, 使用平均的方法, 或者每个小时的最后一条作为依据。
Task<List> LoadTelemetryAsync(Guid deviceId, string keys, DateTime begin, DateTime end, TimeSpan every, Aggregate aggregate);

注意
keys 为空则表示全部,
every 如果是 TimeSpan.Zero表示不适用。aggregate 也不会使用。

vue客户端不能运行

Describe the bug
最新代码运行 npm run serve报错

To Reproduce
npm run serve

Expected behavior
error: Unexpected trailing comma (comma-dangle) at src\views\user\Register.vue:306:6:
304 | 'state.passwordLevel'(val) {
305 | console.log(val)

306 | },
| ^
307 | },
308 | }
309 | </script>

error: Unexpected trailing comma (comma-dangle) at src\views\user\Register.vue:307:4:
305 | console.log(val)
306 | },

307 | },
| ^
308 | }
309 | </script>
310 | <style lang="less">

23 errors and 1 warning found.
23 errors and 1 warning potentially fixable with the --fix option.

@ ./src/config/router.config.js 542:13-544:30
@ ./src/store/modules/permission.js
@ ./src/store/index.js
@ ./src/core/directives/action.js
@ ./src/core/lazy_use.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.0.20:8000&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

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.