CN110460596A - Lighting system and implementation method are controlled based on the remote speech of wechat small routine and OneNet - Google Patents

Lighting system and implementation method are controlled based on the remote speech of wechat small routine and OneNet Download PDF

Info

Publication number
CN110460596A
CN110460596A CN201910722027.4A CN201910722027A CN110460596A CN 110460596 A CN110460596 A CN 110460596A CN 201910722027 A CN201910722027 A CN 201910722027A CN 110460596 A CN110460596 A CN 110460596A
Authority
CN
China
Prior art keywords
onenet
development board
lighting system
circuit
remote speech
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201910722027.4A
Other languages
Chinese (zh)
Inventor
王鑫
李高轩
刘晓庆
杨一琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201910722027.4A priority Critical patent/CN110460596A/en
Publication of CN110460596A publication Critical patent/CN110460596A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Power Engineering (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

Lighting system and implementation method are controlled based on the remote speech of wechat small routine and OneNet the present invention relates to a kind of, the system comprises headlamp L, light perception circuit, lamp control economize on electricity road and development boards;Light perception circuit includes photo resistance and anti-short-circuit resistance R1, and photo resistance and anti-short resistant series are followed by constituting closed circuit between the corresponding output pin and Gun interface of development board;Lamp control economize on electricity road includes anti-short-circuit resistance R2 and triode Q1, and the corresponding output pin of development board is through the base stage of anti-short-circuit resistance R2 connecting triode Q1, and the collector of triode Q1 connects headlamp L cathode, and headlamp L anode connects VCC power end.The present invention uses the architecture mode of one cloud of both ends, and both ends refer to headlamp end and small routine end, and a cloud refers to cloud platform of internet of things ONENET.Real-time data transmission may be implemented under the premise of allowing two ends mutually to subscribe to data in the PUSH message function by MQTT agreement, almost without delay, and it is lower for network requirement.

Description

Lighting system and realization are controlled based on the remote speech of wechat small routine and OneNet Method
Technical field
Lighting system and implementation method are controlled based on the remote speech of wechat small routine and OneNet the present invention relates to a kind of, It belongs to smart home field.
Background technique
At present according to investigation, most common Intelligent House Light lamp is using http agreement:
The main difference of MQTT and HTTPS is that MQTT is asynchronous message connectivity mechanism, and HTTPS is synchronization request response The mechanism of formula.Need to handle a large amount of event messages under Internet of Things background, the rear end MQTT is typically all among high-performance message These message can be effectively treated in part, message-oriented middleware.If having certain limitation using HTTPS.These limitation bodies It is present:
HTTP is a kind of synchronous protocol.Client needs waiting for server to respond.Web browser has such requirement, but Its cost is to sacrifice scalability.In the field IoT, large number of equipment and it is likely to unreliable or high latency network and makes Obtaining synchronous communication becomes problem.Asynchronous message agreement is more suitable for IoT application program.Sensor sends reading, and network is allowed to determine Send it to best route and the time of target device and service.
HTTP is unidirectional.Client must initiate the connection.In IoT application program, equipment or sensor are usually Client, it means that they can not passively receive the order for carrying out automatic network.
HTTP is a kind of 1-1 agreement.Client issues request, and server is responded.It transmits the message on network All devices on, it is not only highly difficult, and cost is very high, and this is the common service condition of one of IoT application program.
HTTP be it is a kind of there are many header and rule heavyweight protocol.It is not suitable for limited network.
It is APP that universal energy-saving lamp, which is arranged in pairs or groups, on the market, and the disadvantage of APP is as follows:
1, maintenance cost is high: Android and IOS stand-alone development, and maintenance is got up relatively also more troublesome;
2, retention ratio is low: the frequency that APP is opened is largely fixed its retention ratio, may if not being commonly used It unloads soon;
3, promote at high cost: for APP under the premise of not certain popularity, the cost of popularization is very high, and it is at high cost to obtain visitor;
4, it is complicated to upload the path APP: being uploaded to APP and needs confirmation by store or application market.
Summary of the invention
Technical problem to be solved by the invention is to provide a kind of remote speech based on wechat small routine and OneNet Control lighting system and implementation method.
In order to solve the above technical problems, the present invention adopts the following technical scheme:
It is a kind of that lighting system is controlled based on the remote speech of wechat small routine and OneNet comprising headlamp L, light perception electricity Road, lamp control economize on electricity road and development board;The light perception circuit includes photo resistance and anti-short-circuit resistance R1, photo resistance and anti- Short resistant series are followed by constituting closed circuit between the corresponding output pin and Gun interface of development board;The lamp control section Circuit includes anti-short-circuit resistance R2 and triode Q1, and the corresponding output pin of development board is through anti-short-circuit resistance R2 connecting triode Q1 Base stage, the collector of the triode Q1 connects headlamp L cathode, and headlamp L anode connects VCC power end, triode Q1 Emitter ground connection.
Further, the development board is Arduino development board.
Further, the invention also includes OneNET cloud server, the development board passes through its included WIFI member device Part, the data volume for calling OneNET cloud server to provide download API.
Further, the headlamp L is LED light.
Further, the model 8050 of the triode Q1.
Using the implementation method of the remote speech control lighting system, the specific method is as follows:
Include storage unit and processor on the development board, is stored with the control light that can be run on a processor in storage unit The program of aware circuit and lamp control economize on electricity road, wherein proceeded as follows when described program is executed by processor:
Wireless account, wireless cipher and MQTT server address are set, enables development board be wirelessly connected, is successfully connected WIFI Afterwards, OneNET device id is set gradually, OneNET product IDs connect OneNET cloud server with authentication information;After successful connection The theme of the headlamp L of OneNET cloud server and the theme of photo resistance are subscribed to, development board is adopted by reading photo resistance The photosensitive value of collection is simultaneously uploaded to OneNET cloud server.
Further, it is executed in function in the loop circulation of development board, a state variable state is set;The He of state=1 State=2 respectively represent manual mode and automatic mode, and state=3 and state=4 respectively represent turn-on mode and mode of turning off the light, The state value transmitted by reception user free of discontinuities in loop circulation execution function is come switch mode.
Further, in a manual mode, it in the call back function carried first in MQTT agreement, receives and subscribes to message; Received message field is traversed out and is printed upon serial ports window, the 12nd character representative manually adjusts brightness value, brightness value Lightness variable is saved as, PWM multiplied by positive parameter and is assigned to by lightness variable, so that the value of PWM is controlled in 0-255 range It is interior, duty ratio is adjusted by the value of the PWM of control pin to adjust brightness.
Further, in automatic mode, after the theme that development board subscribes to photo resistance, it is photosensitive to start reception free of discontinuities Resistance data, while photo resistance data are imparted to PWM, the PWM by controlling pin adjusts duty ratio to adjust brightness.
Further, under the turn-on mode, mode of turning off the light, adjustment pin current potential, high potential corresponds to turn-on mode, The corresponding mode of turning off the light of its low potential.
Further, user can first be uploaded to the cloud OneNET clothes by any control instruction that wechat small routine end is sent Business device, then allows development board to read the control instruction that OneNET cloud server issues in real time to control headlamp L.
Further, the method that MQTT agreement is accessed in OneNET cloud server is as follows:
(1) product is created, access protocol is selected:
The OneNET product that an access protocol is MQTT is created in OneNET platform, after creating OneNET product, described in record The product IDs of OneNET product;
(2) equipment is created, OneNET device id and authentication information are recorded;
(3) the agreement connection between equipment and OneNET platform is established;
(4) data flow creates, and data point uploads:
Using the interface function provided in SDK, writes code and upload the data to OneNET platform;
(5) data flow is shown, checks data point.
Beneficial effects of the present invention are as follows:
The present invention controls headlamp using wechat small routine in mobile terminal, it is easy to use, without downloading, instant sweep.
Using the architecture mode of one cloud of both ends, both ends refer to headlamp end and small routine end, and a cloud refers to cloud platform of internet of things ONENET.It may be implemented to count under the premise of allowing two ends mutually to subscribe to data in the PUSH message function by MQTT agreement According to real-time Transmission, almost without delay, and it is lower for network requirement.Face the poor situation of network state in actual life Under can also cope with.
The code write in Arduino development board contains directly using MQTT agreement, makes data transmission and reception phase It is lower for network requirement than http protocol and also stored data on the ONENET of cloud in transmission process, this be in order to It is supplied to small routine end data to prepare, because small routine end uses http protocol, in order to allow two kinds of agreements to transmit Data sharing play the intermediate storage function of data by means of cloud ONENET.All in all two kinds of agreements are used, It is combined by a cloud, to realize data sharing between different agreement.
For the present invention in terms of control, overall data transmission uses MQTT agreement.
MQTT agreement is low protocol overhead, its every message header may be as little to 2 bytes, and MQ and HTTP are owned by height Every message overhead much, for HTTP, re-establishing HTTP connection for each new request message will lead to great expense, and It is permanently connected used in MQ and MQTT to significantly reduce this expense.
MQTT agreement can tolerate unstable network, and MQTT and MQ can restore from disconnecting etc. in failures, and not into The code demand of one step, still, HTTP can not Proterozoic realize this purpose, need client to retry coding, this can increase power Etc. property problem.
MQTT agreement is low in energy consumption, and MQTT is specific to low-power consumption target and designs, and the design of HTTP does not account for this Factor, therefore increase power consumption.
MQTT agreement can safeguard the client of millions of connections, on HTTP storehouse, safeguard that millions of concurrently connect It connects, needs to do many work to provide support.Although this support may be implemented, most of commercial products are all to handle this The order of magnitude permanently connected and be optimized.IBM provides IBM MessageSight, this is that a single chassis loads clothes It is engaged in device, can handle up to 1,000,000 by testing and pass through the equipment that concurrently connect of MQTT, on the contrary, MQ is not for largely simultaneously It sends out client and designs.
MQTT agreement energy sending out notice, since it is desired that client can be passed to notice in time.For that purpose it is necessary to using certain Kind periodic polling or method for pushing;It is said from battery, system load and bandwidth angle, push is best solution, and enterprise may Need to send sensitive information in the case where no third party intermediary, it reduce the solution works specific to operating system For the value of main transmission mechanism, the solution such as Apple iOS, Google Play are notified.Compare HTTP Only allow using a kind of method for being known as COMET, long-lasting use HTTP requests to execute push.From client and service The angle of device says that the method is all costly.MQ and MQTT supports to push, this is their fundamental characteristics.
The client of MQTT agreement has all realized that the simplicity of MQTT facilitates with few energy on a large amount of platforms MQTT is realized in additional client.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor It puts, can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is that mobile terminal remotely controls lighting system schematic diagram.
Fig. 2 is the functional block diagram that remote speech controls lighting system.
Fig. 3 is the circuit diagram of light perception circuit in the present invention.
Fig. 4 is the circuit diagram on lamp control economize on electricity road in the present invention.
Fig. 5 is the method flow diagram that MQTT agreement is accessed in OneNET cloud server.
Fig. 6 is the influencing factor schematic diagram in the present invention in message queue telemetering transmission network.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, 1- Fig. 6 and specific embodiment with reference to the accompanying drawing Clear, complete description is carried out to invention.
As shown in figs 1 to 6, the present embodiment is related to a kind of based on the remote speech of wechat small routine and OneNet control photograph Bright system comprising headlamp L, light perception circuit, lamp control economize on electricity road and development board;The light perception circuit includes photosensitive electricity Resistance and anti-short-circuit resistance R1, photo resistance and anti-short resistant series are followed by corresponding output pin and Gun interface in development board Between constitute closed circuit;Lamp control economize on electricity road includes anti-short-circuit resistance R2 and triode Q1, the corresponding output of development board Base stage of the pin through anti-short-circuit resistance R2 connecting triode Q1, the collector of the triode Q1 connect headlamp L cathode, illumination Lamp L anode connects VCC power end, the emitter ground connection of triode Q1.
Further, the development board is Arduino development board.
Further, the invention also includes OneNET cloud server, the development board passes through its included WIFI member device Part, the data volume for calling OneNET cloud server to provide download API.
Further, the headlamp L is LED light.
Further, the model 8050 of the triode Q1.
Using the implementation method of the remote speech control lighting system, the specific method is as follows:
Include storage unit and processor on the development board, is stored with the control light that can be run on a processor in storage unit The program of aware circuit and lamp control economize on electricity road, wherein proceeded as follows when described program is executed by processor:
Wireless account, wireless cipher and MQTT server address are set, enables development board be wirelessly connected, is successfully connected WIFI Afterwards, OneNET device id is set gradually, OneNET product IDs connect OneNET cloud server with authentication information;After successful connection The theme of the headlamp L of OneNET cloud server and the theme of photo resistance are subscribed to, development board is adopted by reading photo resistance The photosensitive value of collection is simultaneously uploaded to OneNET cloud server.
Further, it is executed in function in the loop circulation of development board, a state variable state is set;The He of state=1 State=2 respectively represent manual mode and automatic mode, and state=3 and state=4 respectively represent turn-on mode and mode of turning off the light, The state value transmitted by reception user free of discontinuities in loop circulation execution function is come switch mode.
Further, in a manual mode, it in the call back function carried first in MQTT agreement, receives and subscribes to message; Received message field is traversed out and is printed upon serial ports window, the 12nd character representative manually adjusts brightness value, brightness value Lightness variable is saved as, PWM multiplied by positive parameter and is assigned to by lightness variable, so that the value of PWM is controlled in 0-255 range It is interior, duty ratio is adjusted by the value of the PWM of control pin to adjust brightness.
Further, in automatic mode, after the theme that development board subscribes to photo resistance, it is photosensitive to start reception free of discontinuities Resistance data, while photo resistance data are imparted to PWM, the PWM by controlling pin adjusts duty ratio to adjust brightness.
Further, under the turn-on mode, mode of turning off the light, adjustment pin current potential, high potential corresponds to turn-on mode, The corresponding mode of turning off the light of its low potential.
Further, user can first be uploaded to the cloud OneNET clothes by any control instruction that wechat small routine end is sent Business device, then allows development board to read the control instruction that OneNET cloud server issues in real time to control headlamp L.
Theme Topic refers to the theme of mqtt communications protocol in the present invention, can be defined by subscribing to publication Topic realizes communication;MQTT is given out information based on topic, and publisher needs that the message is specified to send out when giving out information Cloth is at which topic.
Further, the method that MQTT agreement is accessed in OneNET cloud server is as follows:
(1) product is created, access protocol is selected:
The OneNET product that an access protocol is MQTT is created in OneNET platform, after creating OneNET product, described in record The product IDs of OneNET product;
(2) equipment is created, OneNET device id and authentication information are recorded;
In the step (2), there are two types of modes for creation equipment:
One hits addition equipment, input equipment title and authentication information by ONENET platform developer central page millet cake, and remembers Record the lower device numbering;
Secondly, pass through the creation for calling creation equipment API to realize equipment, the implementor name of input equipment, access protocol, authentication letter Breath, can create equipment on platform.
(3) the agreement connection between equipment and OneNET platform is established;
MQTT server address domain name in the step (3) are as follows: mqtt.heclouds.com;
Use the parameter in step (1) and step (2) as login parameters, uses the corresponding interface tissue MQTT connection in SDK Message is sent to platform, establishes MQTT with platform and connect;If successful connection, can be appreciated that in facility information one it is online Label.
(4) data flow creates, and data point uploads:
Using the interface function provided in SDK, writes code and upload the data to OneNET platform;
(5) data flow is shown, checks data point:
In step (5), click data is shown under the equipment management on OneNET, into data displayed page, clicks drop-down Menu checks the data point uploaded in the recent period;Also it can choose time interval to check historical time;
After successfully creating equipment, product IDs, device id and API-KEY can be checked.Cloud is accessed for Arduino development board to do Prepare.
Wechat small routine is opened in application layer user, operation of the user in front end can call the API of ONENET in js, will Different operational order data are uploaded to cloud, realize control LED bulb by sending instructions under cloud.
At wechat small routine end:
View is laid out using waterfall-type.Http request is initiated by calling wx.request method in the js page.Another party Call the API of ONENET platform of internet of things to realize in face: Xiang Zhiding topic sends data, subscribes to topic and receive the function such as data Energy.
Using MQTT agreement in terms of communication protocol:
MQTT is an open lightweight Machine To Machine agreement, aims at Internet of Things interaction design.MQTT network includes one A MQTT broker broker is responsible for coordinating the interaction between MQTT agency.Agency is distributor, and be responsible for publication makes for user Information, as shown in Figure 6.
The requirement of MQTT is considerably less, because it aims at the limited embedded device design of resource.In addition to space occupied lacks it Outside, even if being communicated by low-bandwidth network, outstanding communication high efficiency is can also be provided in MQTT, and assists compared with HTTP etc. View, MQTT have considerably less expense.In 3G network, the throughput speeds of MQTT are the declarative states using HTTP 93 times for shifting REST.
Least method can be used to indicate the operation to implement in specific subject for MQTT, and then implement publish/subscribe mould Formula.Agency is first coupled to broker, then issues or subscribe to again theme.After the completion, agency will disconnect from broker. The definition of MQTT method:
Connection: the connection between MQTT broker is established.
It disconnects: disconnecting the connection between MQTT broker.
Publication: the issuing subject on MQTT broker.
It subscribes to: subscribing to theme from MQTT broker.
It quits the subscription of: quitting the subscription of theme from MQTT broker.
Feature and function:
(1) long connection protocol.
(2) number of terminals strong point reports, and the data vertex type of support includes integer int, floating number float, character string String, JSON format, binary data.
(3) platform message issues.
(4) subscription based on Topic, publication and message push, may be implemented the message unicast and multicast of equipment room.
The present embodiment can effectively save electric energy, it is easy to use because remotely control lighting system most power consumption part be The hardware of system only needs to provide the uninterrupted DC voltage of 3V-5V for the hardware of the monitoring of every group of lamp, can be using movement Power supply or battery power supply, power consumption almost can be ignored.
Assuming that headlamp is run 12 hours or more daily in daily life, and no festivals or holidays, unit area whole year power consumption 200kWh/m.a, being equipped with long-range control lighting system then can reduce 88000 yuan of 30%, Nian Jieyue or so for power consumption.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify to technical solution documented by previous embodiment or equivalent replacement of some of the technical features;And These are modified or replaceed, the spirit and model of technical solution of the embodiment of the present invention that it does not separate the essence of the corresponding technical solution It encloses.

Claims (10)

1. a kind of control lighting system based on the remote speech of wechat small routine and OneNet, which is characterized in that it includes illumination Lamp L, light perception circuit, lamp control economize on electricity road and development board;The light perception circuit includes photo resistance and anti-short-circuit resistance R1, Photo resistance and anti-short resistant series are followed by constituting closed circuit between the corresponding output pin and Gun interface of development board; Lamp control economize on electricity road includes anti-short-circuit resistance R2 and triode Q1, and the corresponding output pin of development board is through anti-short-circuit resistance R2 The base stage of connecting triode Q1, the collector of the triode Q1 connect headlamp L cathode, and headlamp L anode connects VCC power supply End, the emitter ground connection of triode Q1.
2. according to claim 1 control lighting system, feature based on the remote speech of wechat small routine and OneNet It is, the development board is Arduino development board.
3. according to claim 1 or 2 control lighting system based on the remote speech of wechat small routine and OneNet, special Sign is, further includes OneNET cloud server, and the development board calls OneNET cloud by its included WIFI component The data volume for holding server to provide downloads API.
4. utilizing the implementation method of remote speech control lighting system as claimed in claim 3, which is characterized in that the development board Upper includes storage unit and processor, is stored with the control light perception circuit that can be run on a processor and lamp control in storage unit Adjust the program of circuit, wherein proceed as follows when described program is executed by processor:
Wireless account, wireless cipher and MQTT server address are set, enables development board be wirelessly connected, is successfully connected WIFI Afterwards, OneNET device id is set gradually, OneNET product IDs connect OneNET cloud server with authentication information;After successful connection The theme of the headlamp L of OneNET cloud server and the theme of photo resistance are subscribed to, development board is adopted by reading photo resistance The photosensitive value of collection is simultaneously uploaded to OneNET cloud server.
5. utilizing the implementation method of remote speech control lighting system as claimed in claim 3, which is characterized in that the development board Upper includes storage unit and processor, is stored with the control light perception circuit that can be run on a processor and lamp control in storage unit Adjust the program of circuit, wherein proceed as follows when described program is executed by processor:
It is executed in function in the loop circulation of development board, a state variable state is set;State=1 and state=2 generation respectively Table manual mode and automatic mode, state=3 and state=4 respectively represent turn-on mode and mode of turning off the light, by following in loop Ring executes the user's state value that transmits free of discontinuities that receives in function and carrys out switch mode.
6. the implementation method of remote speech control lighting system according to claim 5, which is characterized in that in manual mode Under, first in call back function, receives and subscribe to message;Received message field is traversed out and is printed upon serial ports window, the 12nd A character representative manually adjusts brightness value, brightness value is saved as lightness variable, by lightness variable multiplied by positive parameter and assignment To PWM, so that the value of PWM controls within the scope of 0-255.
7. the implementation method of remote speech control lighting system according to claim 5, which is characterized in that in automatic mode Under, after the theme that development board subscribes to photo resistance, start reception photo resistance data free of discontinuities, while by photo resistance data It is imparted to PWM.
8. the implementation method of remote speech control lighting system according to claim 5, which is characterized in that turn on light described Mode is turned off the light under mode, adjustment pin current potential, and high potential corresponds to turn-on mode, the corresponding mode of turning off the light of low potential.
9. the implementation method of remote speech control lighting system according to claim 4, which is characterized in that user passes through micro- Any control instruction that letter small routine end is sent can first be uploaded to OneNET cloud server, then development board be allowed to read in real time The control instruction that OneNET cloud server issues controls headlamp L.
10. the implementation method of remote speech control lighting system according to claim 4, which is characterized in that in OneNET The method that MQTT agreement is accessed in cloud server is as follows:
(1) product is created, access protocol is selected:
The OneNET product that an access protocol is MQTT is created in OneNET platform, after creating OneNET product, described in record The product IDs of OneNET product;
(2) equipment is created, OneNET device id and authentication information are recorded;
(3) the agreement connection between equipment and OneNET platform is established;
(4) data flow creates, and data point uploads:
Using the interface function provided in SDK, writes code and upload the data to OneNET platform;
(5) data flow is shown, checks data point.
CN201910722027.4A 2019-08-06 2019-08-06 Lighting system and implementation method are controlled based on the remote speech of wechat small routine and OneNet Withdrawn CN110460596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910722027.4A CN110460596A (en) 2019-08-06 2019-08-06 Lighting system and implementation method are controlled based on the remote speech of wechat small routine and OneNet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910722027.4A CN110460596A (en) 2019-08-06 2019-08-06 Lighting system and implementation method are controlled based on the remote speech of wechat small routine and OneNet

Publications (1)

Publication Number Publication Date
CN110460596A true CN110460596A (en) 2019-11-15

Family

ID=68485105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910722027.4A Withdrawn CN110460596A (en) 2019-08-06 2019-08-06 Lighting system and implementation method are controlled based on the remote speech of wechat small routine and OneNet

Country Status (1)

Country Link
CN (1) CN110460596A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113691605A (en) * 2021-08-18 2021-11-23 深圳市晨北科技有限公司 Data transmission method and device, electronic equipment and storage medium
CN114810644A (en) * 2022-03-29 2022-07-29 惠州高盛达科技有限公司 Intelligent fan overall system based on asynchronous transceiver communication of Internet of things

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104470159A (en) * 2014-12-31 2015-03-25 南通大学 LED lighting system
CN105319978A (en) * 2015-12-09 2016-02-10 上海电机学院 Speech recognition based intelligent home control system
CN106774037A (en) * 2017-03-19 2017-05-31 北京工业大学 A kind of intelligent electric tracing control system based on Internet of Things cloud platform
CN108924990A (en) * 2018-05-24 2018-11-30 江门市阳邦智能科技有限公司 A kind of LED light control system and attaching method thereof based on wechat small routine
CN110045629A (en) * 2019-05-28 2019-07-23 贵州大学 A kind of intelligent security guard house control system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104470159A (en) * 2014-12-31 2015-03-25 南通大学 LED lighting system
CN105319978A (en) * 2015-12-09 2016-02-10 上海电机学院 Speech recognition based intelligent home control system
CN106774037A (en) * 2017-03-19 2017-05-31 北京工业大学 A kind of intelligent electric tracing control system based on Internet of Things cloud platform
CN108924990A (en) * 2018-05-24 2018-11-30 江门市阳邦智能科技有限公司 A kind of LED light control system and attaching method thereof based on wechat small routine
CN110045629A (en) * 2019-05-28 2019-07-23 贵州大学 A kind of intelligent security guard house control system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113691605A (en) * 2021-08-18 2021-11-23 深圳市晨北科技有限公司 Data transmission method and device, electronic equipment and storage medium
CN114810644A (en) * 2022-03-29 2022-07-29 惠州高盛达科技有限公司 Intelligent fan overall system based on asynchronous transceiver communication of Internet of things
CN114810644B (en) * 2022-03-29 2023-08-08 惠州高盛达科技有限公司 Intelligent fan overall system based on asynchronous transceiver communication of Internet of things

Similar Documents

Publication Publication Date Title
CN110912789B (en) Intelligent household Internet of things communication method based on Alicloud IoT Hub platform
CN109347659B (en) Intelligent terminal equipment and module remote upgrading method based on NB-IOT
CN105471686B (en) Terminal control method, device and system
CN103179520B (en) A kind of data delivery system based on recipient's state and method
CN107360030A (en) A kind of DALI intelligent lightings extension system and extended method
CN110266794A (en) Method for subscribing and system are acted on behalf of based on MQTT server
CN110460596A (en) Lighting system and implementation method are controlled based on the remote speech of wechat small routine and OneNet
WO2015000379A1 (en) Method for remotely controlling air conditioner and remote control system for air conditioner
CN104468649A (en) Server, terminal, data pushing system and data pushing method
CN108234562B (en) Equipment control method, control equipment and controlled equipment
CN110519299A (en) A kind of internet intelligent terminal system and its application method for supporting multi-protocols adaptation
CN110703617A (en) Intelligent home control system based on MQTT
CN113572782A (en) Internet of things gateway supporting multiple sensor networks and implementation method thereof
CN104717135B (en) Method and device for realizing intelligent household gateway
CN202475495U (en) Cloud refrigerator system based on cloud computing and internet of things
CN110113438A (en) A kind of heavy construction environmental monitoring system based on LoRa
Sinha et al. Design of an energy efficient Iot enabled smart system based on DALI network over MQTT protocol
CN112788820A (en) Intelligent power plant's lighting system based on MQTT and Zigbee agreement
Bhardwaj et al. Power-managed smart lighting using a semantic interoperability architecture
CN203279208U (en) Gateway based on GPRS (general packet radio service) mobile network and ZigBee wireless network
CN116208486A (en) Gateway backup and replacement method and system
CN114051030B (en) Communication method, communication device, intelligent community system and storage medium
CN103813294B (en) State information searching method and system, Interworking gateway
CN113596625A (en) Electric energy meter data transmission method and device of message queue telemetry transmission protocol
WO2022165765A1 (en) Message exchange method and apparatus in internet of things, and computer device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20191115