-
Notifications
You must be signed in to change notification settings - Fork 8
Raspberry
Mathias edited this page Jun 14, 2018
·
7 revisions
Raspberry takes care of sending data to the Cloud. The connection has following parts:
- RaspberryPi with sensor: Reads data from the real world.
- Client: Transforms input from Raspberry pins to Hogajama accepted format.
- MQTT Broker: MQTT is used as a transport protocol between the Client and Hogajama.
- Hogajama: Stores data und displays it to the users.
This data is sent from the Raspberry Pi to the cloud.
MQTT Topic
: habarama
{
"sensorName": <sensorName>,
"type": <sensorType>,
"value": <value>,
"location": <location>,
"version": <version>
}
This command is sent from the cloud to the Raspberry Pi.
MQTT Topic
: actor.<ActorLocation>.<ActorName>
{
"name": "<ActorName>",
"location": "<ActorLocation>",
"duration": duration in seconds
}
Located in $project-repository/Habarama/client/python/plant.py
.
- Enabled hardware SPI
- Python dependencies:
- build-essential
- python-pip
- python-dev
- python-smbus
- Adafruit_Python_GPIO
- Adafruit_Python_MCP3008
- eclipse/paho.mqtt.python
The client reads configuration form habarama.json
located in current working directory.
{
"brokerUrls": ["broker1", "broker2"],
"sensors": [
{
"name": "<sensor.name>",
"type": "<sensor.type>",
"location": "<sensor.location>",
"channel": <sensor.channel>,
"pin": <sensor.pin>
}
],
"actors": [
{
"name": "<actor.name>",
"location": "<actor.location>",
"type": "<actor.type>",
"pin": "<actor.pin>"
}
]
}
-
brokerUrls
: Array of MQTT broker URLs. -
sensors
: Array of sensors connected to Raspberry Pi. -
sensors.name
: Unique name for sensor for given location and type. Type: String -
sensors.type
: Describes which kind of values the sensor reads. Type: String -
sensors.location
: Where is sensor located. Type: String -
sensors.channel
: The channel on MCP3008 chip. Type: Number -
sensors.pin
: To which pin is the sensor connected. Type: Number -
actors
: Array of actors connected to Raspberry Pi. -
actors.name
: Unique name for actor for given location. Type: String -
actors.location
: Where the actor is located. Type:String -
actors.type
: Describes the kind of actor. Currently possible values are supported: gpio | console. Type: String -
actors.pin
: To which pin the actor is connected. This is only required in caseactors.type
isgpio
. Type: Number
- Home
- Setup Guide
- Using Hogarama
-
Cloud Components
- AMQ
- MongoDB
- Single Sign On
- Hogajama
- Kafka
- Habarama
- Troubleshooting Hogarama
- Optional Modules
- Developer Guideline