|
|
# EnOcean IO Service
|
|
|
|
|
|
The EnOcean implementation in ENOSAR is a service to handle incoming and outgoing messages from/to EnOcean Devices.
|
|
|
To do this a EnOcean Pi is required for the raspberry pi
|
|
|
To do this a [EnOcean Pi](http://at.farnell.com/enocean/enocean-pi-868/mod-soc-gateway-trx-8051-mcu-868/dp/2322460?CMP=KNC-GAT-GEN-KWL-ENOCEAN&mckv=2734Iz1a_dc|pcrid|199139075407|&gclid=EAIaIQobChMIz7Kq_uOz1QIVogvTCh0o-wJmEAAYASAAEgLj1PD_BwE) is required for the Raspberry Pi.
|
|
|
|
|
|
**PID: org.enosar.service.io.enocean**
|
|
|
|
|
|
## Content
|
|
|
[[__TOC__]]
|
|
|
[[_TOC_]]
|
|
|
|
|
|
## Interface
|
|
|
|
|
|
### Incoming EnOcean Messages (from a EnOcean device)
|
|
|
On incoming messages from EnOcean Devices the Service publishes the message with the MappingService as DTO's to the MessagingService with the topic:
|
|
|
`io.enocean.[ENOSAR ID]`
|
|
|
The EnOcean Service receives messages from EnOcean devices. It accepts only devices that are registered in the Address Management ([Device and Address Management](#device)). The Service also handles also Teach-In and Teach-Out messages.
|
|
|
If a device has a entry in the Address Management the Service mapps the data to Enosar DTO's(Data Transfer Objects) and publishes the messages to the [MessagingService](https://ressel.fh-salzburg.ac.at/ENOSAR/Framework/wikis/tutorial-core-service-messaging). The topic of the messages are:
|
|
|
`in.homeatomation.enocean. [EnosarDevice].[EnosarID]`
|
|
|
* EnosarDevice: is the type of the device and is a consant from org.enosar.core.types
|
|
|
* EnosarID: is the ID of the device as it is in the Address Management
|
|
|
For more information see [Device and Address Management](#device)
|
|
|
|
|
|
|
|
|
### Outgoing EnOcean Messages (from a EnOcean device) and commands for the service
|
|
|
To send commands to EnOcean devices the Service receives EventDTO's from Applications over the CommunicationService.
|
|
|
The technology for the CommunicationService is `org.enosar.service.io.enocean`.
|
|
|
Because of the AddressDTO from the message the Client maps the ID to the device. There are 2 types of incoming messages:
|
|
|
|
|
|
* if an empty EventDTO (EventDTO data is empty) arrives the Service returns the actual status of the device over the MessagingService
|
|
|
|
|
|
* if the EventDTO data is not empty the device handles the DTO's, generates and sends the EnOceanMessages to the EnOcean device. Actual implemented commands:
|
|
|
|
|
|
* for D2 01 08 Devices:
|
... | ... | @@ -30,6 +35,7 @@ Because of the AddressDTO from the message the Client maps the ID to the device. |
|
|
* SwitchDTO: Turns on or off
|
|
|
|
|
|
|
|
|
<a name="device"></a>
|
|
|
## Device and Address Management
|
|
|
Every device must have an entry in the Address Management of ENOSAR. For this it is necessary to add every device in the Address Management in ENOSAR.
|
|
|
You can find this on `http://[IP ENOSAR]:8080` under Address Management.
|
... | ... | |