aquaticus / nexus433 Goto Github PK
View Code? Open in Web Editor NEW433MHz temperature and humidity sensor receiver that integrates with home automation systems.
License: GNU General Public License v3.0
433MHz temperature and humidity sensor receiver that integrates with home automation systems.
License: GNU General Public License v3.0
I'm getting the error:
pi@pi4build:~/Projects/debug $ make
Scanning dependencies of target version
[ 0%] Built target version
Scanning dependencies of target nexus433
[ 12%] Building CXX object CMakeFiles/nexus433.dir/config.cpp.o
[ 25%] Building CXX object CMakeFiles/nexus433.dir/decoder.cpp.o
[ 37%] Building CXX object CMakeFiles/nexus433.dir/led.cpp.o
[ 50%] Building CXX object CMakeFiles/nexus433.dir/main.cpp.o
/home/pi/Projects/nexus433/main.cpp: In function ‘int main(int, char**)’:
/home/pi/Projects/nexus433/main.cpp:348:9: error: ‘gpiod_line_close_chip’ was not declared in this scope
gpiod_line_close_chip(line);
^~~~~~~~~~~~~~~~~~~~~
/home/pi/Projects/nexus433/main.cpp:348:9: note: suggested alternative: ‘gpiod_line_get_chip’
gpiod_line_close_chip(line);
^~~~~~~~~~~~~~~~~~~~~
gpiod_line_get_chip
/home/pi/Projects/nexus433/main.cpp:360:9: error: ‘gpiod_line_close_chip’ was not declared in this scope
gpiod_line_close_chip(line);
^~~~~~~~~~~~~~~~~~~~~
/home/pi/Projects/nexus433/main.cpp:360:9: note: suggested alternative: ‘gpiod_line_get_chip’
gpiod_line_close_chip(line);
^~~~~~~~~~~~~~~~~~~~~
gpiod_line_get_chip
/home/pi/Projects/nexus433/main.cpp:378:5: error: ‘gpiod_line_close_chip’ was not declared in this scope
gpiod_line_close_chip(line);
^~~~~~~~~~~~~~~~~~~~~
/home/pi/Projects/nexus433/main.cpp:378:5: note: suggested alternative: ‘gpiod_line_get_chip’
gpiod_line_close_chip(line);
^~~~~~~~~~~~~~~~~~~~~
gpiod_line_get_chip
make[2]: *** [CMakeFiles/nexus433.dir/build.make:102: CMakeFiles/nexus433.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/nexus433.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
I followed the installation steps given in the Readme, but I'm lost as to whether it is something I have done wrong.
This is being built on a Raspberry Pi 4 B+ running the latest 32 Bit Pi OS with full desktop
Thanks
James
thanks for the great program, well done!
after setting it all up I don't seem to be getting any data from two temperature sensors (Oregon Scientific RMR382 and Ea2 AL802):
pi@bereskapi-ha:~/nexus433 $ sudo nexus433 --verbose -n 17
Loading configuration from /etc/nexus433.ini
Reading data from 433MHz receiver on /dev/gpiochip0 pin 17.
Decoder resolution: 1 µs; tolerance: 300 µs
Connected to MQTT broker.
how can i debug this?
are my sensors not nexus compatible?
thank you
Looking at the Digoo DG-R8H and curious as to how many sensors you have managed to get working simultaneously. Saw the comment regarding staggering the transmissions by disconnecting batteries. Looking for a solution to ideally support 12-16 sensors max. Multiple gateway/receiver and/or channel switching is fine. Any suggestions welcome.
The lack of unique IDs makes it impossible to rename sensors in HA.
found some on amazon and aliexpress, but they don't specifically state if they support the nexus protocol or not... here's one for example:
Can you post where you got yours?
Individual topics for sensor connection must be published with retention flag. This is needed to keep valid connection state when the program is down.
Add a new configuration option to change client ID. This makes it possible to connect more than 1 device running nexus433 to one MQTT server.
I enabled nexus433 to run as a service at start-up with:
sudo systemctl enable nexus433
And it starts after reboot... kind of, I don't find it with htop and sudo service nexus433
status displays:
root@raspberrypi:/home/pi# service nexus433 status
● nexus433.service - 433MHz sensor receiver
Loaded: loaded (/etc/systemd/system/nexus433.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-03-03 11:05:06 GMT; 1min 32s ago
Main PID: 234 (code=exited, status=249)
Mar 03 11:05:05 raspberrypi systemd[1]: Started 433MHz sensor receiver.
Mar 03 11:05:06 raspberrypi nexus433[234]: Loading configuration from /etc/nexus433.ini
Mar 03 11:05:06 raspberrypi nexus433[234]: Unable to connect to MQTT server.
Mar 03 11:05:06 raspberrypi nexus433[234]: Connection Refused: unknown reason.
Mar 03 11:05:06 raspberrypi systemd[1]: nexus433.service: Main process exited, code=exited, status
Mar 03 11:05:06 raspberrypi systemd[1]: nexus433.service: Unit entered failed state.
Mar 03 11:05:06 raspberrypi systemd[1]: nexus433.service: Failed with result 'exit-code'.
But if I manually start the service with sudo service nexus433 start
it will start and run without any problem. As the log says, the MQTT broker refuses the connection but if I do it manually, it works.
My MQTT broker is Mosquitto which is installed under Hassio, onto another machine. I checked Mosquitto's logs, no entry found related to these lines:
Mar 03 11:05:06 raspberrypi nexus433[234]: Unable to connect to MQTT server.
Mar 03 11:05:06 raspberrypi nexus433[234]: Connection Refused: unknown reason.
The MQTT credentials are fine, I double checked them in /etc/nexus433.ini
(I guess this is the configuration file it is used for start-up, right? I also verified the path: /etc/systemd/system/
, the file nexus433.service
is in the right place.
I understood from the documentation that after every change something in the .ini files in the release, I must use make
and make install
command, which I did everytime.
Any other ideea to solve the start-up issue with nexus433?
Thanks!
I installed your solution (congrats for it, it's the only working one for DG-R8H) on a Raspberry Pi0. With htop I can see nexus433 thread taking 99% of CPU. Is this normal? I have a fresh image on Raspbian, the only role for RPi is to be a gateway between 433Mhz and Mosquitto under Hassio.
Thanks!
I have been trying a whole weekend to install libgpiod on Raspbian - RPi ZeroW but no matter I did, when I ran autogen.sh, this stopped with this error:
.
.
.
checking linux/version.h usability... yes
checking linux/version.h presence... yes
checking for linux/version.h... yes
configure: error: "libgpiod needs linux headers version >= v5.5.0"
I don't exactly know why this error(maybe it is related to this), i tried to install it on different Linux versions and machines but eventually I found another tutorial to install libgpiod (which worked):
https://www.acmesystems.it/libgpiod
apt-get install -y libtool pkg-config autoconf-archive python3-dev
apt-get install -y build-essential
wget https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-1.1.1.tar.gz
tar xvf libgpiod-1.1.1.tar.gz
cd libgpiod-1.1.1
export PYTHON_VERSION=3
./autogen.sh --enable-tools=yes --enable-bindings-python --prefix=/usr/local
make
make install
ldconfig
I hope this will help someone, as it definitely helped me.
HI,
Had one Raspberry Pi with the Mosquitto Broker and Nexus433. I had problem with receiving signals from the sensors in the far end of home so I decided to buy another Raspberry, install second instance of Nexus433 on it and connect it to the Mqtt borker on first Raspberry. When Itry to run the second instance of Nexuss433 i get
"Connected to MQTT broker.
MQTT Disconnected. Connection Refused: unknown reason.
MQTT Reconnecting"
and this message appears in a loop until i kill the process. I read that this is caused by the same ID of MQTT client trying to connect to broker. Is there a way to change the ID of the second Nexus433 instance ?
I have a Raspberry Pi 3, and installed nexus433 with a RXB6 receptor. It worked perfectly on the first attempt and was able to recive the data from 3 Digoo DG-R8H sensors.
After a few days I had some hardware issues (apparently due to a faulty power supply), and afterwards nexus433 stopped working. It exited with the following messages:
Loading configuration from /etc/nexus433.ini
Request for line input failed.
I upgraded raspbian with:
sudo apt update
sudo apt full-upgrade
And the Request for line input failed.
error dissapeared, but nexus433 was not longer able to connect to MQTT:
pi@raspberrypi1:~ $ sudo nexus433 --verbose -n 22
Loading configuration from /etc/nexus433.ini
Reading data from 433MHz receiver on /dev/gpiochip0 pin 22.
Decoder resolution: 1 µs; tolerance: 300 µs
Connected to MQTT broker.
MQTT Disconnected. Connection Refused: unknown reason.
My MQTT sever is in the same Pi, and working properly
pi@raspberrypi1:~ $ mosquitto_sub -h 127.0.0.1 -p 1883 -t +/# -v
Is able to connect and display MQTT messages from other publishers, and I made no changes to /etc/nexus433.ini
I reinstalled nexus433 and rebooted the Pi, with the same effect.
Can you help me troubleshoot this problem?
Add certificate authentication for MQTT client.
When the program starts it currently tries once get connected to MQTT broker. If there is connection error (e.g. no broker running) it stops.
If connection is lost when program passes initialization, it keep connecting all the time.
It should repeat connecting infinitely at the initialization stage.
In the docs say to connect the sensor to 5V, GND and then to GPIO17.
Is it safe to connect the receiver using 5V on the GPIO that tolerates 3.3V?
Hello
could someone explain how to use this with domoticz
i have 4 Digoo DG-R8B 433Mhz temp humid sensors
fridge freezer living outdoor
what i do now is in main.cpp i write the sensors to a html file web server location on disk
http://84.106.2.21:8888/wirelestemps.html
and domoticz on another pi is reading the above 4 sensor html page every minute with a lua script
catching what ever from the 4 sensors is on at that moment
http://test:[email protected]:8080/#/Floorplans
it works
but its not how it should be
can anyone explain how to do the mqtt with domoticz?
http://84.106.2.21:8888/forum/index.php?action=view&id=213
i can recieve some sensor values on my phone using mqtt client localip:1883
and nexus433/#
but im stuck
Thanks
greetings luberth from the netherlands
Something else
if i want the only the outdoor sensor temperature humidity for display on a html webserver page
so that other people in my neighborhood can see the outdoor temperature in Bangert Andijk NL
how would you do that
my coding skills are not that good ;-)
next if is not working ;-(
if ((it->GetId()) = "bc")VERBOSE_PRINTF("this bc is the id of outoor sensor" ){
do verbose print of outdoor sensor to html file in webserver directory
}
Blink LED when new packet is coming.
Add configuration options for internal LEDs.
Line 92 in 07b4182
I'm sorry for my English
Hi,
First of all thank you for creating this program, it's making things a lot easier!
I'm having problem with displaying values from nexus433 in Home Assistant, it seems that MQTT is receiving data and it adds devices but it seems like it's not showing the readings:
Here is the screenshot from the HA: (translating to english it basically means Unavailable for readings and unknown for number of active readers:
And here is debug info from MQTT:
{
"home_assistant": {
"installation_type": "Home Assistant Container",
"version": "2022.9.5",
"dev": false,
"hassio": false,
"virtualenv": false,
"python_version": "3.10.5",
"docker": true,
"arch": "armv7l",
"timezone": "Europe/Warsaw",
"os_name": "Linux",
"os_version": "5.15.61-v7l+",
"run_as_root": true
},
"custom_components": {},
"integration_manifest": {
"domain": "mqtt",
"name": "MQTT",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/mqtt",
"requirements": [
"paho-mqtt==1.6.1"
],
"dependencies": [
"http"
],
"codeowners": [
"@emontnemery"
],
"iot_class": "local_push",
"is_built_in": true
},
"data": {
"connected": true,
"mqtt_config": {
"birth_message": {
"topic": "homeassistant/status",
"payload": "online",
"qos": 0,
"retain": false
},
"discovery": true,
"port": 1883,
"tls_version": "auto",
"will_message": {
"topic": "homeassistant/status",
"payload": "offline",
"qos": 0,
"retain": false
},
"protocol": "3.1.1",
"discovery_prefix": "homeassistant",
"keepalive": 60,
"broker": "127.0.0.1"
},
"devices": [
{
"id": "a11ea1645bdc405903af2f76b58faf14",
"name": "Nexus433 433MHz gateway",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": [
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.number_of_active_433_mhz_transmitters",
"icon": null,
"original_device_class": null,
"original_icon": null,
"state": {
"entity_id": "sensor.number_of_active_433_mhz_transmitters",
"state": "unknown",
"attributes": {
"friendly_name": "Number of active 433 MHz transmitters"
},
"last_changed": "2022-09-22T06:17:41.592841+00:00",
"last_updated": "2022-09-22T06:17:41.592841+00:00"
},
"unit_of_measurement": null
}
]
},
{
"id": "0ad4a4e7522ae33bc3395390423efb25",
"name": "Temperatue Sensor Id:AD ch 1",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": [
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.temperature_id_ad_ch_1",
"icon": null,
"original_device_class": "temperature",
"original_icon": null,
"state": {
"entity_id": "sensor.temperature_id_ad_ch_1",
"state": "unavailable",
"attributes": {
"unit_of_measurement": "\u00b0C",
"device_class": "temperature",
"friendly_name": "Temperature Id:AD ch 1"
},
"last_changed": "2022-09-22T06:17:41.624026+00:00",
"last_updated": "2022-09-22T06:17:41.624026+00:00"
},
"unit_of_measurement": "\u00b0C"
},
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.humidity_id_ad_ch_1",
"icon": null,
"original_device_class": "humidity",
"original_icon": null,
"state": {
"entity_id": "sensor.humidity_id_ad_ch_1",
"state": "unavailable",
"attributes": {
"unit_of_measurement": "%",
"device_class": "humidity",
"friendly_name": "Humidity Id:AD ch 1"
},
"last_changed": "2022-09-22T06:17:41.626417+00:00",
"last_updated": "2022-09-22T06:17:41.626417+00:00"
},
"unit_of_measurement": "%"
},
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.battery_id_ad_ch_1",
"icon": null,
"original_device_class": "battery",
"original_icon": null,
"state": {
"entity_id": "sensor.battery_id_ad_ch_1",
"state": "unavailable",
"attributes": {
"unit_of_measurement": "%",
"device_class": "battery",
"friendly_name": "Battery Id:AD ch 1"
},
"last_changed": "2022-09-22T06:17:41.630863+00:00",
"last_updated": "2022-09-22T06:17:41.630863+00:00"
},
"unit_of_measurement": "%"
},
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.quality_id_ad_ch_1",
"icon": null,
"original_device_class": "signal_strength",
"original_icon": null,
"state": {
"entity_id": "sensor.quality_id_ad_ch_1",
"state": "unavailable",
"attributes": {
"unit_of_measurement": "%",
"device_class": "signal_strength",
"friendly_name": "Quality Id:AD ch 1"
},
"last_changed": "2022-09-22T06:17:41.636525+00:00",
"last_updated": "2022-09-22T06:17:41.636525+00:00"
},
"unit_of_measurement": "%"
}
]
},
{
"id": "dc2d9b562529735606d43410e9fddbb7",
"name": "Temperatue Sensor Id:BF ch 2",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": [
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.temperature_id_bf_ch_2",
"icon": null,
"original_device_class": "temperature",
"original_icon": null,
"state": {
"entity_id": "sensor.temperature_id_bf_ch_2",
"state": "unavailable",
"attributes": {
"unit_of_measurement": "\u00b0C",
"device_class": "temperature",
"friendly_name": "Temperature Id:BF ch 2"
},
"last_changed": "2022-09-22T06:17:41.637049+00:00",
"last_updated": "2022-09-22T06:17:41.637049+00:00"
},
"unit_of_measurement": "\u00b0C"
},
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.humidity_id_bf_ch_2",
"icon": null,
"original_device_class": "humidity",
"original_icon": null,
"state": {
"entity_id": "sensor.humidity_id_bf_ch_2",
"state": "unavailable",
"attributes": {
"unit_of_measurement": "%",
"device_class": "humidity",
"friendly_name": "Humidity Id:BF ch 2"
},
"last_changed": "2022-09-22T06:17:41.642967+00:00",
"last_updated": "2022-09-22T06:17:41.642967+00:00"
},
"unit_of_measurement": "%"
},
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.battery_id_bf_ch_2",
"icon": null,
"original_device_class": "battery",
"original_icon": null,
"state": {
"entity_id": "sensor.battery_id_bf_ch_2",
"state": "unavailable",
"attributes": {
"unit_of_measurement": "%",
"device_class": "battery",
"friendly_name": "Battery Id:BF ch 2"
},
"last_changed": "2022-09-22T06:17:41.648420+00:00",
"last_updated": "2022-09-22T06:17:41.648420+00:00"
},
"unit_of_measurement": "%"
},
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.quality_id_bf_ch_2",
"icon": null,
"original_device_class": "signal_strength",
"original_icon": null,
"state": {
"entity_id": "sensor.quality_id_bf_ch_2",
"state": "unavailable",
"attributes": {
"unit_of_measurement": "%",
"device_class": "signal_strength",
"friendly_name": "Quality Id:BF ch 2"
},
"last_changed": "2022-09-22T06:17:41.650067+00:00",
"last_updated": "2022-09-22T06:17:41.650067+00:00"
},
"unit_of_measurement": "%"
}
]
}
],
"mqtt_debug_info": {
"entities": [
{
"entity_id": "sensor.number_of_active_433_mhz_transmitters",
"subscriptions": [
{
"topic": "nexus433/sensor/DCA632044E6A/connection",
"messages": [
{
"payload": "online",
"qos": 0,
"retain": 1,
"time": "2022-09-22T06:17:41.592033+00:00",
"topic": "nexus433/sensor/DCA632044E6A/connection"
}
]
},
{
"topic": "nexus433/sensor/DCA632044E6A/state",
"messages": []
}
],
"discovery_data": {
"topic": "homeassistant/sensor/nexus433_DCA632044E6A/config",
"payload": {
"state_topic": "nexus433/sensor/DCA632044E6A/state",
"unique_id": "nexus433_DCA632044E6A_active",
"name": "Number of active 433 MHz transmitters",
"value_template": "{{value_json.active}}",
"enabled_by_default": "true",
"availability_topic": "nexus433/sensor/DCA632044E6A/connection",
"device": {
"manufacturer": "aquaticus",
"name": "Nexus433 433MHz gateway",
"model": "nexus433",
"identifiers": [
"DCA632044E6A"
],
"sw_version": "v1.1.0-3-g35c708d"
},
"platform": "mqtt"
}
},
"transmitted": []
},
{
"entity_id": "sensor.temperature_id_ad_ch_1",
"subscriptions": [
{
"topic": "nexus433/sensor/DCA632044E6A_ad00/connection",
"messages": []
},
{
"topic": "nexus433/sensor/DCA632044E6A_ad00/state",
"messages": [
{
"payload": "{ \"temperature\": 22.4, \"humidity\": 65, \"battery\": \"100\", \"quality\": 91 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:18:25.560515+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.4, \"humidity\": 65, \"battery\": \"100\", \"quality\": 91 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:19:22.102775+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.3, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:20:19.144770+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.3, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:21:16.166428+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.2, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:22:13.175398+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
}
]
}
],
"discovery_data": {
"topic": "homeassistant/sensor/nexus433_DCA632044E6A_ad00_temperature/config",
"payload": {
"name": "Temperature Id:AD ch 1",
"device_class": "temperature",
"state_topic": "nexus433/sensor/DCA632044E6A_ad00/state",
"availability_topic": "nexus433/sensor/DCA632044E6A_ad00/connection",
"unit_of_measurement": "\u00b0C",
"value_template": "{{ value_json.temperature }}",
"expire_after": 90,
"unique_id": "nexus433_DCA632044E6A_ad00_temperature",
"device": {
"name": "Temperatue Sensor Id:AD ch 1",
"model": "433 MHz",
"identifiers": [
"DCA632044E6A.ad00"
],
"via_device": "DCA632044E6A"
},
"platform": "mqtt"
}
},
"transmitted": []
},
{
"entity_id": "sensor.humidity_id_ad_ch_1",
"subscriptions": [
{
"topic": "nexus433/sensor/DCA632044E6A_ad00/connection",
"messages": []
},
{
"topic": "nexus433/sensor/DCA632044E6A_ad00/state",
"messages": [
{
"payload": "{ \"temperature\": 22.4, \"humidity\": 65, \"battery\": \"100\", \"quality\": 91 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:18:25.560515+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.4, \"humidity\": 65, \"battery\": \"100\", \"quality\": 91 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:19:22.102775+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.3, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:20:19.144770+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.3, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:21:16.166428+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.2, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:22:13.175398+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
}
]
}
],
"discovery_data": {
"topic": "homeassistant/sensor/nexus433_DCA632044E6A_ad00_humidity/config",
"payload": {
"name": "Humidity Id:AD ch 1",
"device_class": "humidity",
"state_topic": "nexus433/sensor/DCA632044E6A_ad00/state",
"availability_topic": "nexus433/sensor/DCA632044E6A_ad00/connection",
"unit_of_measurement": "%",
"value_template": "{{ value_json.humidity }}",
"expire_after": 90,
"unique_id": "nexus433_DCA632044E6A_ad00_humidity",
"device": {
"name": "Temperatue Sensor Id:AD ch 1",
"model": "433 MHz",
"identifiers": [
"DCA632044E6A.ad00"
],
"via_device": "DCA632044E6A"
},
"platform": "mqtt"
}
},
"transmitted": []
},
{
"entity_id": "sensor.battery_id_ad_ch_1",
"subscriptions": [
{
"topic": "nexus433/sensor/DCA632044E6A_ad00/connection",
"messages": []
},
{
"topic": "nexus433/sensor/DCA632044E6A_ad00/state",
"messages": [
{
"payload": "{ \"temperature\": 22.4, \"humidity\": 65, \"battery\": \"100\", \"quality\": 91 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:18:25.560515+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.4, \"humidity\": 65, \"battery\": \"100\", \"quality\": 91 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:19:22.102775+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.3, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:20:19.144770+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.3, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:21:16.166428+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.2, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:22:13.175398+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
}
]
}
],
"discovery_data": {
"topic": "homeassistant/sensor/nexus433_DCA632044E6A_ad00_battery/config",
"payload": {
"name": "Battery Id:AD ch 1",
"device_class": "battery",
"state_topic": "nexus433/sensor/DCA632044E6A_ad00/state",
"availability_topic": "nexus433/sensor/DCA632044E6A_ad00/connection",
"unit_of_measurement": "%",
"value_template": "{{ value_json.battery }}",
"expire_after": 90,
"unique_id": "nexus433_DCA632044E6A_ad00_battery",
"device": {
"name": "Temperatue Sensor Id:AD ch 1",
"model": "433 MHz",
"identifiers": [
"DCA632044E6A.ad00"
],
"via_device": "DCA632044E6A"
},
"platform": "mqtt"
}
},
"transmitted": []
},
{
"entity_id": "sensor.quality_id_ad_ch_1",
"subscriptions": [
{
"topic": "nexus433/sensor/DCA632044E6A_ad00/connection",
"messages": []
},
{
"topic": "nexus433/sensor/DCA632044E6A_ad00/state",
"messages": [
{
"payload": "{ \"temperature\": 22.4, \"humidity\": 65, \"battery\": \"100\", \"quality\": 91 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:18:25.560515+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.4, \"humidity\": 65, \"battery\": \"100\", \"quality\": 91 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:19:22.102775+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.3, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:20:19.144770+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.3, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:21:16.166428+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
},
{
"payload": "{ \"temperature\": 22.2, \"humidity\": 65, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:22:13.175398+00:00",
"topic": "nexus433/sensor/DCA632044E6A_ad00/state"
}
]
}
],
"discovery_data": {
"topic": "homeassistant/sensor/nexus433_DCA632044E6A_ad00_quality/config",
"payload": {
"name": "Quality Id:AD ch 1",
"device_class": "signal_strength",
"state_topic": "nexus433/sensor/DCA632044E6A_ad00/state",
"availability_topic": "nexus433/sensor/DCA632044E6A_ad00/connection",
"unit_of_measurement": "%",
"value_template": "{{ value_json.quality }}",
"expire_after": 90,
"unique_id": "nexus433_DCA632044E6A_ad00_quality",
"device": {
"name": "Temperatue Sensor Id:AD ch 1",
"model": "433 MHz",
"identifiers": [
"DCA632044E6A.ad00"
],
"via_device": "DCA632044E6A"
},
"platform": "mqtt"
}
},
"transmitted": []
},
{
"entity_id": "sensor.temperature_id_bf_ch_2",
"subscriptions": [
{
"topic": "nexus433/sensor/DCA632044E6A_bf01/connection",
"messages": []
},
{
"topic": "nexus433/sensor/DCA632044E6A_bf01/state",
"messages": [
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:18:16.053557+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:19:22.602986+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:20:30.153114+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:21:37.668437+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 75 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:22:44.201900+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
}
]
}
],
"discovery_data": {
"topic": "homeassistant/sensor/nexus433_DCA632044E6A_bf01_temperature/config",
"payload": {
"name": "Temperature Id:BF ch 2",
"device_class": "temperature",
"state_topic": "nexus433/sensor/DCA632044E6A_bf01/state",
"availability_topic": "nexus433/sensor/DCA632044E6A_bf01/connection",
"unit_of_measurement": "\u00b0C",
"value_template": "{{ value_json.temperature }}",
"expire_after": 90,
"unique_id": "nexus433_DCA632044E6A_bf01_temperature",
"device": {
"name": "Temperatue Sensor Id:BF ch 2",
"model": "433 MHz",
"identifiers": [
"DCA632044E6A.bf01"
],
"via_device": "DCA632044E6A"
},
"platform": "mqtt"
}
},
"transmitted": []
},
{
"entity_id": "sensor.humidity_id_bf_ch_2",
"subscriptions": [
{
"topic": "nexus433/sensor/DCA632044E6A_bf01/connection",
"messages": []
},
{
"topic": "nexus433/sensor/DCA632044E6A_bf01/state",
"messages": [
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:18:16.053557+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:19:22.602986+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:20:30.153114+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:21:37.668437+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 75 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:22:44.201900+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
}
]
}
],
"discovery_data": {
"topic": "homeassistant/sensor/nexus433_DCA632044E6A_bf01_humidity/config",
"payload": {
"name": "Humidity Id:BF ch 2",
"device_class": "humidity",
"state_topic": "nexus433/sensor/DCA632044E6A_bf01/state",
"availability_topic": "nexus433/sensor/DCA632044E6A_bf01/connection",
"unit_of_measurement": "%",
"value_template": "{{ value_json.humidity }}",
"expire_after": 90,
"unique_id": "nexus433_DCA632044E6A_bf01_humidity",
"device": {
"name": "Temperatue Sensor Id:BF ch 2",
"model": "433 MHz",
"identifiers": [
"DCA632044E6A.bf01"
],
"via_device": "DCA632044E6A"
},
"platform": "mqtt"
}
},
"transmitted": []
},
{
"entity_id": "sensor.battery_id_bf_ch_2",
"subscriptions": [
{
"topic": "nexus433/sensor/DCA632044E6A_bf01/connection",
"messages": []
},
{
"topic": "nexus433/sensor/DCA632044E6A_bf01/state",
"messages": [
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:18:16.053557+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:19:22.602986+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:20:30.153114+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:21:37.668437+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 75 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:22:44.201900+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
}
]
}
],
"discovery_data": {
"topic": "homeassistant/sensor/nexus433_DCA632044E6A_bf01_battery/config",
"payload": {
"name": "Battery Id:BF ch 2",
"device_class": "battery",
"state_topic": "nexus433/sensor/DCA632044E6A_bf01/state",
"availability_topic": "nexus433/sensor/DCA632044E6A_bf01/connection",
"unit_of_measurement": "%",
"value_template": "{{ value_json.battery }}",
"expire_after": 90,
"unique_id": "nexus433_DCA632044E6A_bf01_battery",
"device": {
"name": "Temperatue Sensor Id:BF ch 2",
"model": "433 MHz",
"identifiers": [
"DCA632044E6A.bf01"
],
"via_device": "DCA632044E6A"
},
"platform": "mqtt"
}
},
"transmitted": []
},
{
"entity_id": "sensor.quality_id_bf_ch_2",
"subscriptions": [
{
"topic": "nexus433/sensor/DCA632044E6A_bf01/connection",
"messages": []
},
{
"topic": "nexus433/sensor/DCA632044E6A_bf01/state",
"messages": [
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:18:16.053557+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:19:22.602986+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:20:30.153114+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 100 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:21:37.668437+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
},
{
"payload": "{ \"temperature\": 21.0, \"humidity\": 57, \"battery\": \"100\", \"quality\": 75 }",
"qos": 0,
"retain": 0,
"time": "2022-09-22T06:22:44.201900+00:00",
"topic": "nexus433/sensor/DCA632044E6A_bf01/state"
}
]
}
],
"discovery_data": {
"topic": "homeassistant/sensor/nexus433_DCA632044E6A_bf01_quality/config",
"payload": {
"name": "Quality Id:BF ch 2",
"device_class": "signal_strength",
"state_topic": "nexus433/sensor/DCA632044E6A_bf01/state",
"availability_topic": "nexus433/sensor/DCA632044E6A_bf01/connection",
"unit_of_measurement": "%",
"value_template": "{{ value_json.quality }}",
"expire_after": 90,
"unique_id": "nexus433_DCA632044E6A_bf01_quality",
"device": {
"name": "Temperatue Sensor Id:BF ch 2",
"model": "433 MHz",
"identifiers": [
"DCA632044E6A.bf01"
],
"via_device": "DCA632044E6A"
},
"platform": "mqtt"
}
},
"transmitted": []
}
],
"triggers": []
}
}
}
make install
should not touch nexus433.ini
if exists.
It should copy new nexus433.ini
to /etc/nexus433.ini.original
Nexus433 announces sensors to Home Assistant only, when sensor is found. This means, that if Home Assistant is restarted, it does not know anything about sensors. I have had to manually restart nexus433 after restarting Home Assistant in order to get sensors announced again.
For automating this, I have created following:
Line in crontab:
@reboot ~/work/nexus-restart-subscribe.sh
Contents of the first script:
pi@nexus433:~ $ cat work/nexus-restart-subscribe.sh
#!/bin/bash
sleep 60
mosquitto_sub -t "homeassistant/status" -h <MQTT_BROKER_IP> | xargs -n 1 ~/work/nexus-restart.sh
pi@nexus433:~ $ cat work/nexus-restart.sh
#!/bin/bash
if [ "$1" == "online" ]
then
sudo systemctl restart nexus433.service
fi
This is a quick and dirty trick to enable nexus433 automatically restart, when Home Assistant instance is restarted.
Could this behavior be integrated into nexus433 itself?
If Home Assistant is restarted it will mark the sensors from Nexus433 as unavailable because it doesn't see the .../connection
topic anymore - only the .../state
topics are published. If nexus433 is restarted it recovers - nexus433 it will publish messages into the .../connection
again (when sensors send something again) and it works.
It looks like messages in the MQTT topic .../connection
which is used to keep track of the sensor availability in HA are not published with the "retain" flag or it doesn't work properly.
In order to make it work I had to abuse the "sensor state" topic to get a more reliable availability info:
- name: "Nexus433 CH01 Temperature"
state_topic: "nexus433/sensor/<sensor>/state"
value_template: "{{ value_json.temperature }}"
availability:
# Normally the availability topic is
# published only when nexus433 sees the sensor for the first time.
# If home-assistant is restarted it won't know about the sensor
# anymore, marking it unavailable. So I abused the "sensor state"
# topic to get availability from instead.
# - topic: "nexus433/sensor/<sensor>/connection"
- topic: "nexus433/sensor/<sensor>/state"
value_template: "{{ 'online' if value_json.temperature|is_defined else 'offline' }}"
expire_after: 300
force_update: true
Thank you for your work keeping this project alive. Let me know if I can help or provide more details.
Hi,
I’m working on a set of addon-scripts to install your nexus433 service as an addon on hass.io, and have it building, and can run the executable in verbose mode (starting it as a service comes later when it works).
But every time It tries to run the executable it responds “Request for line input failed.” - the addon has acces to /dev/gpiochip0 (evidenced by the fact that it doesnt output ano ofthe other gpio errors).
I was hoping that perhaps you could help me by explaining at bit about what this specific error means and what typically could cause this?
Thanks in advance
Hi,
thanks for this excellent tool. While trying to build a small rf transmitter based on a µC using the nexus protocol, I struggled to find information on how the temperature is encoded. Seems to be encoded as 12bits signed integer containing the temperature value in celsius degrees multiplied by 10.
Could this information be added to the Help files ?
Thanks a lot,
Vincent
Add support for LED connected to one of the I/O pins.
Hello there,
first of all thank you for your work! I am tinkering in Universal Radio Hacker and I think I found the meaning of the 10th bit in Nexus protocol. When you push the button on the sensor and force the update, this bit is 1. Otherwise (automatic periodic broadcast) the bit is 0.
Tested on the Auriol WEATHER STATION 4-LD5370 (from Lidl).
I have a question about how the application processes the output from the receiver. When I start the app with the default 1microsec resolution, it takes 40-45 percent of CPU on my RPi3. I have 2 sensors, it finds both of them, but it reports 30-40% quality (received frames), even if I put the sensor next to the receiver. I have a small but proper length and aligned antenna on the receiver. There are other applications are also running on the RPi (desktop), and it seems when the CPU usage is higher, the quality is degraded, even sensors are disappearing for a while. What do you suggest, should the nexus433 be moved to a separate board not to affected by any load to work correctly? I tried to set the priority of the process, doesn't really help. Also the higher idle CPU usage if the app is not really nice, can something be done about this?
Add support for 433 MHz transmitter.
Nexus encoder implementation needed.
This should work in 2 modes:
This functionality requires external hardware (433 MHz transmitter)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.