Giter Club home page Giter Club logo

monitorknxrf's Introduction

MonitorKNXRF

This is a fork of MonitorKNXRF where the integration with OpenHab has been removed. Instead the sensor data will be published to a MQTT Broker

General

This program is developed to be used on Raspberry Pi 3 together with a CC1101 radiomodule.

The program will listen to interrupts generated from the CC1101. When an interrupt is recieved the data will be stored to a variable length buffer of class SensorKNXRF. Every 15th second the program will send the data to a configured MQTT Broker.

Pin layout

Raspberry pin # Name CC1101
17 3.3V VCC
18 GPIO24 GDO0
19 GPIO10 (SPI_MOSI) SI
20 Ground GND
21 GPIO09 (SPI_MISO) SO
22 GPIO25 GDO2
23 GPIO11 (SPI_CLK) SCLK1
24 GPI008 (SP_CE0_N) CSn

Note: GDO0 is not used in the program. which GDO for interrupts to use is specifed in the configuration of the chip, see cc1101.cpp (look for IOCFG[0..2] and the data sheet for the CC1101.

Example

Compile the program by running make:

openhabian@hab:~/MonitorKNXRF$ make

Run the program with debug level 2:

./knx-monitor 2

Change set temperature on any of your thermostats, and wait a minimum 15 seconds. Press Ctrl+C to stop the program. Then check the log:

grep -in monitorknxrf /var/log/syslog
...
24447:Jan  2 12:09:00 hab knx-monitor: MonitorKNXRF is requesting data from Openhab.
24448:Jan  2 12:09:00 hab knx-monitor: MonitorKNXRF got data from sensor 007402363C12 reading 2232 and 1950.
24451:Jan  2 12:09:00 hab knx-monitor: MonitorKNXRF: marcstate: 0x01

In this case the actual temperature is 22.32 C and the set temperature is 19.5 C.

To make the program running as a system service you need to copy the the systemd files as this:

sudo cp knx-monitor /usr/bin/.
sudo cp knx-monitor.service /etc/systemd/system/.

Manual start / stop the service

sudo systemctl start knx-monitor.service
sudo systemctl stop knx-monitor.service
sudo systemctl status knx-monitor.service

Have the program started on system boot

sudo systemctl enable knx-monitor.service

MQTT Topic

  • home/uponor/<SENSOR_ID>/temperature
  • home/uponor/<SENSOR_ID>/temperature-target
  • home/uponor/<SENSOR_ID>/battery-ok
  • home/uponor/<SENSOR_ID>/rssi

Docker

The docker is still in progress. Goal is to have everything build and running in a docker container

Build image

Build docker image

docker build -t knx .

Test docker image

docker run -it --rm knx bash

monitorknxrf's People

Contributors

aviborg avatar rocketrunner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.