Vehicloud - Monitoring our city

We aim to elaborate a complete IoT solution allowing the cartography of different data points related to mobility and pollution in cities.

IntermediateWork in progress81
Vehicloud - Monitoring our city

Things used in this project

Story

Read more

Schematics

NodeRed flow

This NodeRed flow is an exemple of how data could be displayed on a real time map. Here we use NodeRed dashboard UI.

Data displayed on worldmap

We use a colored circle to represent tempereture levels. Other collected data are access by a clic on the marker

Electrical Schematic

The following schematic respresent the connection made on the ESP82

Code

Java Monitor Application

Java
Java Monitor Application to connect the MN data to the IN automatically. Must run in the background.
No preview (download only).

NodeRed flow

JSON
This allows to recover content instance into NodeRed. It gives an exemple of data displaying on an interactive worldmap through NodeRed dashboard UI.
[
    {
        "id": "dd297781bf834b3d",
        "type": "tab",
        "label": "dataDisplayV2",
        "disabled": false,
        "info": ""
    },
    {
        "id": "3e0316be8167e353",
        "type": "ui_worldmap",
        "z": "dd297781bf834b3d",
        "group": "02b363b8ed4a7c9e",
        "order": 2,
        "width": 0,
        "height": 0,
        "name": "",
        "lat": "43.6",
        "lon": "1.444",
        "zoom": "",
        "layer": "OSM",
        "cluster": "",
        "maxage": "",
        "usermenu": "show",
        "layers": "show",
        "panit": "false",
        "panlock": "false",
        "zoomlock": "false",
        "hiderightclick": "true",
        "coords": "none",
        "showgrid": "false",
        "allowFileDrop": "false",
        "path": "/worldmap",
        "mapname": "",
        "mapurl": "",
        "mapopt": "",
        "mapwms": false,
        "x": 900,
        "y": 400,
        "wires": []
    },
    {
        "id": "8814355015128579",
        "type": "function",
        "z": "dd297781bf834b3d",
        "name": "cercle_bleu",
        "func": "disp = {\n    \"name\": \"cercle\",\n    \"lat\": msg.lat,\n    \"lon\": msg.lon,\n    \"radius\": 15,\n    \"color\": \"#000000\",\n    \"fillColor\": \"#0000ff\",\n    \"fillOpacity\": 1,\n    \"layer\": \"layerCircle\",\n};\nmsg.payload = disp;\nmsg.disp_temp = disp;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 260,
        "wires": [
            [
                "3e0316be8167e353",
                "eeb6c46259cba29a",
                "1efa848b8fabf708"
            ]
        ]
    },
    {
        "id": "5527bf86bb84337a",
        "type": "inject",
        "z": "dd297781bf834b3d",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            },
            {
                "p": "memory",
                "v": "payload",
                "vt": "msg"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "date",
        "x": 100,
        "y": 40,
        "wires": [
            [
                "4e03c63f18eef894"
            ]
        ]
    },
    {
        "id": "659505bbac1c1032",
        "type": "function",
        "z": "dd297781bf834b3d",
        "name": "cercle_jaune",
        "func": "disp = {\n    \"name\": \"circle\",\n    \"lat\": msg.lat,\n    \"lon\": msg.lon,\n    \"radius\": 15,\n    \"color\": \"#000000\",\n    \"fillColor\": \"#ffff00\",\n    \"fillOpacity\": 1,\n    \"layer\": \"layerCircle\",\n};\nmsg.payload = disp;\nmsg.disp_temp = disp;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 320,
        "wires": [
            [
                "3e0316be8167e353",
                "eeb6c46259cba29a"
            ]
        ]
    },
    {
        "id": "24dc3fe4bd9ab732",
        "type": "function",
        "z": "dd297781bf834b3d",
        "name": "cercle_rouge",
        "func": "disp = {\n    \"name\": \"circle\",\n    \"lat\": msg.lat,\n    \"lon\": msg.lon,\n    \"radius\": 15,\n    \"color\": \"#000000\",\n    \"fillColor\": \"#0000ff\",\n    \"fillOpacity\": 1,\n    \"layer\": \"layerCircle\",\n};\nmsg.payload = disp;\nmsg.disp_temp = disp;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 380,
        "wires": [
            [
                "3e0316be8167e353",
                "eeb6c46259cba29a"
            ]
        ]
    },
    {
        "id": "27ea03e60399ad24",
        "type": "function",
        "z": "dd297781bf834b3d",
        "name": "flechehaut",
        "func": "disp = {\n    \"name\": \"fleche\",\n    \"lat\": msg.lat,\n    \"lon\": msg.lon,\n    \"heading\": 0,\n    \"speed\": 0,\n    \"icon\": \"arrow\",\n    \"color\": \"red\",\n    \"layer\": \"layerArrow\",\n    \"properties\":{\n        \"heure\": msg.hour,\n        \"minute\": msg.minute,\n        \"temperature\": msg.temp,\n        \"humidite\": msg.hum,\n        \"gaz\": msg.gaz\n    }\n};\nmsg.payload = disp;\nmsg.disp_arrow = disp;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 460,
        "wires": [
            [
                "3e0316be8167e353"
            ]
        ]
    },
    {
        "id": "eeb6c46259cba29a",
        "type": "change",
        "z": "dd297781bf834b3d",
        "name": "set last tempData",
        "rules": [
            {
                "t": "set",
                "p": "myData",
                "pt": "flow",
                "to": "temp",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 930,
        "y": 300,
        "wires": [
            []
        ]
    },
    {
        "id": "f1ad9ac76aeca827",
        "type": "function",
        "z": "dd297781bf834b3d",
        "name": "flechebas",
        "func": "disp = {\n    \"name\": \"fleche\",\n    \"lat\": msg.lat,\n    \"lon\": msg.lon,\n    \"heading\": 180,\n    \"speed\": 0,\n    \"icon\": \"arrow\",\n    \"color\": \"red\",\n    \"layer\": \"layerArrow\",\n    \"properties\":{\n        \"heure\": msg.hour,\n        \"minute\": msg.minute,\n        \"temperature\": msg.temp,\n        \"humidite\": msg.hum,\n        \"gaz\": msg.gaz\n    }\n};\nmsg.payload = disp;\nmsg.disp_arrow = disp;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 540,
        "y": 520,
        "wires": [
            [
                "3e0316be8167e353"
            ]
        ]
    },
    {
        "id": "886926a82aaf25fc",
        "type": "function",
        "z": "dd297781bf834b3d",
        "name": "flecheegal",
        "func": "disp = {\n    \"name\": \"fleche\",\n    \"lat\": msg.lat,\n    \"lon\": msg.lon,\n    \"heading\": 90,\n    \"speed\": 0,\n    \"icon\": \"arrow\",\n    \"color\": \"red\",\n    \"layer\": \"layerArrow\",\n    \"properties\":{\n        \"heure\": msg.hour,\n        \"minute\": msg.minute,\n        \"temperature\": msg.temp,\n        \"humidite\": msg.hum,\n        \"gaz\": msg.gaz\n    }\n};\nmsg.payload = disp;\nmsg.disp_arrow = disp;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 580,
        "wires": [
            [
                "3e0316be8167e353"
            ]
        ]
    },
    {
        "id": "64f77fbfb3ae0f6e",
        "type": "switch",
        "z": "dd297781bf834b3d",
        "name": "switch_temperature",
        "property": "temp",
        "propertyType": "msg",
        "rules": [
            {
                "t": "lt",
                "v": "10",
                "vt": "str"
            },
            {
                "t": "btwn",
                "v": "10",
                "vt": "num",
                "v2": "20",
                "v2t": "num"
            },
            {
                "t": "gt",
                "v": "20",
                "vt": "str"
            },
            {
                "t": "gt",
                "v": "myData",
                "vt": "flow"
            },
            {
                "t": "lt",
                "v": "myData",
                "vt": "flow"
            },
            {
                "t": "eq",
                "v": "myData",
                "vt": "flow"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 6,
        "x": 310,
        "y": 420,
        "wires": [
            [
                "8814355015128579"
            ],
            [
                "659505bbac1c1032"
            ],
            [
                "24dc3fe4bd9ab732"
            ],
            [
                "27ea03e60399ad24"
            ],
            [
                "f1ad9ac76aeca827"
            ],
            [
                "886926a82aaf25fc"
            ]
        ]
    },
    {
        "id": "8c45c8d34e08f730",
        "type": "debug",
        "z": "dd297781bf834b3d",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "lat",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1200,
        "y": 140,
        "wires": []
    },
    {
        "id": "470c03861e6065d1",
        "type": "debug",
        "z": "dd297781bf834b3d",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1190,
        "y": 60,
        "wires": []
    },
    {
        "id": "a4227ca764a5153b",
        "type": "function",
        "z": "dd297781bf834b3d",
        "name": "dataSorting",
        "func": "payload = msg.payload;\ntemp = msg.payload.obj.int[3].$.val;\nlat = msg.payload.obj.int[0].$.val;\nlon = msg.payload.obj.int[1].$.val;\nhum = msg.payload.obj.int[4].$.val;\ngaz = msg.payload.obj.int[2].$.val;\nhour = msg.payload.obj.int[5].$.val;\nminute = msg.payload.obj.int[6].$.val;\ndisp_temp = \"\";\ndisp_marker = \"\";\nmsg = {\"payload\":payload,\"lat\":lat,\"lon\":lon,\"temp\":temp,\"hum\":hum,\"gaz\":gaz,\"hour\":hour,\"minute\":minute,\"disp_temp\":disp_temp,\"disp_marker\":disp_marker};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 270,
        "y": 180,
        "wires": [
            [
                "64f77fbfb3ae0f6e",
                "111ff820e5c4737a"
            ]
        ]
    },
    {
        "id": "e8d94b1f38f04ce4",
        "type": "debug",
        "z": "dd297781bf834b3d",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "temp",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1200,
        "y": 180,
        "wires": []
    },
    {
        "id": "1efa848b8fabf708",
        "type": "debug",
        "z": "dd297781bf834b3d",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "disp_temp",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1180,
        "y": 100,
        "wires": []
    },
    {
        "id": "2908ef897bf3f703",
        "type": "Content Extractor",
        "z": "dd297781bf834b3d",
        "name": "Content Extractor",
        "x": 470,
        "y": 40,
        "wires": [
            [
                "948ab13d0d6b5f05"
            ]
        ]
    },
    {
        "id": "4e03c63f18eef894",
        "type": "Named Sensor Data",
        "z": "dd297781bf834b3d",
        "name": "vehicloudSensorla",
        "cseConfig": "e860d67e41fa0264",
        "aeConfig": "f8fa64100996d8fd",
        "cntName": "DATA",
        "cin": "la",
        "x": 270,
        "y": 40,
        "wires": [
            [
                "2908ef897bf3f703"
            ]
        ]
    },
    {
        "id": "948ab13d0d6b5f05",
        "type": "xml",
        "z": "dd297781bf834b3d",
        "name": "",
        "property": "payload",
        "attr": "",
        "chr": "",
        "x": 630,
        "y": 40,
        "wires": [
            [
                "a4227ca764a5153b"
            ]
        ]
    },
    {
        "id": "111ff820e5c4737a",
        "type": "function",
        "z": "dd297781bf834b3d",
        "name": "marker&info",
        "func": "disp = {\n    \"name\": \"marker\",\n    \"lat\": msg.lat,\n    \"lon\": msg.lon,\n    \"color\": \"red\",\n    \"layer\": \"layermarker\",\n    \"properties\":{\n        \"heure\": \"10h30\",\n        \"temperature\": msg.temp,\n        \"humidite\": msg.hum,\n        \"gaz\": msg.gaz\n    }\n};\nmsg.payload = disp;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 570,
        "y": 180,
        "wires": [
            [
                "3e0316be8167e353",
                "470c03861e6065d1",
                "e8d94b1f38f04ce4"
            ]
        ]
    },
    {
        "id": "137c3d8ad27a3f82",
        "type": "debug",
        "z": "dd297781bf834b3d",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "disp_arrow",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1180,
        "y": 220,
        "wires": []
    },
    {
        "id": "02b363b8ed4a7c9e",
        "type": "ui_group",
        "name": "Default",
        "tab": "cb11e1e0d0f3dcac",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "e860d67e41fa0264",
        "type": "CSE_CONFIG",
        "cse": "MN_CSE_Config",
        "poa": "http://localhost:8080",
        "cseId": "mn-cse",
        "cseName": "mn-name",
        "adminOriginator": "251e5c6c767f9a40"
    },
    {
        "id": "f8fa64100996d8fd",
        "type": "AE_CONFIG",
        "aeName": "vehicloudSensor"
    },
    {
        "id": "cb11e1e0d0f3dcac",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    },
    {
        "id": "251e5c6c767f9a40",
        "type": "ORIGINATOR_CONFIG",
        "originatorName": "admin",
        "originator": "admin:admin"
    }
]

Arduino Code + Java Code

Contains Arduino Code + Java Code for the vehicloud solution.

Credits

Baptiste Lerat

Baptiste Lerat

1 project • 2 followers
Ewan Mackay

Ewan Mackay

1 project • 1 follower
Florian Convert

Florian Convert

1 project • 2 followers
Abir Benazzouz

Abir Benazzouz

1 project • 2 followers
Grégoire HEBRAS

Grégoire HEBRAS

1 project • 0 followers
Andreas Kraft

Andreas Kraft

34 projects • 12 followers
IoT & connected home architect and developer. Ask me about oneM2M.
SeungMyeong Jeong

SeungMyeong Jeong

34 projects • 12 followers
Bob Flynn

Bob Flynn

32 projects • 13 followers
Miguel Angel Reina Ortega

Miguel Angel Reina Ortega

35 projects • 7 followers
Laurent Velez

Laurent Velez

18 projects • 6 followers
Samir Medjiah

Samir Medjiah

21 projects • 14 followers
Xavier Piednoir

Xavier Piednoir

26 projects • 6 followers
Wonbae Son

Wonbae Son

32 projects • 5 followers
안일엽

안일엽

17 projects • 1 follower
monteil

monteil

4 projects • 1 follower

Comments