Skip to content

Commit

Permalink
support for raspyrfm hardware with unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
Phunkafizer committed Feb 17, 2019
1 parent 2ffea92 commit fddae90
Show file tree
Hide file tree
Showing 12 changed files with 1,086 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CMakeConfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(WEBSERVER_HTTPS ON CACHE BOOL "enable webserver ssl protocol")
set(EVENTS ON CACHE BOOL "enable the eventing functionality")
set(ZWAVE OFF CACHE BOOL "enable Z-Wave support")
set(IR OFF CACHE BOOL "enable IR remotes support")
set(PILIGHT_UNITTEST OFF CACHE BOOL "build pilight unittests")
set(PILIGHT_UNITTEST ON CACHE BOOL "build pilight unittests")
set(PROTOCOL_ALECTO_WS1700 ON CACHE BOOL "support for the Alecto WS1700 protocol")
set(PROTOCOL_ALECTO_WSD17 ON CACHE BOOL "support for the Alecto WSD 17 protocol")
set(PROTOCOL_ALECTO_WX500 ON CACHE BOOL "support for the Alecto WX500 protocol")
Expand Down Expand Up @@ -89,3 +89,4 @@ set(PROTOCOL_X10 ON CACHE BOOL "support for the X10 protocol")
set(PROTOCOL_XBMC ON CACHE BOOL "support for the XBMC API")
set(HARDWARE_433_GPIO ON CACHE BOOL "support for the direct GPIO communication")
set(HARDWARE_433_LIRC ON CACHE BOOL "support for the lirc_rpi kernel module")
set(HARDWARE_RASPYRFM ON CACHE BOOL "support for the RaspyRFM radiomodule")
90 changes: 90 additions & 0 deletions docs/source/configuration/hardware.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
Hardware
========

- `Disabled`_
- `433.92Mhz`_
- `433lirc`_
- `433gpio`_
- `433nano`_

Introduction
------------

.. warning::

Make sure pilight is not running before editing your configuration or else all changes will be lost.

Since pilight 3.0 the feature to send and receive from multiple hardware modules has been introduced. This means you can control various different frequencies at the same time. However, only one module per frequency is supported. Each hardware module has its own syntax as listed below.

Disabled
--------

.. code-block:: json
:linenos:
{
"hardware": {
"none": { }
}
}
433.92Mhz
---------

.. _433lirc:
.. rubric:: Lirc Kernel Module

.. code-block:: json
:linenos:
{
"hardware": {
"433lirc": {
"socket": "/dev/lirc0"
}
}
}
.. _433gpio:
.. rubric:: Direct GPIO Access

.. code-block:: json
:linenos:
{
"hardware": {
"433gpio": {
"sender": 0,
"receiver": 1
}
}
}
The default configuration to be used with the pilight PCB. When using custom wiring, refer to http://www.wiringx.org for the pin numbering of the various supported devices. If you want to disable the sender or receiver pin, set it to
-1.

.. versionchanged:: 8.0

You must now specify which GPIO platform pilight is running on. Refer to the settings page for more information.

.. _433nano:
.. rubric:: pilight USB Nano

.. code-block:: json
:linenos:
{
"hardware": {
"433nano": {
"comport": "/dev/ttyUSB0"
}
}
}
The comport value needs to correspond to a valid COM device on your platform. On Windows this value is generally formatted as COM1, on Linux as /dev/ttyUSB0, and on FreeBSD /dev/cuau0.

433.92Mhz / 868Mhz
------------------

.. include:: ../hardware/_raspyrfm.rst

35 changes: 35 additions & 0 deletions docs/source/hardware/_raspyrfm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. image:: ../images/raspyrfm.jpg

.. rubric:: Config

Example configuration for a RaspyRFM single 868 MHz
.. code-block:: json
:linenos:
{
"hardware": {
"raspyrfm": {
"spi-channel": 0,
"frequency": 868350
}
}
}
Example configuration for a RaspyRFM single 433 MHz
.. code-block:: json
:linenos:
{
"hardware": {
"raspyrfm": {
"spi-channel": 0,
"frequency": 433920
}
}
}
.. note:: **RaspyRFM**

The RaspyRFM is a radiomodule using the RFM69 from HopeRF.
https://www.seegel-systeme.de/produkt/raspyrfm-ii/
Binary file added docs/source/images/raspyrfm.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion libs/pilight/hardware/CMakeExclude.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ endif()
if(${IR} MATCHES "OFF")
list(REMOVE_ITEM ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/IRgpio.h")
list(REMOVE_ITEM ${PROJECT_NAME}_sources "${PROJECT_SOURCE_DIR}/IRgpio.c")
endif()
endif()

if(${HARDWARE_RASPYRFM} MATCHES "OFF")
list(REMOVE_ITEM ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/raspyrfm.h")
list(REMOVE_ITEM ${PROJECT_NAME}_sources "${PROJECT_SOURCE_DIR}/raspyrfm.c")
endif()
Empty file modified libs/pilight/hardware/hardware.c
100644 → 100755
Empty file.
Loading

0 comments on commit fddae90

Please sign in to comment.