https://github.com/araobp/device-simulator
HTML5/CSS3/AngularJS-based device simulator
https://github.com/araobp/device-simulator
angularjs html5 mosquitto mqtt websocket
Last synced: 3 months ago
JSON representation
HTML5/CSS3/AngularJS-based device simulator
- Host: GitHub
- URL: https://github.com/araobp/device-simulator
- Owner: araobp
- Created: 2018-02-21T11:41:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-03T21:48:43.000Z (over 8 years ago)
- Last Synced: 2025-03-11T02:48:39.205Z (over 1 year ago)
- Topics: angularjs, html5, mosquitto, mqtt, websocket
- Language: JavaScript
- Size: 6.13 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Device simulator based on HTML5 and AngularJS
## Prerequisite
- [mosquitto](https://mosquitto.org) is runnig somewhere, for example, on RasPi.
- The mosquitto has been made(compiled) with WebSockets option enabled.
- angular.min.js and browserMqtt.js is accesible from a simulator.
Refer to the following links for mosquitto and browserMqtt.js:
- [obtaining mosquitto with WebSockets enabled](https://xperimentia.com/2015/08/20/installing-mosquitto-mqtt-broker-on-raspberry-pi-with-websockets/)
- [building browserMqtt.js](https://github.com/mqttjs/MQTT.js/)
## Architecture
```
HTTP GET to download the HTML5 page
+ - - - - - - - - - - - - - -[HTTP server]
|
v
[Device simulator]---mqtt/WebSocket---[mosquitto]---mqtt---[mqtt client as remote controller]
(HTML5)
```
### Hello World
[sample](./index.html)
### Display
[display](./display.html)
### Image
[image](./display.html)
### Video
[video](./video.html)
### Elevator
[elavator](./elevator.html)
## Working with one-liner HTTP server
Assuming that mosquitto is running on RasPi and all the files above are also on RasPi, use one-liner HTTP server to use the simulator on another PC.
Installation
```
$ npm install -g http-server
```
Usage
```
$ http-server
```