xsilvergs
Forum Member
Updated: 17-12-22
While sat in the van the other week we were using a cheap Lidl fan heater which has a very insensitive thermostat so we're too hot and then too cold! I thought this is a great opportunity to get the Ruuvi tag to control the fan heater so I set about some internet searching...
A few days ago I received a CC_2531 Zigbee sniffer, yesterday I received a iKea Tradfri Smart Socket (my first iKea product). Although there are alternatives to the Tradfri most of them require an internet connection to operate where as the Tradfri works over Zigbee WiFi on its own local network.
This is the cc_2531 I purchased (sold as:- Wireless CC2531 Sniffer Bare Board Protocol Analyzer Module USB Interface Dongle).
I used a spare RPi as they have the GPIO pins for easy connection to flash the CC_2531 and used the following guide Video Tutorial the biggest problem was that WiringPi has been deprecated from the Pi build so I had to search the web and install it manually.
With the CC_2531 flashed I installed Venus OS Large Image and enabled Node-Red. Install from the Palette Manager these tthree nodes: 'node-red-dashboard', 'node-red-contrib-throttle' and 'node-red-contrib-zigbee2mqtt'.
Download zigbee2mqtt from Here , unzip the download, rename it (remove '-master') and place it as per the image on your Venus GX.
I find to simplest way to move file is using Filezilla.
In the GX Remote Console under 'Services' enable MQTT.
Then following parts of This Guide I worked through the following
In a Terminal type the following after setting a password in the Remote Console:-
ssh root@<ip of my GX device>
cd /data/home/zigbee2mqtt
npm ci
cd /data/home/zigbee2mqtt/data
nano configuration.yaml
cd /data/home/zigbee2mqtt
npm start
I do find that manually starting npm can take two attempts and it needs to be started after every boot.
To have npm run at each boot, which appears to start the cc_2531, I added two more files. (This bit is work in progress. I believe that files in the /data folder don't change when there is a software update but I will only know this when I do an update).
In /data create a file called rcS.local. The file should contain something similar to this depending on your zigbee2mqtt directory location. Set rc.local permissions to 775:-
In Terminal type the following:-
cd /data
nano rcS.local
Copy and paste the code block below into nano
ctrl x
y
chmod 775 /data/rcS.local
In Terminal type the following:-
cd /data/home
nano start_npm
Copy and paste the code block below into nano
ctrl x
y
chmod 775 /data/home/start_npm
This should run the 'npm start' command to start the zigbee2mqtt when your Pi or GX starts.
I thinks that's all the installation work.
The Node-Red flow looks like this
Import code below into your Node-Red flow and Deploy it. Press the reset pin in the Tradfri Smart Socket for 10 seconds and select YOUR device in the nodes and Deploy it again. Hopefully you can turn the Smart Socket ON and OFF from your vans local network or via the VRM app remotely.
Sorry if there are any mistakes in this, if it doesn't work or you get stuck I'll try and help.
While sat in the van the other week we were using a cheap Lidl fan heater which has a very insensitive thermostat so we're too hot and then too cold! I thought this is a great opportunity to get the Ruuvi tag to control the fan heater so I set about some internet searching...
A few days ago I received a CC_2531 Zigbee sniffer, yesterday I received a iKea Tradfri Smart Socket (my first iKea product). Although there are alternatives to the Tradfri most of them require an internet connection to operate where as the Tradfri works over Zigbee WiFi on its own local network.
This is the cc_2531 I purchased (sold as:- Wireless CC2531 Sniffer Bare Board Protocol Analyzer Module USB Interface Dongle).
I used a spare RPi as they have the GPIO pins for easy connection to flash the CC_2531 and used the following guide Video Tutorial the biggest problem was that WiringPi has been deprecated from the Pi build so I had to search the web and install it manually.
With the CC_2531 flashed I installed Venus OS Large Image and enabled Node-Red. Install from the Palette Manager these tthree nodes: 'node-red-dashboard', 'node-red-contrib-throttle' and 'node-red-contrib-zigbee2mqtt'.
Download zigbee2mqtt from Here , unzip the download, rename it (remove '-master') and place it as per the image on your Venus GX.
I find to simplest way to move file is using Filezilla.
In the GX Remote Console under 'Services' enable MQTT.
Then following parts of This Guide I worked through the following
In a Terminal type the following after setting a password in the Remote Console:-
ssh root@<ip of my GX device>
cd /data/home/zigbee2mqtt
npm ci
cd /data/home/zigbee2mqtt/data
nano configuration.yaml
cd /data/home/zigbee2mqtt
npm start
I do find that manually starting npm can take two attempts and it needs to be started after every boot.
To have npm run at each boot, which appears to start the cc_2531, I added two more files. (This bit is work in progress. I believe that files in the /data folder don't change when there is a software update but I will only know this when I do an update).
In /data create a file called rcS.local. The file should contain something similar to this depending on your zigbee2mqtt directory location. Set rc.local permissions to 775:-
In Terminal type the following:-
cd /data
nano rcS.local
Copy and paste the code block below into nano
ctrl x
y
chmod 775 /data/rcS.local
Code:
#!/bin/bash
nohup /data/home/start_npm &
exit
In Terminal type the following:-
cd /data/home
nano start_npm
Copy and paste the code block below into nano
ctrl x
y
chmod 775 /data/home/start_npm
Code:
#!/bin/sh
exec 2>&1
cd /data/home/zigbee2mqtt
exec npm start
This should run the 'npm start' command to start the zigbee2mqtt when your Pi or GX starts.
I thinks that's all the installation work.
The Node-Red flow looks like this
Import code below into your Node-Red flow and Deploy it. Press the reset pin in the Tradfri Smart Socket for 10 seconds and select YOUR device in the nodes and Deploy it again. Hopefully you can turn the Smart Socket ON and OFF from your vans local network or via the VRM app remotely.
Sorry if there are any mistakes in this, if it doesn't work or you get stuck I'll try and help.
Code:
[
{
"id": "75c64f88.cfdf8",
"type": "tab",
"label": "test Tradfri",
"disabled": false,
"info": ""
},
{
"id": "4cf980d2dc54e8b1",
"type": "inject",
"z": "75c64f88.cfdf8",
"name": "Status",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "device",
"payloadType": "str",
"x": 90,
"y": 100,
"wires": [
[
"73d2ad663e2a4067"
]
]
},
{
"id": "156924abea23326f",
"type": "inject",
"z": "75c64f88.cfdf8",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "ON",
"payloadType": "str",
"x": 90,
"y": 320,
"wires": [
[
"274c19d71b8081a6"
]
]
},
{
"id": "59c53a42c0037c5f",
"type": "debug",
"z": "75c64f88.cfdf8",
"name": "debug 5",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 720,
"y": 100,
"wires": []
},
{
"id": "a6cdbab04eff6556",
"type": "inject",
"z": "75c64f88.cfdf8",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "OFF",
"payloadType": "str",
"x": 90,
"y": 280,
"wires": [
[
"274c19d71b8081a6"
]
]
},
{
"id": "e0d5f51f633f77b2",
"type": "debug",
"z": "75c64f88.cfdf8",
"name": "debug 6",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 720,
"y": 200,
"wires": []
},
{
"id": "9e5982b313c9fa52",
"type": "debug",
"z": "75c64f88.cfdf8",
"name": "debug 7",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 660,
"y": 460,
"wires": []
},
{
"id": "57669f8eabf6d38f",
"type": "zigbee2mqtt-out",
"z": "75c64f88.cfdf8",
"name": "",
"server": "17070e263202e31e",
"friendly_name": "0xf4b3b1fffe8c2b6f (E1603/E1702/E1708)",
"device_id": "0xf4b3b1fffe8c2b6f",
"command": "state",
"commandType": "z2m_cmd",
"payload": "payload",
"payloadType": "msg",
"optionsValue": "",
"optionsType": "nothing",
"x": 640,
"y": 280,
"wires": []
},
{
"id": "394910cde8cea805",
"type": "zigbee2mqtt-bridge",
"z": "75c64f88.cfdf8",
"name": "",
"server": "17070e263202e31e",
"topic": null,
"x": 130,
"y": 460,
"wires": [
[
"1f5d5fc38efc0e37"
]
]
},
{
"id": "7c1ea673616fabd8",
"type": "zigbee2mqtt-in",
"z": "75c64f88.cfdf8",
"name": "",
"server": "17070e263202e31e",
"friendly_name": "0xf4b3b1fffe8c2b6f (E1603/E1702/E1708)",
"device_id": "0xf4b3b1fffe8c2b6f",
"state": "0",
"outputAtStartup": true,
"filterChanges": false,
"enableMultiple": false,
"x": 180,
"y": 200,
"wires": [
[
"03d361f5c14fe594"
]
]
},
{
"id": "73d2ad663e2a4067",
"type": "zigbee2mqtt-get",
"z": "75c64f88.cfdf8",
"name": "",
"server": "17070e263202e31e",
"friendly_name": "0xf4b3b1fffe8c2b6f (E1603/E1702/E1708)",
"device_id": "0xf4b3b1fffe8c2b6f",
"state": "0",
"enableMultiple": false,
"x": 420,
"y": 100,
"wires": [
[
"59c53a42c0037c5f"
]
]
},
{
"id": "03d361f5c14fe594",
"type": "throttle",
"z": "75c64f88.cfdf8",
"name": "",
"throttleType": "time",
"timeLimit": "2",
"timeLimitType": "seconds",
"countLimit": 0,
"blockSize": 0,
"locked": false,
"x": 490,
"y": 200,
"wires": [
[
"e0d5f51f633f77b2"
]
]
},
{
"id": "1f5d5fc38efc0e37",
"type": "throttle",
"z": "75c64f88.cfdf8",
"name": "",
"throttleType": "time",
"timeLimit": "2",
"timeLimitType": "seconds",
"countLimit": 0,
"blockSize": 0,
"locked": false,
"x": 410,
"y": 460,
"wires": [
[
"9e5982b313c9fa52"
]
]
},
{
"id": "274c19d71b8081a6",
"type": "ui_switch",
"z": "75c64f88.cfdf8",
"name": "",
"label": "switch",
"tooltip": "",
"group": "c83ac4fc4b7daa51",
"order": 0,
"width": 0,
"height": 0,
"passthru": true,
"decouple": "false",
"topic": "",
"style": "",
"onvalue": "ON",
"onvalueType": "str",
"onicon": "",
"oncolor": "",
"offvalue": "OFF",
"offvalueType": "str",
"officon": "",
"offcolor": "",
"x": 270,
"y": 280,
"wires": [
[
"57669f8eabf6d38f"
]
]
},
{
"id": "17070e263202e31e",
"type": "zigbee2mqtt-server",
"name": "",
"host": "localhost",
"mqtt_port": "1883",
"mqtt_username": "",
"mqtt_password": "",
"mqtt_qos": "1",
"tls": "47c99f2f.8b1c1",
"usetls": false,
"base_topic": "zigbee2mqtt"
},
{
"id": "c83ac4fc4b7daa51",
"type": "ui_group",
"name": "Default",
"tab": "d4df21c4c061eafa",
"order": 1,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "47c99f2f.8b1c1",
"type": "tls-config",
"name": "TLS Gbridge",
"cert": "",
"key": "",
"ca": "",
"certname": "",
"keyname": "",
"caname": "",
"servername": "mqtt.gbridge.io",
"verifyservercert": true
},
{
"id": "d4df21c4c061eafa",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
Last edited: