The threshold is defined by the user. If a person is present in the room and the lightning is less than user-defined threshold then some number of lamps are turned on!
We use Kaa Endpoint Profile for device identification and discovery. Devices find by Location Info Schema, in this schema we store infomations about device room number and room owner.
- main.c contains source code for simple turn on and off of the lamp.
- Using KAA notification for turning the light on
- Created lamp application in the KAA server.
- Created mandatory notification topic for our lamp.
- Registered our notification topic in the endpoint groups.
- This guide is useful for learning UNIX C Serial Programming: UNIX Serial C Programming
- This guide is useful for connecting your application to KAA server: Your first KAA application
- You need this for emulating serial port: Null modem emulator
- Checkout screen cheatsheet: Screen cheatsheet
- For installing Lamp-RPi on RPi (!):
- Donwload Raspbian here
- Install Raspbian on SDcard with
unzip -p 2016-03-18-raspbian-jessie.zip | sudo dd of=/dev/mmcblk0 bs=32M
You can change listening IP address of Kaa Node service with:
sudo sed -i 's/transport_bind_interface=.*/transport_bind_interface={IP ADDRESS}/' /etc/kaa-node/conf/kaa-node.properties
sudo service kaa-node restart
And you can change embedding IP address of Kaa Node service in auto generated SDK with:
sudo sed -i 's/transport_public_interface=.*/transport_public_interface={IP ADDRESS}/' /etc/kaa-node/conf/kaa-node.properties
sudo service kaa-node restart