-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Please note that all information contained in this Wiki are expected specifications.
This project aims at being a Domogik plugin for the bugOne, a DIY wireless sensor board. The plugin has the following features:
- bugOne daemon, used to manage all communications
- bridge between the bugOne and xPL
- auto-detect available bugOne devices
- provide specific devices
- simplified addition of new devices
Devices for Domogik are the same as devices for bugOne. It is still unclear whether this is the good solution, the other one being to use a node for Domogik devices. The advantage of mapping devices to devices is that the solution is modular. You can have any combination of devices on a bugOne node, they will be seen independently, and can even be querried separately. However, you lose the "network" view of the bugOne network.
The other solution could be useful if we were sure of what type of nodes we would deploy. But it would require adding xPL devices for each type of nodes, which is impractical.
In order to provide the bugOne network view, we introduce a "bugnode" xPL devices. This contains information on RSSI, battery level, human readable name, available devices (future work) and presence, ...
For now, the following devices are provided :
-
bugone.temperature
: used for all temperature related devices (SHT21 and DS18B20) -
bugone.humidity
: used for all humidity related devices (SHT21, DHTX1) -
bugone.bugnode
: used to manage bugOne network
The following sensors are provided :
-
temperature
: simple mapping to bugone.temperature, provide the ambient temp -
humidity
: same as temperature -
battery
: used to provide battery level of a node -
name
: used to provide node name -
presence
: used to give information on node availability ("ping") -
rssi
: used to monitor signal strength from the node -
sleeptime
: used to inform the manager on the wakeup period of the board.
Switches and commands will be provided in a future version. In particular, a bugone.switch device for relay control, and the following commands:
-
switch
: simple mapping to bugone.switch -
hbeat
: setup a hbeat for a node -
interval
: setup data acquisition interval for a device -
txpower
: setup tx power (to save battery life, when rssi is sufficient) -
setsleep
: setup wakeup period of the board
### General configuration
General configuration is used to configure values for the global bugOne network:
-
ping interval
: interval between each ping of nodes. Due to the sleeping nature of bugOne boards, this value cannot be guaranteed. Some boards can sleep for a very long time (up to hours!). The daemon will ensure that ping requests do not gather in the message queue for a node.
In order to add a device, the following information must be provided:
-
nodeid
: the node id in which the device can be found -
devid
: the device id in the node (please note that this is the bugOne device id!) -
type
: the type of this device. This is necessary if automatic detection is not activated, or not implemented in the daemon.
The daemon provides 2 main functionalities:
- it translates information to and from xPL. This means that data, devices, nodes, ... are taken from the xPL message
- it manages transfer queues (read and write) to and from each node. More than that, it also manages status of a node (active, inactive, down). When a message is received from a node, it is marked as active. The sleeptime value is querried, and stored. Since in a managed network, each node must signal it's up when waking up, if no messages are received for more than sleeptime, the node is considered down.