Duckling and Chick Camera with MQTT/Mosquitto and Raspberry Pi

The goal of this project was to publish a live, low bandwidth, photo feed of a chick and duckling pen using a Raspberry Pi.MaterialsRequired: Raspberry Pi and a Pi CameraI also used my 2014 Macbook Pro for hosting and an Android cell phone for mobile viewing. We have no internet connection here, but a cellular hotspot worked fine to connect devices and publish to the web.

Duckling and Chick Camera with MQTT/Mosquitto and Raspberry Pi 1

Background:So you want to send data from a small wifi-capable microelectronic device? It might sound kind of niche, but this is a fundamental part of IoT. In this project, I will be using a data message protocol called Message Queuing Telemetry Transport or MQTT.

There are many methods of data transmission that would work for this project, but I will just be using this one. MQTT is great for collecting data from large networks of small devices into a single location according to are two basic parts of MQTT: the broker and the client.As the names suggest, in a given system, there are multiple clients that will request data from (subscribe) and send data to (publish) one singular broker.

This data is organized into topics. The clients can subscribe or publish to any number of these topics.The broker can either be hosted locally on a computer or on a server, like the one we will be using.

Our broker will be test.mosquitto.org and our clients will be the devices we access the photo data from (Macbook and Android phone).

Duckling and Chick Camera with MQTT/Mosquitto and Raspberry Pi 2

The server/broker and client establish a TCP/IP connection to connect, publish, and subscribe to messages all of the same structure.The MQTT packet or message format consists of a 2 byte fixed header (always present) Variable-header (not always present) payload (not always present).Luckily, we have the benefit of importing libraries that do complicated work for us.

Later you will see how easy it is to implement code to send MQTT messages.MosquittoMosquitto (with two ts, like MQTT) is an open-source MQTT broker developed by Eclipse. It allows you to start an MQTT Broker and clients and to publish and subscribe to topics.

Eclipse Paho is an MQTT implementation. Paho is available on various platforms and programming languages (Java, C#, C, Python, and JavaScript), but we will only be using it for Python (paho-mqtt).Here is a comparison of different MQTT brokers and implementation software.

We will also be using Mosquittos public broker, test. mosquitto. org, as the domain to which we will publish and receive messages.

Other public servers can be found here.Software Install InstructionsRaspberry Pi:If you have not flashed your raspberry pi and connected it to the internet, those things must be done first.First I downloaded Mosquitto.

This will allow you to run a broker or client from the pi. Installation is as simple as running the following in Terminalsudo apt-get install -y mosquitto mosquitto-clientsIn order to subscribe to and publish MQTT messages as a client in python, runpip install paho-mqttMacBook ProIf you have homebrew already installed, installing Mosquitto in OS is as easy asbrew install mosquittoand then the following will add the broker to be automatically run upon startupbrew services start mosquittoln -sfv /usr/local/opt/mosquitto/*.plist /Library/LaunchAgentslaunchctl load /Library/LaunchAgents/homebrew.

mxcl.mosquitto.plistmosquitto -c /usr/local/etc/mosquitto/mosquitto.

confAndroidI downloaded the app MQTT Dash from the Google Play store and it works perfectly for connecting to the broker.Unfortunately, there is not a good alternative for iOS! None of the MQTT applications include image data conversion capabilities.

The Codechardorn/cambiaYou can't perform that action at this time. You signed in with another tab or window. You signed out in another tab this code, we are taking a picture every 15 seconds on the Raspberry Pi and publishing it to the test.

mosquitto.org.We set up a client using paho.

mqtt.client and connect it to the specified address and topic. client = mqtt.

Client()client. connect(ip_address, 1883)client. subscribe(topic)A picture is taken using picamera:camera.

start_preview()sleep(1)camera.capture(image_test.jpg, resize=(500,281))camera.

stop_preview()The image itself is published by opening the image with the ability to read in binary mode, rb, and then is converted into an array of bytes and published over the desired topic.f=open("image_test.jpg", "rb")fileContent = f.

read()byteArr = bytearray(fileContent)client. publish(topic, byteArr)Subscribe. pyThis program as run on my Macbook laptop to subscribe to the appropriate topic, and then save and preview any published images.

First, a client is created and the functions on_connect and on_message are established and will run at the time of their respective self-explanatory triggers.client = mqtt.Client()client.

on_connect = on_connectclient.on_message = on_messageclient.connect(ip_address, 1883, 60)The following code opens an image with writing abilities in binary mode (wb), and then rites the incoming message to that file.

The subprocess call opens the image to appear on the screen.f = open('output.jpg', "wb")f.

write(msg.payload)print("Image Received")f.close()openimg = subprocess.

call(["open", "output.jpg"])To run these program from the cambia repository,python loop_pub.py #on the raspberry pi python subscribe.

py #on another computerMobile ViewNo programming is needed. In the MQTT Dash application, use test. mosquitto.

org as the server/ip address and the topic name that matches what is declared in your loop_pub.py code.That should explain everything to get this system setup.

Feel free to contact me if there are any holes in my explanations or if you have questions:charleydorn@gmail. comThe Nest Steps in this project will be:Publishing data over a local networkExploring IoT for permaculture with temperature/moisture sensors and solar panel data

HOT PRODUCTS
sem dados
GET IN TOUCH WITH US
Artigos recomendados
Casos
What Is the Difference Between Intelligent Gate and Traditional Gate_ Taigewang Technology
What Is the Difference Between Intelligent Gate and Traditional Gate_ Taigewang Technology
With the continuous development of the automobile industry and the continuous increase of the number of vehicles, the demand for parking lot gate equipment for intelligent management vehicles in the parking lot is also increasing, and colleagues also put forward higher requirements for the performance of parking lot gate. Early road gates usually had a series of disadvantages, which often caused accidents when the gate rod landed, and were easy to cause damage to pedestrians and passing vehicles. The emergence of intelligent gate greatly reduces the occurrence of such accidents. Let's take a look at the difference between intelligent gate and traditional gate! 1: The utility model has the advantages of simple structure, stable operation, automatic pole lifting and convenient installation and maintenance. 2. The crank connecting rod mechanism is adopted for transmission, which reduces mechanical failure, low noise and no pollution. 3. The photoelectric limit control system with high sensitivity is adopted, which has reliable operation and accurate limit. 4. Special manual and automatic pole lifting devices are adopted, so that the gate can lift the pole manually even in the case of power failure, It does not affect the normal passage of vehicles. At the same time, the gate has a variety of control modes, supporting control modes such as wire control, remote control and communication protocol. 5: the intelligent gate has the anti smashing function to effectively prevent the gate rod from accidentally injuring vehicles and pedestrians. As an important part of the parking lot gate system, the gate plays a decisive and key role. Different functional gates are very important for the layout of the parking lot system.
What Factors Affect the Price of Parking Lot Management System_ Taigewang Technology
What Factors Affect the Price of Parking Lot Management System_ Taigewang Technology
As we all know, the diversified functions of the parking lot management system now play an important role in our life, so it can be seen in various public places such as communities and shopping malls. With the continuous development of society and economy and the continuous advancement of urbanization; Parking lot management system plays an important role in people's life. It has become one of the indispensable vehicle management equipment in people's life. Different functions, different workmanship and different services directly determine the price of the parking lot management system. First, the function of the parking lot management system: the function of the parking lot management system is one of the important roles in determining the price of the parking lot management system, because with the increase of vehicles, people's demand is increasing. For the convenience of parking, people's requirements for the parking lot are becoming higher and higher. Vehicles at the entrance and exit pass quickly, find parking spaces quickly, find parking positions quickly Rapid payment, etc. the increase of these functions will affect the price of the parking lot management system. Second: the manufacturing process of the parking lot management system: the complexity of the manufacturing industry and the level of the manufacturing process of the parking lot management system are also the influencing factors of the price of the parking lot management system. The more complex the manufacturing process of the parking lot management system is, the higher the cost will be. Similarly, the appearance of the parking lot management system will become more high-end and the longer the service life will be. Third: after sales service of the parking lot management system: large enterprises will have a good after-sales service for their products, which is also a guarantee for consumers. Consumers can buy the products at ease without worrying about the situation that no one cares if they are broken. Therefore, even if the price is a little expensive, consumers are willing to accept it.
How to Select a Parking License Plate Recognition System to Meet the Needs According to the Special
How to Select a Parking License Plate Recognition System to Meet the Needs According to the Special
The main characteristics of public parking lot are temporary parking, most users use it once, short parking time, frequent access, etc. According to these characteristics, the design of parking license plate recognition system should meet the functions of simplicity and practicality, standardized charge management, and reducing parking operation cost. 1、 The parking lot shall be equipped with parking space guidance function, and the screen displaying the remaining parking spaces shall be set at each main entrance of the parking lot, and the remaining parking spaces in each area shall be displayed separately. The system information screen at each front door of the parking lot displays the division details of the parking lot area, which can correctly guide the driver to park in the fastest way. 2、 With real-time monitoring function. Pay attention to the safety of the parking lot, have the functions of car image comparison, monitoring incoming and outgoing vehicles and storing vehicle data, and make sufficient data records to deal with abnormal events and effectively protect the safety of vehicles. 3、 Meet users' rapid access. In order to meet the fast traffic of fixed users, a license plate recognition system shall be equipped to allow fixed users to pass directly, speed up the traffic speed and alleviate the congestion of access lanes in peak hours. 4、 The equipment is simple and easy to use. Some parking lot equipment are properly equipped with voice broadcasting and LED display functions to guide the operation of vehicles entering and leaving the site, so as to avoid the blockage of entrances and exits caused by some users not knowing to use the equipment.
Today, with the General Trend of Intelligence, the Demand for Parking Lot Management System Continue
Today, with the General Trend of Intelligence, the Demand for Parking Lot Management System Continue
With the rapid development of China's economy, the number of cars is gradually increasing, and the parking problem is imminent. The development of the overall parking management and guidance system is still in its infancy. At the same time, with the continuous expansion of the scale of the parking lot, the demand for the parking lot management system is increasing. With the change of demand, the parking lot management system is mainly reflected in its intelligence. At present, image comparison technology is often used. This technology combines IC induction card and image recognition, and plays a very important role in parking lot management; Secondly, the design of the parking lot system software also reflects the strong anti-interference ability. For the harsh environment, it can resist interference, reduce the occurrence of faults, ensure that it can continue to operate under special circumstances such as network interruption and computer failure, and ensure that all entrances and exits can still work normally. In view of the current situation of the parking lot market, there is no standardized standard, and there is a lack of overall normative basis in the process of construction. Although some parking lots have installed systems, they have not played a corresponding effect. Although the entrance and exit management and charging can be strictly guarded, there is still a blank field for parking space guidance and vehicle search, Compared with foreign intelligent parking system, after more than ten years of development and technical precipitation, China's equipment has been able to catch up with foreign similar products. Combined with the actual situation of domestic parking, we can fully show the advantages of parking system manufacturers. Based on modern electronic and information technology, the parking lot management system installs automatic identification devices at the entrance and exit of the parking area, and implements intelligent management such as judgment and identification, access / rejection, guidance, recording, charging and release of vehicles out of such area through non-contact card or license plate recognition. Its purpose is to effectively control the access of vehicles and personnel, Record all details and automatically calculate the charging amount to realize the safety management of vehicles and charges in the site.
Why Does the Traditional Parking Lot System Need Intelligent Transformation_ Taigewang Technology
Why Does the Traditional Parking Lot System Need Intelligent Transformation_ Taigewang Technology
With the development of society, the progress of technology and the vigorous development of Internet technology, more and more parking lots use intelligent devices to improve management efficiency through access to the Internet. The traditional parking lot system can no longer meet people's needs because of personnel cost and management efficiency. Parking lot managers have transformed and upgraded the traditional parking lot system one after another. At present, the traditional parking lot management system is prone to congestion at the entrance and exit of the parking lot during the rush hour. The traffic efficiency is very low, followed by the simple function of the system. It only plays the role of one car and one gear in the parking lot, and does not have the functions of helping car owners find parking spaces, find cars and pay fees quickly. The adopted manual charging also faces problems such as fund loopholes, card collection and change. Through LAN communication, it is necessary to install an independent database and front-end display in the parking lot during installation, and the client software is installed and run on the front-end display, which is not only large quantities and time-consuming, but also poor system scalability and maintenance. In contrast, the intelligent parking lot management system adopts the full-automatic computer management mode. From the exit of the parking lot to the road gate and then to the management center, all use the automatic control of the computer, which is very convenient for management, and the vehicles enter and leave the parking lot very quickly. In addition, it can easily realize unattended operation at the entrance and exit and automatic charging, which can greatly save the cost. Therefore, the intelligent parking lot system that can meet the needs of managers and car owners has very high potential and broad development prospects in the future. The transformation of traditional parking lot system can adopt advanced license plate recognition technology to clearly capture vehicle information and character images, so that car owners can pass in and out of the parking lot without stopping. It can also monitor the operation status of all online equipment, realize equipment fault pre discovery, self repair, real-time query of various report functions, and provide customers with a variety of pictures to query the on-site situation. It has the ability to query the charging amount in real time. The system breaks through the regional restrictions and realizes the remote management throughout the country. The car park charging system adopts automatic toll collection. It supports the popular mobile payment (Alipay, WeChat) owners who can pay app scan or login special parking APP to pay. The whole process is fast and convenient.
What Are the Parts of Community Entrance and Exit Management_ Taigewang Technology
What Are the Parts of Community Entrance and Exit Management_ Taigewang Technology
The entrance and exit management of the community is divided into two parts: personnel management and vehicle management. The first is personnel management: with the wide promotion of biometric technology and the maturity of system integration, personnel channel management can adopt IC card, ID card, fingerprint, QR code, face recognition, human body recognition and other authentication methods. After residents enter the community, owners and residents can automatically identify. After being identified and confirmed by the system, the owner does not need to manually identify the entry, and the gate will automatically open and light the corresponding floor. The personnel intelligent access control system aims to prevent unauthorized personnel from entering, facilitate the access of the owner, and calculate the number of people entering and leaving the community. Based on biometric applications such as face recognition, it provides safer and more convenient travel modes for owners and visitors. The second is vehicle management: the intelligent parking lot system can not only identify vehicle information and control vehicle passage, but also manage incoming and outgoing vehicles and help residents Park and find vehicles quickly. It mainly integrates radio frequency identification technology and video identification technology, establishes an intelligent monitoring bayonet, and collects the owner's license plate information in advance. The entrance and exit system supports efficient vehicle identification and gate release, and supports the release of the visitor's pre registered license plate information without re verification, and pushes the visitor's access information to the respondent's visual walkie talkie. It not only changes the single identification method, but also realizes the interaction between personnel, vehicles and bayonets, and can access the social security system to facilitate public security inspection. More importantly, it improves the accuracy and timeliness of cracking down on vehicle illegal activities. Better safeguard social stability.
Intelligent Parking System: Intelligent Security, Escort for You_ Taigewang Technology
Intelligent Parking System: Intelligent Security, Escort for You_ Taigewang Technology
In order to meet the market demand and give users more choices, the parking lot system has many intelligent functions to meet the use of different places, create a good parking environment for people and make people parking safer. Intelligent parking lot system combines modern advanced technology and products to realize intelligent management of vehicles. It has a wide variety and complex functions. We can equip different parking lot equipment according to people's requirements and on-site environment. At present, for vehicle management in parking lots, license plate recognition is widely used. For example, in some large parking lots, communities, institutions and other places, intelligent license plate recognition system can track and capture vehicles and improve people's parking safety. The high-performance and multi-functional parking lot system has a good market prospect and great application space and potential, which has played a positive role in promoting the intelligent transportation in China. Intelligent parking lot system is a set of intelligent equipment integrating video acquisition, vehicle detection, license plate recognition, voice number reporting, intelligent analysis of recognition results, automatic alarm, remote duty and remote monitoring. The whole process does not need manual processing, so that car owners can realize non-stop operation, save time and improve the efficiency of vehicle entry and exit management. The process of social development and modernization is very fast, and the number of cars in the city is also increasing, resulting in the increasing traffic flow in the parking lot. Naturally, the intelligent parking lot system will be used more and more in life and play a more and more important role.
License Plate Recognition System Changes the Management Mode of Parking Lot_ Taigewang Technology
License Plate Recognition System Changes the Management Mode of Parking Lot_ Taigewang Technology
With the increasing development of technology, it not only brings many conveniences to people's daily life, but also solves many problems. The difficulty of parking outside is one of them. Now, thanks to the development of technology, parking lot management has entered the era of automatic management of license plate recognition, which has brought earth shaking changes to parking lot management. The intelligent license plate recognition system adopts advanced license plate recognition algorithm, which can quickly recognize the license plate information. It is that vehicles entering the parking lot can pass through without stopping. The entrance greatly reduces the waiting time of vehicles in line. The system is generally composed of license plate recognition camera, relevant billing software, billing display screen and intelligent gate. It is the mainstream system of parking lot management. The whole system includes entrance equipment, exit equipment, charge management equipment and image comparison equipment. Through the intelligent license plate recognition system, vehicles can pass in and out without stopping, and temporary vehicles can pass in and out without stopping. The whole license plate recognition parking lot system has the advantages of simple structure, stability and reliability, and convenient installation, maintenance and use. Many large parking lots have a large daily traffic flow and a large amount of data. This requires that the security of intelligent license plate recognition system has high requirements. Choosing a professional manufacturer of intelligent license plate recognition system can provide the safest protection for the parking lot, reassure the owners and save the parking lot administrators. As a product of the intelligent era, intelligent license plate recognition system will have unlimited development in the future. It will become an important part of leading the progress of parking lot management. Nowadays, many parking lot equipment manufacturers continue to innovate, aiming at realizing unattended parking lot, develop rapidly, and provide people with intelligent, safe and convenient parking life.
What Is the Difference Between Intelligent Gate and Traditional Gate_ Taigewang Technology
What Is the Difference Between Intelligent Gate and Traditional Gate_ Taigewang Technology
With the continuous development of the automobile industry and the continuous increase of the number of vehicles, the demand for parking lot gate equipment for intelligent management vehicles in the parking lot is also increasing, and colleagues also put forward higher requirements for the performance of parking lot gate. Early road gates usually had a series of disadvantages, which often caused accidents when the gate rod landed, and were easy to cause damage to pedestrians and passing vehicles. The emergence of intelligent gate greatly reduces the occurrence of such accidents. Let's take a look at the difference between intelligent gate and traditional gate! 1: The utility model has the advantages of simple structure, stable operation, automatic pole lifting and convenient installation and maintenance. 2. The crank connecting rod mechanism is adopted for transmission, which reduces mechanical failure, low noise and no pollution. 3. The photoelectric limit control system with high sensitivity is adopted, which has reliable operation and accurate limit. 4. Special manual and automatic pole lifting devices are adopted, so that the gate can lift the pole manually even in the case of power failure, It does not affect the normal passage of vehicles. At the same time, the gate has a variety of control modes, supporting control modes such as wire control, remote control and communication protocol. 5: the intelligent gate has the anti smashing function to effectively prevent the gate rod from accidentally injuring vehicles and pedestrians. As an important part of the parking lot gate system, the gate plays a decisive and key role. Different functional gates are very important for the layout of the parking lot system.
Taigewang Intelligent Creates a Cloud Parking System in the Internet Era_ Taigewang Technology
Taigewang Intelligent Creates a Cloud Parking System in the Internet Era_ Taigewang Technology
Now people's definition of the parking lot system has gradually extended from the initial entrance and exit gate rod lifting equipment to a very broad category, that is, booking parking spaces, parking, looking for cars, paying fees, including the centralized management of the parking lot. Modern parking lot system also realizes the unmanned management mode from card ticket management, Bluetooth remote recognition, license plate recognition and other technologies. People park not only to find a place to park, but also to enjoy a safe and convenient parking environment. Entering the Internet plus era, the popularity of big data, cloud services and mobile devices has further stimulated Yunan security's development and application. When security and Internet are combined, networked information transmission, comprehensive function derivation, convenient user management and optimized experience make the traditional parking lot system developed for more than 20 years break through and leap again. Cloud parking, as the name suggests, is to centrally manage the parking lot, realize cross regional resource integration, and realize a new leap in the functions of the traditional parking lot system through Internet technology. The parking cloud platform is composed of cloud management platform, parking lot equipment and terminal equipment, aiming at the application of the parking lot system Design according to the needs of platform management and people's parking requirements, so that the parking lot manager and car owners can follow the reasonable and convenient operation requirements, meet the needs of the project, and expand the customized innovation function. The use of the Internet-based parking lot system in the cloud can realize real-time query, achieve network wide interoperability, provide real-time comprehensive data for the parking lot management, and facilitate timely adjustment according to the use of parking spaces in the parking lot. Almost every parking lot is inseparable from the parking lot system. The linkage expansion function with the third-party platform plays a very important role in the construction of smart city.
sem dados
Shenzhen TGW Technology Co.,Ltd é o fornecedor líder de soluções de controle de acesso para sistema de estacionamento inteligente de veículos, sistema de reconhecimento de placas e catraca de controle de acesso de pedestres e terminais de reconhecimento facial.
sem dados
ENTRE EM CONTATO CONOSCO

Tecnologia Co. de Shenzhen TigerWong, Ltd

Tel: 86 0755-23773884  

E-mail: Info@sztigerwong.com

Adicionar: Sala 601-605, Edifício 6, 1980 Ciência e Tecnologia Parque Industrial,  Longhua Street, distrito de Longhua, Shenzhen

           

Direitos autorais©Tecnologia TigerWong Shenzhen 2021 Co.,Ltd   | Sitemap
chat online
Please message us and we’ll be sure to respond ASAP, what product you intrested in?