TGWは、駐車場管理システムの設計とソリューションを専門としています
Cities are getting smarter, and a vocal group of us hopes that the first issue they solve is traffic. And one cause of the headaches of traffic is parking. So, how do we solve it?
With smart parking meters!This tutorial demonstrates how to build a prototype of an IoT-enabled smart parking meter application using IBM Bluemix and PubNub. The app has three core functions:Showing the driver a realtime view of available and taken parking spotsAllowing the driver to reserve a parking spaceAutomatically tracking billing based on the drivers actions (like entering and leaving the parking space)Project Setup and Full Code RepoThis project is a great DIY experiment for IoT enthusiasts.
So if youre interested in trying it out, head over to GitHub for the complete source code of the bluemix-parking-meter project.Refer to the build instructions and readme file for detailed steps, right from configuring the hardware to hosting and running the application. For hosting this application, youll need to create a Bluemix and PubNub account.
Visit the IBM Bluemix signup page and PubNub add-on page to create your respective accounts. Both of the services offer a free tier account to play around with their offerings. ComponentsThere are three components of the application:Parking Management Server (PMS) monitors all the parking spaces and manages metering and billing for all users.
IoT hardware platform connects the parking spaces to PMS and also detects the presence or absence of a vehicle.Mobile App offers an easy interface to assist the driver to find a vacant space and manage his parking usage and billing. The hardware platform is powered by Arduino Yun and uses ultrasonic sensors to detect the presence or absence of a vehicle in a parking space.
The PMS is implemented as an application server running on Python. It keeps track of all the devices and manages billing and reservations. The Mobile App (also known as Auto Park) is a Cordova and JavaScript-based Android app.
The PMS application server is hosted on the IBM Bluemix cloud platform and the entire communication between PMS to hardware and PMS to the mobile app is powered by PubNubs Realtime Data Stream Network.HardwareThe following is the list of hardware components used for this project:Arduino YunHC-SR04 ultrasonic sensor (3 nos. )A sample setup on a breadboard is shown below:And the associated schematic diagram for the hardware circuit is below:There are three functional parts of the hardware:Master Controller The WiFi-enabled Arduino Yun acts as the master controller for controlling a few parking spaces.
It periodically monitors and gets the status of each parking space within its jurisdiction, via ultrasonic sensors. It also interfaces with PMS via PubNub and publishes the parking statusSensor Controller This is an internal component of Arduino Yun board, powered by ATMega32 chip. It directly interfaces with the sensors and runs a loop, every few seconds, to get the latest status of each sensorUltrasonic Sensor Three HC-SR04 sensors are used to simulate three parking spaces.
The source code for hardware setup is available under yun_pubnub directory (for master controller) and device/hcsr04 directory (for sensor controller) in the GitHub repository.Parking Management Server (IBM Bluemix)The PMS is written in Python and can be installed as an IBM Bluemix hosted service. IBM Bluemix provides the computing horsepower for the PMS to monitor hardware devices and manage parking metering and billing for the users.
Additionally, you will need to associate the PubNub add-on service with your IBM Bluemix account for the PMS to work with PubNub. Refer to the steps in README.md to understand how to setup and host a Python application under Bluemix with PubNub.
The source code for PMS is located under the parking-meter directory in the GitHub repository.Mobile AppThe mobile app is a standard Cordova based Android app. It displays a map of the parking area with color coded parking spaces to assist the user in choosing a vacant space.
The source code for the mobile app is located under MobileApp directory in the GitHub repository.PubNubPubNub acts as the communication middleware for the entire system. It provides a cloud-based realtime Data Stream Network which supports more than 70 SDKs, such that it can enable any device to communicate with any other device on the Internet.
This application uses three of PubNubs SDKs for all components to seamlessly communicate with each other. These are:Javascript SDK for the mobile appPython SDK for PMSPOSIX C SDK for the Arduino YunThis application relies on several PubNub channels to enable communication between the components, as depicted below:The private-channel in the above diagram refers to a dedicated channel between the PMS and one mobile app. All messages exchanged through the PubNub channels are in JSON format.
For every mobile app requesting for parking reservation, the PMS initiates messages through this channel for that particular mobile app. The significance of all the channels will be clarified in the next section.System Operation and ScenariosThe complete operation of this system can be divided into the following five scenarios.
Scenario 1: App InitializationWhen the mobile app is launched for the first time after installation, it asks for the license plate/registration number of the users vehicle. This acts as a unique identifier for the PMS to track the app for billing purposes.Subsequently, the app sends a request to the PMS to get the status of all the parking spaces.
This is used to display the map, where each space is identified with a slot number (001, 002 and 003). Here is how the message exchange takes place between the PMS and mobile app:The JSON request from the app contains a parameter RequestType with the value 1 to indicate a request for fetching the bulk status of all parking spaces. The JSON response from PMS contains the parking spaces slot number as the parameter and its status as either 0 or 1 , to indicate that the space is either vacant or occupied.
For the map display in the mobile app, parking spaces which are currently vacant are indicated as green, whereas the ones that are occupied or reserved are indicated as red.Scenario 2: Device Status UpdateWhenever the parking space detects presence or absence of a vehicle, it immediately signals the PMS.Here, 001 identifies the slot identification number of the space and the value 1 indicates that the parking space is occupied.
Alternately, a value of 0 indicates that the space is vacant. The PMS also relays this information on a global PubNub channel parkingapp-resp so that all apps can update their parking map display.Scenario 3: Reservation request & Billing StartA user approaching a vacant parking space can reserve it in advance by tapping on a desired vacant parking slot on the app.
This prompts the PMS to initiate a billing session for the user. PMS sends a message to the app on its private channel to initiate the start of billing. Along with this, PMS also starts a timer.
Here is a closer look at the format of JSON messages in this interaction:The parameter RequestType with a value 2 indicates a request for reservation
At this moment, the PMS stops the timer. Scenario 5: Billing StopLater, when the user pulls out his vehicle from the parking space, the hardware device again senses this and sends a status update to PMS indicating that the space is now vacant. Upon receiving this update, PMS calculates the bill for the user and sends a billing session stop message along with bill details to the mobile app via its private channel.
The JSON message received by the mobile app contains the parameters for the bill details:
In this case the user is charged with a minimum bill $10. Further, this application does not have any provision to authenticate the user during parking (as part of scenario 4), so as to ensure that the user who reserved the parking space is the one who actually parks his vehicle in that space. This is left as an exercise for the readers who would want to further enhance this application and make it feasible for a closer to real life deployment.
We had a great time building and playing with this application, and testing the end-to-end scenario was quite interesting considering that there are quite a few subsystems involved. Using IBM Bluemix & PubNub services greatly simplifies the developmental challenges as the developer can focus on the application logic without worrying about how to make the communication work between different subsystems. Apart from this, both the services are capable of handling massive scale which can be leveraged to build similar real world applications which require 247 uptime and thousands of random users coming in.
Originally published at all the latest advances and tech news sent directly to your inbox?. RELATED QUESTION I didn't get Google Glass Explorer Edition.
Is trying to learn Glass dev without the hardware a futile effort? No, you can still learn the fundamentals of Glass development without the hardware. There are three main approaches for accomplishing this: 1) Visit the Mirror API documentation, get into the playground, and start hashing up some code.
Download the PHP, Java, and Python library, whichever you're most comfortable with. Familiarize yourself with the jargon and converntions (timeline, bundles, menus, etc). Read the support documentation (second link below) to see how the Glass hardware actually functions.
Build some apps to this specification. Soon enough, you will find a friend with hardware to t
深センTigerWongテクノロジー株式会社
電話:86 13717037584
メール:
Info@sztigerwong.com
追加: ルーム601-605、ビル6、1980科学技術工業団地、 Longhua Street, Longhua District,深セン
{"site":{"site_id":2877,"site_type":1,"site_domain":"sztigerwong.com","domain_mode":2,"original_domain":"sztigerwong.com","language_code":"ja","is_init_domain":0,"is_shop":false,"is_ssl":0,"lang_prefix":"/ja","animate_name":"none","compress__ratio":"70,60,60","img__dpi":"true"},"page":{"page_id":773,"page_type":"ai_article_detail","page_code":423,"page_url":"/ai-article/a-diy-tutorial-for-building-an-smart-parking-meter.html","page_source":"","allowAnimat":0,"content_id":210,"content_type":5,"detail_thumb":"https://img.yfisher.com/1612246612273.jpg","detail_title":"A DIY Tutorial for Building an Smart Parking Meter","moq":1},"translateList":{"A new item has been added to your Shopping Cart":"あなたのショッピングカートに新しいアイテムが追加されました","account":"アカウント","Account Name":"アカウント名","Account Number":"口座番号","Account is not exists":"アカウントが存在しません","account security":"アカウントのセキュリティ","Active Commission":"現役委員会","Add a review on the product":"製品のレビューを追加する","Add to":"追加","Add to Cart":"カートに追加","address book":"住所録","affiliate links":"アフィリエイトリンク","all":"すべて","All Orders":"すべての命令","Already commented":"すでにコメントしています","Are you sure to cancel this withdrawal?":"この撤退をキャンセルしますか?","Are you sure to delete the selected items?":"選択したアイテムを必ず削除してください。","Are you sure you want to delete it?":"削除してよろしいですか?","Awaiting Payment":"支払いを待っている","Awaiting Shipment":"出荷待ち","Back":"戻る","Bank Transfer":"銀行譲渡","bank address":"銀行住所","basic information":"基本情報","Buy":"買う","Buy Now":"今買う","bank name":"銀行名","city":"市","Copy successful":"成功しました","Copy failed":"コピーが失敗しました","Can Extract":"抽出できます","Currency Type":"通貨タイプ","Cancel":"キャンセル","Cancel the success":"成功をキャンセルします","Cancelled":"キャンセル","Choose a country":"国を選ぶ","Choose Coupon":"クーポンを選ぶ","Choose items":"アイテムを選択します","Clear":"クリア","Clear Search":"クリア検索","Comment Successful!":"コメントが成功しました!","Comment Failed!":"コメントが失敗しました!","Commission Details":"委員会の詳細","Commission":"手数料","Commission Status":"委員会のステータス","commodity payment":"商品の支払い","completed":"completed","Completed":"完了しました","Condition not met":"条件が満たされない","Confirm":"確認","Confirm password is inconsistent with new password":"パスワードの確認は新しいパスワードと矛盾しています","Congratulations":"おめでとう","Congratulations! You are got a coupon.":"おめでとう!あなたはクーポンを持っています。","Congratulations! You are got all coupons.":"おめでとう!あなたはすべてのクーポンを持っています。","Continue":"継続する","Continue Shopping":"ショッピングを続ける","Copy the code and use it directly in the shopping cart.":"コードをコピーしてショッピングカートで直接使用してください。","Country":"国","Coupon code":"クーポンコード","Coupon List":"クーポンリスト","Date":"日にち","days after receiving":"受け取ってから数日","Design customization":"デザインカスタマイズ","Do not use any discount":"割引を使用しないでください","Earliest":"早く","Export successful":"エクスポートが成功しました","Export failed":"エクスポートは失敗しました","email":"Eメール","email format does not match":"電子メール形式が一致しません","Estimated Delivery Time":"推定配達時間","Effective Order Count":"有効な注文数","Effective Sale Amount":"効果的な販売額","Expense":"費用","expired":"期限切れ","export a report?":"レポートをエクスポートしますか?","Failed to upload files.":"Failed to upload files.","FAQ":"FAQ","Find Parts":"部品を探す","for order over":"オーダーオーバー","Free":"無料","Free Quote & Information Request":"無料見積&情報依頼","Free Shipping":"送料無料","Get":"取得する","Get coupons":"クーポンを入手してください","Get discount":"割引を受ける","Get it":"それを得る","Get it after logging in and use it in the shopping cart.":"ログインした後にそれを取得し、それを買い物カゴに使用してください。","Go to Page":"ページに移動","Highest Price":"最高価格","home":"在宅","Hot Sale":"ホット販売","Income":"所得","Incorrect form format":"誤ったフォームフォーマット","Inquiry":"問い合わせ","join guide":"参加ガイドに参加してください","Last 30 days":"過去30日間","Last 7 days":"過去7日間","Links report":"リンクレポート","Loading":"ロード","Lowest Price":"最低価格","Match Product":"商品を一致させる","Merchant Free Shipping":"マーチャント送料無料","message":"メッセージ","Most Popular":"最も人気のある","my account":"マイアカウント","my coupons":"私のクーポン","my inquiry":"私のお問い合わせ","my orders":"私の注文","my reviews":"私のレビュー","my wishlist":"私のウィッシュリスト","name":"名前","New Arrival":"新参者","Newest":"最新","No Quotation":"引用なし","No time limit":"時間限度のない","Not deleted":"削除されません","not valid yet":"まだ無効です","Off":"オフ","Offers and Discounts":"オファーと割引","ok":"OK","Only DOC,DOCX,PDF,PNG,JPEG and JPG files can be uploaded":"doc、docx、pdf、png、jpeg、jpgファイルのみをアップロードできます","optional":"任意の","order notes":"注文ノート","Order over":"並べ替える","order id":"注文ID","order status":"注文の状況","order amount":"注文金額","Orders Report":"注文報告書","Other":"他の","Password contains at least numbers and letters length should be 6-20":"パスワードには少なくとも数字と文字の長さが6-20になります","Password is invalid":"パスワードは無効です","Password length should be 6-20":"パスワードの長さは6-20です","Paypal":"ペイパール","paypal payment":"PayPalの支払い","Pending":"保留中","Pending Commission":"保留中の委員会","personal info":"個人情報","Please click ’click to continue’ to retry.":"「続行」をクリックして再試行してください。","Please contact customer service for cash withdrawal":"現金引き出しについては、カスタマーサービスにお問い合わせください","Please enter a valid email address":"有効なメールアドレスを入力してください","Please enter the verification code":"確認コードを入力してください","Please login in first":"第一にログインしてください","Please select attribute":"属性を選択してください","Please select country/region":"国/地域を選択してください","Please select superior":"スーペリアを選択してください","Please select the number of ratings.":"評価数を選択してください。","Please select your country":"あなたの国を選択してください","Please upload the invoice file":"請求書ファイルをアップロードしてください","Processing":"処理","Product Name":"商品名","Please fill in the delivery address before selecting the payment method":"支払い方法を選択する前に、配送先住所に記入してください","promotion center":"プロモーションセンター","Promotion Link Click Amount":"プロモーションリンククリック金額","Promoted link clicks":"昇格リンククリック","Promotion Order Count":"プロモーション注文数","Promotion Reports":"プロモーションレポート","read more":"続きを読む","Received commission":"委員会","Refund":"返金","Refuse":"ごみ","Region":"領域","Register Success":"成功を登録します","Remittance":"送金","Reviews":"レビュー","reports":"報告","Sale ends in":"販売は終わりました","Save in wishlist":"ウィッシュリストで保存してください","Search":"検索","swift code":"スウィフトコード","Select how to share":"共有方法を選択します","Select premium items to increase your chances of making money":"プレミアムアイテムを選択して、お金を稼ぐチャンスを増やす","Share items to your channels.when other purchase a from your link, you can get commission.":"Share items to your channels.when other purchase a from your link, you can get commission.","Share Product":"製品を共有します","shipment successful":"出荷成功","Shipping":"運送","Shipping Address":"お届け先の住所","Size guide":"サイズガイド","Small Text":"小文字","Small Title":"小さなタイトル","Sort By":"並び替え","Sales Amount":"売上高","State/Province/Territory":"州/県/地域","Successfully delete":"削除に成功しました","Successfully save":"正常に保存します","Thank you for trying":"試してくれてありがとう","The account has been deactivated, please contact customer service to activate":"アカウントは無効にされています。カスタマーサービスに連絡してアクティブ化してください","the content can not be blank":"コンテンツは空白にはできません","The coupon code has been copied and used in the shopping cart.":"クーポンコードはショッピングカートでコピーされ使用されています。","The file name cannot exceed 100 characters":"ファイル名は100文字を超えることはできません","The file size cannot exceed 2MB":"ファイルサイズは2MBを超えることはできません","The number of withdrawals on the day has been capped":"当日の引き出し数が締めくくられました","The subscription is successful, thank you for your participation":"購読は成功しています、あなたの参加をありがとう","The user center is out of service. Please contact customer service":"ユーザーセンターはサービス不足です。カスタマーサービスに連絡してください","There is no amount to withdraw":"撤回する金額はありません","There is no data to export":"エクスポートするデータはありません","This is Text":"これはテキストです","This is title":"これはタイトルです","This transaction has failed.":"このトランザクションは失敗しました。","Time to shop":"買い物をする時間","Tips":"チップ","To be commented":"コメントしてください","Total":"合計","Tutorial":"チュートリアル","This Supplier/Shipping Company does not deliver to your selected Country/Region.":"このサプライヤー/配送会社は、選択した国/地域に配達しません。","Update password success":"パスワードの成功を更新します","Upload Image":"画像をアップロードしてください","Upload up to 6 pictures":"最大6枚の写真をアップロードしてください","uploading":"アップロード","used":"中古","user center":"ユーザーセンター","Upload Invoice":"請求書をアップロードします","valid now":"今すぐ有効です","Validity period":"有効期間","View Cart & Checkout":"かごの中身を見る","views":"ビュー","Valid for":"に有効","Welcome to the website":"ウェブサイトへようこそ","Western Union":"ウエスタンユニオン","When your buyers received and confirmed orders, you can get commission right now!":"バイヤーが注文を受け取って確認したとき、今すぐ委託を受けることができます!","Withdrawal":"撤退","Withdrawal success":"撤退の成功","Withdrawal Method":"撤退方法","Write a Review":"レビューを書く","Withdrawal Amount":"引き出し額","Yes":"はい","Yesterday":"昨日","You are clicking too fast":"クリックしすぎています","You are got a coupon.":"あなたはクーポンを持っています。","You can select a maximum of 90 days":"最大90日を選択できます","You can withdraw the commission to your Paypal account.":"委員会をPayPalアカウントに引き出すことができます。","You haven’t chosen an address yet":"あなたはまだ住所を選んでいません","You haven’t selected a product yet":"あなたはまだ製品を選択していません","Your rating":"あなたの評価","Your review":"あなたのレビュー","Your shipping address error":"あなたの配送先住所エラー"}}