Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

Опции темы Поиск в этой теме Опции просмотра
Старый 20.12.2017, 15:11   #1  
Blog bot is offline
Blog bot
24,022 / 809 (75) +++++++
Регистрация: 28.10.2006
gideonvos: GPS, IoT, Blockchain Integration to ERP

I’ve read a number of articles discussing how Blockchain could have a significant impact on Trade & Logistics, especially item tracking. Granted, Blockchain is not a requirement for shipment tracking, but it does deliver a number of benefits through being a shared, secure ledger that, depending on the network, could provide an automatic openness almost immediately. That is a vast improvement over building a custom customer and partner portal to query legacy backend systems.

Of course, there remains the problem of now having to integrate Blockchain into your legacy ERP system, a whole different level of headache. So, in this post I’m going to do a simple POC to simulate how easy, or hard, it would be to build an item tracking service using Ethereum Blockchain, add to that GPS tracking with temperature and humidity monitoring, and get that to your ERP system, in this case Microsoft Dynamics 365. I want to achieve that without modifying the ERP system in any way, by using Microsoft Flow, a PowerApp and Microsoft Common Data Service. The idea is that end users, customers or partners can use the PowerApp to monitor shipments and climate conditions in real-time. Supply-chain visibility every step of the way, basically.

To start, I built a simple IoT monitoring device around the Adafruit Huzzah. I’ll be using WiFi here, making a wild assumption that WiFi is available wherever this device goes. In the real world, GPRS or Loran might be more suitable, but I don’t have that available in my toolkit just yet and besides, this is an experiment only. I’ve added a low-cost GPS, DHT11 temperature and humidity sensor, and an LCD screen to show me what is happening without requiring connecting to my laptop via the serial interface. The basic IoT device is shown below, with GPS and DHT-11 working and transmitting data.

The C code for the IoT device is shown below. I do a POST to my Ethereum network of choice with hardcoded addresses, and embed the GPS coordinates and DHT11 state into the data portion of the Ethereum transaction. Addressing and data is entirely up to you; perhaps instead of hardcoding, this can all be read off an SD card.

<div style="background:#ffffff;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"> #include #include "TinyGPS++.h" #include #include #include #include #include #include #include "Adafruit_GFX.h" #include "Adafruit_SSD1306.h" #define SSID "WiFiSSID" #define PASS "mypassword" #define OLED_RESET LED_BUILTIN #define DHTPIN 12 #define DHTTYPE DHT11 TinyGPSPlus gps; DHT dht(DHTPIN, DHTTYPE); Adafruit_SSD1306 display(OLED_RESET); SoftwareSerial mySerial(13, 15); const char *gpsStream = "$GPRMC,045103.000,A,3014.1984,N,09749.2872,W,0.67,161.46,030913,,,A*7C\r\n" "$GPGGA,045104.000,3014.1985,N,09749.2873,W,1,09,1.2,211.6,M,-22.5,M,,0000*62\r\n" "$GPRMC,045200.000,A,3014.3820,N,09748.9514,W,36.88,65.02,030913,,,A*77\r\n" "$GPGGA,045201.000,3014.3864,N,09748.9411,W,1,10,1.2,200.8,M,-22.5,M,,0000*6C\r\n" "$GPRMC,045251.000,A,3014.4275,N,09749.0626,W,0.51,217.94,030913,,,A*7D\r\n" "$GPGGA,045252.000,3014.4273,N,09749.0628,W,1,09,1.3,206.9,M,-22.5,M,,0000*6F\r\n"; void setup() { Serial.begin(9600); dht.begin(); display.setCursor(0,0); display.begin(SSD1306_SWITCHCAPVCC, 0x3C); display.clearDisplay(); display.display(); display.setTextSize(1); display.setTextColor(WHITE); display.println("Connecting"); display.println("to"); display.println("WiFi..."); display.display(); WiFi.begin(SSID, PASS); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } display.clearDisplay(); display.display(); display.setCursor(0,0); display.println("EtherGPS"); display.println(""); display.display(); mySerial.begin(38400); // GPS delay(5000); // warm up GPS display.clearDisplay(); display.display(); display.setCursor(0,0); display.println("Scanning..."); display.display(); } void loop() { while (*gpsStream) if (gps.encode(*gpsStream++)) updateInfo(); } void updateInfo() { float h = dht.readHumidity(); float t = dht.readTemperature(); if (gps.location.isValid()) { display.clearDisplay(); display.display(); display.setCursor(0,0); display.println("Temp:" + String(t)); display.println("Hum:" + String(h)); display.println("Lat:" + String(; display.println("Lon:" + String(gps.location.lng())); display.display(); String data = "0x"; String deviceSerial = "3132333435"; // 12345 in HEX data = data + deviceSerial + "2c"; // comma String temp = String(t); String hum = String(h); String lat = String(; String lon = String(gps.location.lng()); byte buffer[255]={0}; //temp temp.getBytes(buffer, 255, 0); for (int i=0;i<span style="color:#333333;">
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
gideonvos: RFID + IoT + Ethereum Blockchain Blog bot DAX Blogs 0 26.11.2017 10:21
gideonvos: Dynamics AX RFID using IoT Blog bot DAX Blogs 0 08.09.2017 11:11
gideonvos: Routing WiFi-enabled IoT Devices Blog bot DAX Blogs 0 08.09.2017 11:11
gideonvos: IoT Dashboard in AX using Control Extensibility Blog bot DAX Blogs 0 08.09.2017 11:11
axforum blogs: Определение термина ERP и требования к ERP-системам Blog bot DAX Blogs 0 07.03.2012 18:12
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Часовой пояс GMT +3, время: 22:00.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.