Coder Social home page Coder Social logo

node-red-contrib-deconz's Introduction

Node-Red deCONZ

GitHub GitHub Workflow Status GitHub release (latest by date including pre-releases) npm GitHub issues Discord

Node-Red Nodes for deCONZ connectivity.

The new 2.0 version is out

Hi it's @Zehir here, I worked hard for months on a complete rework of this plugin. There is a ton of new features, it's will be easier to do stuff on node-red. If you have any issue with this beta version, feel free to open issues on GitHub.

This new version requires Node-Red version 1.2.9 or newer.

Some new features (Changelog):

  • Multiple device selection.
  • Select device using queries.
  • Multiple commands at once.
  • Query multiple devices and merge the result.

Migrate from 1.3.4

Make sure you backup your flow before updating, you will not be able to downgrade if the configuration is migrated.

Everything should be seamless, all your configuration will be migrated with the new save format. It's will save the updated configuration only when you open the node configuration and click Deploy. If you don't do it the node will migrate the configuration on each start of Node-Red. Check the Node-Red log if you have any errors that showes up. If you have any issues you can come on the Deconz-Community Discord server or open an issue on Github.

Available nodes

  • deconz-in: A node to subscribe to deCONZ events.
  • deconz-get: get state of device or group.
  • deconz-out: send actions or data to device or group.
  • deconz-battery: get battery status of device
  • deconz-event: get all deconz events

Flow sample Server setup Get node Out node

Home Assistant

Do not forget to open ports if you are using Node-Red from outside Home Assistant containers : This is not needed if you are using Node-Red from inside Home Assistant containers.

HA setup

node-red-contrib-deconz's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-deconz's Issues

WebSocket error: Error: connect ECONNREFUSED 172.30.33.1:443

I'm running on Ubuntu 19 in Docker on a Raspberry 4.

** Describe issue **
First I didn't succeed in getting the API Key using the magic button so I used the manual method from command line :

$ curl -d ‘{“devicetype”: “[give the application name, for instance Node-RED]”}’ -H “Content-Type: application/json” -X POST http://[your local ip address for Hassio / deCONZ]:40850/api

As the answer came as expected I thought the IP and port were good so I copy/pasted the API key.
Tested the API key :

$ curl -d '{"devicetype": "Node-RED"}' -H "Content-Type: application/json" -X GET http://172.30.33.1:40850/api/<API KEY>/lights

As I got a list of my lights I thought everything was ok but now when I click the Refresh device list in the Deconz-Input node, nothing comes.

I did a simple flow Deconz-input--->Debug

the debug log ways :

WebSocket error: Error: connect ECONNREFUSED 172.30.33.1:443

** Your flow here **
[{"id":"48b2e134.deffc","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"d9247bfc.bffb38","type":"deconz-input","z":"48b2e134.deffc","name":"","device":null,"device_name":null,"state":"","output":"always","outputAtStartup":true,"x":120,"y":140,"wires":[["8e0e5505.a0b618"],["8e0e5505.a0b618"]]},{"id":"8e0e5505.a0b618","type":"debug","z":"48b2e134.deffc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":340,"y":160,"wires":[]}]
** Screens / Logs **

** Hardware / Software **
  - raspberry 4

  • version of deconz gateway: [2.05.72 / 12/12/2019]
      - version of node-red-contrib-deconz: [1.1.9]

Better support for Thermostats (e.g. Eurotronics Spirit)

For various reasons I want to build a MQTT interface for my Eurotronics Spirit TRVs. It would be great, if support through the node-red plugin for thermostats could be improved.

Right now I can retrieve the properties lastupdated, on, valve and temperature via in and get nodes. And I am not able to access the TRVs via out node at all (they just don't show up in the list of devices).

Is it possible to add support for reading and setting heatsetpoint and mode through the nodered plugin?

Thank you!

Xiaomi BUTTON sends press+longpress event together

Hi,

  1. do you have somewhere documentation about codes/integers being send/captured from Phoscon/Connbee? for Xiaomi button it is 1000-1001-etc

  2. is there a reason that message 1001 for long press has also message 1000 as single press before? Somehow it makes sense that longpress is actually a press, but it is hard to assign different action on it, as for long press I also get standard press

thank you!
Jakub

Xiaomi Aqara Switch does not support tripple quadro press

The Xiaomi Mijia Smart Switch (The old round one) Supports Single, double, triple, quadro, more, and long press.

But the new Xiaomi Aqara Smart Switch (The new square one) supports only single, double and long press.

  - raspberry 4  

  • version of deconz gateway: 2.05.72 / 12.12.2019 Firmware 264A0700
      - version of node-red-contrib-deconz: 1.1.10

Can't get deconz-server node working

Issue

After installing and configuring deconz-server on docker like this. (also deploying)
Captura de pantalla de 2019-09-22 21-18-05

Then i get this message

Captura de pantalla de 2019-09-22 21-17-43

Later if i reboot nodered, deconz-server node disapear from nodes list and is not selectable anymore for the rest of deconz nodes

I'll ve happy to give more info if is in my hands

Hardware / Software

  • raspberry 3A+ 
  • nodered 0.20.7
  • version of deconz gateway: 2.05.60 / 10/3/2019
  • version of node-red-contrib-deconz: [0.13]

How to send a command to start a configured Scene?

Hey andrey,

it's me again :D I just found out that I can configure cool Scenes inside the Phoscon App. Your Deconz Nodes discover these scenes but I can't find out how to start such a scene?

Can you help out again?
Thank you!

zigbee2mqtt support

Currently use these great nodes with deCONZ.

Have also been using zigbee2mqtt. Now considering that again.

I think this node could be made a hybrid for both zigbee2mqtt and deCONZ users. Basically I would think that by "simply" amending the server-node to understand and connect with zigbee2mqtt could accomplish this.

Please consider.

Can you give us an Example for Philips Hue RGB LED Bulb with Dashboard Colorpicker?

Hey guys,

first, I want to thank you all for your work! Everything works like a charm :)

Today I got my first RGB LED Bulbs from Philips. First I tryed to set the brightness, everything works like on normal Philips Spots. Then I tryed to change the color with the Dashboard Colorpicker.
That is a bit confusing for me :(

Your Lightnode puts out realy much variables. That I don't know how to translate or recalculate them :(

The RGB Colorpicker puts out a Color in rgb style or hex. But if I input a color with hex the color mode changes by itself to hs instead of xy.

Would be realy nice to know how which variable should be used here <3 Thank you in advance.

unable to get API Key

Hi all I've been using this plugin for a while but I went through a few upgrades like last month and I've lost all access I've uninstalled and reinstalled the add on and ensured nodered, home assistant, and deconz are all up to date but it just keeps throwing me this error message.

WebSocket error: Error: connect ECONNREFUSED 192.168.0.71:8081

Scenes selected by deCONZ have the wrong value

Just tried the new scenes option (version 1.1.3). While selecting a scene from the drop-down list it seems like the scenes get the wrong value with the name. The first scene in the list has the value "0", which is impossible because scenes start counting from 1. I think (not sure) that the value is actually the array ID instead of the scene id. Thanks for the good work on this anyway!

For others who have the some problem:
It's an easy fix, just use the number field and manually add the scene ID there.

image

image

Magic button is not visible on server properties

** Describe issue **
Magic button is not visible on server properties only "Get Settings" text. I am using it on node-red in hassio that runs on a rpi3B. I am unable to add server setting to initiate the api key request.

** Your flow here **
No flow yet. I am trying to connect to deconz gatway on

** Screens / Logs **

image

** Hardware / Software **
  - raspberry 3  B

  • version of deconz gateway: [2.05.69 / 9/6/2019]
      - version of node-red-contrib-deconz: [1.0.4]
  • node-red version: 4.2.1
  • hassio version: 0.98.2.

missing 0-100% for dimmable lights

Hello,

would it be possible to have dimable input for HUE lights with values of 0-100%, my source sends % values, so 255 is out of scope :)

Why there is 0-255 as value? Is it solvable or should I write a function to rewrite 0-100 -> 0-255 with lineary correlation?

thx
Jakub

Node-Red shows warnings when using deconz plugin

Node-Red trows the following warnings when using the deconz plugin.

(node:489) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 onClose listeners added. Use emitter.setMaxListeners() to increase limit
(node:489) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 onSocketError listeners added. Use emitter.setMaxListeners() to increase limit
(node:489) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 onSocketClose listeners added. Use emitter.setMaxListeners() to increase limit
(node:489) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 onSocketOpen listeners added. Use emitter.setMaxListeners() to increase limit
(node:489) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 onSocketPongTimeout listeners added. Use emitter.setMaxListeners() to increase limit
(node:489) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 onNewDevice listeners added. Use emitter.setMaxListeners() to increase limit

DeConz no data coming from Phoscon app/REST API

** Describe issue **
I am having an Xiaomy Temperature sensor fully paired with Phoscon App and I am getting updates on any humi/temperature change in Phoscon app.

How ever NodeRed IN gets update only when I deploy the flow, I see disconnected and then correct value appears, but automatic update on change is not happening.

** Your flow here **
not needed, only DeconzIN is in place with Phoscon APP connection and API key (which is working correctly, as after flow deploy I get correct data

** Screens / Logs **

** Hardware / Software **
  - raspberry 3  

  • version of deconz gateway: [2.05.71]
      - version of node-red-contrib-deconz: [1.1.9]

monitor groups

Hi, Do you think you'll be able to create a node to monitor the groups states ?

thank you

Send multiple settings to a light group

On motion detection i want my outdoor lights to change both temperature and brightness. This currently needs 2 node-calls whereas the API should support both combined in 1 API call towards Deconz. Would it be possible to add an 'expert' node which is able to send JSON to the API? Or any other idea you might have to facilitate this?

e.g. sample request data taken from the documentation

{
  "on": true,
  "bri": 180,
  "hue": 43680,
  "sat": 255,
  "transitiontime": 10
}

Fetch (and check) state on startup.

I was thinking that it might be a good idea to fetch the state of every in (and get?) device on startup. This way we can see if a connection is made correctly (this now only happens when checking the "start output" checkbox. Another thing is that if we check the state for the in module on startup the "previous change and previous state" variables won't be empty on first check. This is useful when implementing the "only output on change/update".

I've already began implementing this on my own local copy :)

Group state update time seems slow.

When testing i noticed that group state is updated slowly, it takes up to 5 seconds before the group state reflects the real state. I ruled out that deconz sends out this state late with wsdump. When turning off a group deconz instantly sends out a update for that group:

< {"e":"changed","id":"41","r":"sensors","state":{"buttonevent":3002,"lastupdated":"2019-07-18T09:09:00"},"t":"event","uniqueid":"00:15:8d:00:02:38:7e:77-01-0006"}
< {"e":"changed","id":"12","r":"lights","state":{"alert":null,"bri":254,"colormode":"ct","ct":454,"on":false,"reachable":true},"t":"event","uniqueid":"00:15:8d:00:01:7d:91:ea-01"}
< {"e":"changed","id":"17","r":"lights","state":{"alert":null,"bri":254,"colormode":"ct","ct":500,"hue":12519,"on":false,"reachable":true,"sat":226,"xy":[0.5836,0.3893]},"t":"event","uniqueid":"00:17:88:01:00:dc:da:dc-0b"}
< {"e":"changed","id":"33","r":"lights","state":{"alert":null,"bri":1,"colormode":"ct","ct":454,"on":false,"reachable":true},"t":"event","uniqueid":"90:fd:9f:ff:fe:86:d2:20-01"}
< {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":25,"colormode":"ct","ct":500,"hue":12519,"on":false,"reachable":true,"sat":226,"xy":[0.5268,0.4133]},"t":"event","uniqueid":"00:17:88:01:00:dc:ce:71-0b"}
< {"e":"changed","id":"4","r":"groups","state":{"all_on":false,"any_on":false},"t":"event"}

NodeRed Reboot

Sometimes Node Red restarts.
I can't say exactly where it comes from.
Here is an excerpt from the log file

Dec 26 16:48:08 Homematic daemon.err node-red: 26 Dec 16:48:08 - [red] Uncaught Exception: Dec 26 16:48:08 Homematic daemon.err node-red: 26 Dec 16:48:08 - TypeError: Cannot read property 'devices' of null Dec 26 16:48:08 Homematic daemon.err node-red: at ServerNode.onSocketMessage (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/nodes/server.js:237:37) Dec 26 16:48:08 Homematic daemon.err node-red: at DeconzSocket.ServerNode.node.socket.on (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/nodes/server.js:34:57) Dec 26 16:48:08 Homematic daemon.err node-red: at DeconzSocket.emit (events.js:198:13) Dec 26 16:48:08 Homematic daemon.err node-red: at DeconzSocket.EventEmitter.emit (domain.js:448:20) Dec 26 16:48:08 Homematic daemon.err node-red: at DeconzSocket.onMessage (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/lib/deconz-socket.js:137:18) Dec 26 16:48:08 Homematic daemon.err node-red: at WebSocket.socket.on.data (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/lib/deconz-socket.js:59:48) Dec 26 16:48:08 Homematic daemon.err node-red: at WebSocket.emit (events.js:198:13) Dec 26 16:48:08 Homematic daemon.err node-red: at WebSocket.EventEmitter.emit (domain.js:448:20) Dec 26 16:48:08 Homematic daemon.err node-red: at Receiver.receiverOnMessage (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/node_modules/ws/lib/websocket.js:800:20) Dec 26 16:48:08 Homematic daemon.err node-red: at Receiver.emit (events.js:198:13) Dec 26 16:48:08 Homematic daemon.err node-red: at Receiver.EventEmitter.emit (domain.js:448:20) Dec 26 16:48:08 Homematic daemon.err node-red: at Receiver.dataMessage (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/node_modules/ws/lib/receiver.js:423:14) Dec 26 16:48:08 Homematic daemon.err node-red: at Receiver.getData (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/node_modules/ws/lib/receiver.js:353:17) Dec 26 16:48:08 Homematic daemon.err node-red: at Receiver.startLoop (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/node_modules/ws/lib/receiver.js:139:22) Dec 26 16:48:08 Homematic daemon.err node-red: at Receiver._write (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/node_modules/ws/lib/receiver.js:74:10) Dec 26 16:48:08 Homematic daemon.err node-red: at doWrite (_stream_writable.js:415:12) Dec 26 16:48:08 Homematic daemon.err node-red: at writeOrBuffer (_stream_writable.js:399:5) Dec 26 16:48:08 Homematic daemon.err node-red: at Receiver.Writable.write (_stream_writable.js:299:11) Dec 26 16:48:08 Homematic daemon.err node-red: at Socket.socketOnData (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/node_modules/ws/lib/websocket.js:875:35) Dec 26 16:48:08 Homematic daemon.err node-red: at Socket.emit (events.js:198:13) Dec 26 16:48:08 Homematic daemon.err node-red: at Socket.EventEmitter.emit (domain.js:448:20) Dec 26 16:48:08 Homematic daemon.err node-red: at addChunk (_stream_readable.js:287:12)

** Hardware / Software **
  - Deconz Synology Docker 
  - raspberry 2 (Node Red)

  • version of deconz gateway: [2.05.69 / 06/09/2019]
      - version of node-red-contrib-deconz: [1.1.9]

ACK or command confirmation

Hello.

I met the lack of action of the device after sending the command to this device.

The motion sensor has created a command to turn on the light switch. The log describes that the sensor has triggered + a command has been sent to the switch + the switch status has been changed to "on". However, the device is not physically turned on.

It turned on only after I changed the status to "off" and then to "on".

Is it possible to implement a device status change check after sending a command? (ACK?)

Error messages in the log

Dec 26 13:06:44 Homematic daemon.err node-red: Encountered an error while controlling device Dec 26 13:06:44 Homematic daemon.err node-red: Error(1) was: Dec 26 13:06:44 Homematic daemon.err node-red: undefined Dec 26 13:06:44 Homematic daemon.err node-red: (node:12645) UnhandledPromiseRejectionWarning: [object Array] Dec 26 13:06:44 Homematic daemon.err node-red: (node:12645) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 193)

** Hardware / Software **

  • Deconz Synology Docker
  • raspberry 2 (Node Red)
  • version of deconz gateway: [2.05.69 / 06/09/2019]
  • version of node-red-contrib-deconz: [1.1.9]

API Key not discoverable

Hey guys,

I'm using your node and can't get any API Key from my conbee 2.

All of my IoT things are running on a raspberry pi 4 in a docker environment.

All of them got a separate created network and only the devices that should see each other are connected between those virtual networks.

F.e. my nodered got the network "nodered" and my deconz container got the "deconz" network.
Both containers are joined to the nodered and deconz network so traffic between them should be easy.

I changed the environment variable from 80 to 8083 and 443 to 10443 f.e.

This ports are used at the docker run command like -p 8083:8083 and -p 10443:10443 because you wrote that is a known issue (we have to have both ends with same ports and same environment variable set).

but still, it can't find any api key :(

here is a screen of my example (testet with ssl and without) / deconz is the hostname, also tested with 127.0.0.1

image

In Node: Output only on change option.

** Describe your idea here**

Hi again :)
It would be great to have an option within the in node that it outputs only when state is changed. Now I get output on every poll. This can be an issue with motion sensors where for example a timer is started when the sensors stops detecting motion. This timer now gets restarted everytime the sensor outputs a false.

In the image below you see the debug output of 2 sensors:

image

Set a device by input

Hey andrey,

would it be possible to configure your nodes this way that they can switch between devices on msg.topic or anything else?

f.e. I have a living room light and one for the kitchen. Now I have to make 2 Nodes for those instead of just 1.

I coded a button logic for IKEA Tradfri switches. This logic is inside a Subflow. All I have to do is putting a msg.buttonevent inside my subflow and then the magic happens :)

The output will then be sended through a switch node to split everything up to the right light instead of just putting one deconz-out node behind this subflow (or even inside).

Error while trying the event component

Hi,

First af all, thank you very much for creating this plugin. I was waiting for this :P

Initial setup works perfect.
When testing it out I'm getting the following error when trying to listen to events.

I'm running HassIO with the node-red addon.

19 Jun 11:21:02 - [red] Uncaught Exception:
19 Jun 11:21:02 - TypeError: Cannot read property '00:17:88:01:10:3e:89:66-02-fc00' of undefined
    at WebSocket.<anonymous> (/config/node-red/node_modules/node-red-contrib-deconz/deconz.js:569:89)
    at WebSocket.emit (events.js:182:13)
    at Receiver.receiverOnMessage (/config/node-red/node_modules/ws/lib/websocket.js:800:20)
    at Receiver.emit (events.js:182:13)
    at Receiver.dataMessage (/config/node-red/node_modules/ws/lib/receiver.js:422:14)
    at Receiver.getData (/config/node-red/node_modules/ws/lib/receiver.js:352:17)
    at Receiver.startLoop (/config/node-red/node_modules/ws/lib/receiver.js:138:22)
    at Receiver._write (/config/node-red/node_modules/ws/lib/receiver.js:74:10)
    at doWrite (_stream_writable.js:410:12)
    at writeOrBuffer (_stream_writable.js:394:5)
[19/Jun/2019:11:21:02 +0200] 101 192.168.1.42, 172.30.32.1(172.30.32.2) GET /comms HTTP/1.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hassio-addon-node-red@ start: `node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hassio-addon-node-red@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-06-19T09_21_02_507Z-debug.log

Philips Hue dimmer switch

Hello!

Please add charge status for battery node to device "Philips Hue dimmer switch"

=====

Привет.

Пожалуйста добавьте статус заряда батареи в ноде "battery" для устройства "Philips Hue dimmer switch". Сейчас это устройство просто не видно в списке устройств в настройках данной ноды.

Отсутствие связи про частичном перестроении нодов

Привет.

Обнаружил странное поведение нодов.

Пытаюсь считать состояние устройства. Для этого либо копирую, либо настраиваю новый год "in", выбрав нужное устройство и параметр (см. пример ниже).

В настойках состояние показано корректно. Однако после деплоя нод не отдает ничего на выход. Также у нового нода отсутствует статус (под ним).

Решается проблема - полной перестройкой (всех нодов) либо перезагрузкой node-red.

** Hardware / Software **
  - raspbian

  • version of deconz gateway: [2.05.66 / 16/06/2019]
      - version of node-red-contrib-deconz: [0.11.2]

=======
Hey.

Found strange behavior of nodes.

I'm trying to count the status of the device. To do this, either copy or customize the new node "in" by selecting the desired device and parameter (see the example below).

In the settings of the device, the status is shown correctly. However, after the deployment, the node does not give anything out. Also, the new node has no status (under it).

The problem is solved only - a complete deploy (of all nodes) or a node-red restart.

=======
[
{
"id": "aae03a0b.9f65a8",
"type": "switch",
"z": "634c8fff.b910e8",
"name": "On/Off?",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "false"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 1100,
"y": 680,
"wires": [
[
"2c13091e.a392f6"
],
[
"5846f9be.12ccb8"
]
]
},
{
"id": "2c13091e.a392f6",
"type": "change",
"z": "634c8fff.b910e8",
"name": "Flow True",
"rules": [
{
"t": "set",
"p": "Light_Study",
"pt": "flow",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1240,
"y": 660,
"wires": [
[]
]
},
{
"id": "5846f9be.12ccb8",
"type": "change",
"z": "634c8fff.b910e8",
"name": "Flow False",
"rules": [
{
"t": "set",
"p": "Light_Study",
"pt": "flow",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1250,
"y": 700,
"wires": [
[]
]
},
{
"id": "a0261178.d4776",
"type": "debug",
"z": "634c8fff.b910e8",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 1100,
"y": 800,
"wires": []
},
{
"id": "12265ea5.624bc1",
"type": "deconz-input",
"z": "634c8fff.b910e8",
"name": "",
"server": "eeee5052.8cc1a8",
"device": "00:15:8d:00:03:49:be:6c-03",
"device_name": "Study Main : Smart plug",
"state": "on",
"output": "always",
"outputAtStartup": true,
"x": 810,
"y": 660,
"wires": [
[
"aae03a0b.9f65a8",
"a0261178.d4776"
],
[]
]
},
{
"id": "eeee5052.8cc1a8",
"type": "deconz-server",
"z": "",
"name": "Conbee2-AR",
"ip": "10.0.1.100",
"port": "8080",
"apikey": "C0F72B7881",
"ws_port": "8088"
}
]

DeConz server

** Describe issue **
Hello Andrey, thank you for your palette and sorry if I'm a bit of a noob and I'll ask you stupid questions!
I cannot get your server node to connect to DeConz APIs. I think the problem comes from the Hassio Ingress thing, which functioning I cannot understand very well...
Apis work normally when I connect to them for example to ask for Api key through this Postman POST call:
POST 192.168.2.10:40850/api

So I thought to use this same settings in your server node..like this:
Name: Conbee2
IP Address: 192.168.2.10
Port: 40850
API Key: --remains blank--
Websocket port: 8081

but no luck..no API key and no connection after the 'Authenticate App' push in the Phoscon page..

I'm simply not sure of how to set the server node...should I use 'core-deconz' host as suggested in the DeConz Add-on page? How???

Could you help?

** Screens / Logs **
Nodered log:
4 Jan 19:52:46 - [warn] [deconz-server:Conbee2] WebSocket error: Error: Client network socket disconnected before secure TLS connection was established
4 Jan 19:52:47 - [info] [mqtt-broker:Mosquitto] Connected to broker: mqtt://192.168.2.10:1883
[04/Jan/2020:19:52:48 +0100] 200 192.168.2.50, 172.30.32.1(172.30.32.2) GET /deconz/static/css/common.css HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36)
[04/Jan/2020:19:52:48 +0100] 200 192.168.2.50, 172.30.32.1(172.30.32.2) GET /deconz/static/css/multiple-select.css HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36)
4 Jan 19:52:48 - [info] [deconz-server:Conbee2] discoverDevices: Using cached devices
[04/Jan/2020:19:52:48 +0100] 200 192.168.2.50, 172.30.32.1(172.30.32.2) GET /deconz/itemlist?controllerID=a83c6f1e.05d7d&forceRefresh=false HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36)
[04/Jan/2020:19:52:48 +0100] 200 192.168.2.50, 172.30.32.1(172.30.32.2) GET /deconz/static/css/common.css HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36)
4 Jan 19:52:51 - [info] [server:Home Assistant] WebSocket Connected to http://hassio/homeassistant
4 Jan 19:52:52 - [warn] [deconz-server:Conbee2] WebSocket error: Error: Client network socket disconnected before secure TLS connection was established
4 Jan 19:52:56 - [warn] [deconz-server:Conbee2] WebSocket error: Error: Client network socket disconnected before secure TLS connection was established
4 Jan 19:53:06 - [warn] [deconz-server:Conbee2] WebSocket error: Error: Client network socket disconnected before secure TLS connection was established
4 Jan 19:53:16 - [warn] [deconz-server:Conbee2] WebSocket error: Error: Client network socket disconnected before secure TLS connection was established
4 Jan 19:53:26 - [warn] [deconz-server:Conbee2] WebSocket error: Error: Client network socket disconnected before secure TLS connection was established
4 Jan 19:53:36 - [warn] [deconz-server:Conbee2] WebSocket error: Error: Client network socket disconnected before secure TLS connection was established
4 Jan 19:53:46 - [warn] [deconz-server:Conbee2] WebSocket error: Error: Client network socket disconnected before secure TLS connection was established
4 Jan 19:53:56 - [warn] [deconz-server:Conbee2] WebSocket error: Error: Client network socket disconnected before secure TLS connection was established
..
..
..

** Hardware / Software **
  - Hassio 0.103.5 on raspberry 3+  

  • version of deconz gateway: [2.05.72 / 12/12/2019]
      - version of node-red-contrib-deconz: [1.1.9]

  • Hassio server IP: 192.168.2.10

  • DeConz internal IP: 172.30.33.2

  • Phoscon webpage address: http://192.168.2.10:8123/core_deconz

  • Network settings in DeConz Add-on page:
    5900/tcp |  5900 | deCONZ graphical desktop via VNC
    8081/tcp | 8081 | deCONZ WebSocket (Not required for Hass.io Ingress)
    40850/tcp |  40850 | deCONZ API backend (Not required for Hass.io Ingress)

  • Response to: GET https://dresden-light.appspot.com/discover:
    "id": "00212EFFFF0486F9",
    "internalipaddress": "172.30.33.2",
    "macaddress": "00212EFFFF0486F9",
    "internalport": 40850,
    "name": "Phoscon-GW",
    "publicipaddress": "x.x.x.x"

Battery Node missing state as with Deconz-in

With Deconz-in it is possible to choose a state at output 1.
This option is missing on the Deconz-Battery. Output 1 is not used.
Is it possible to add state output 1 with the Deconz Battery?

Reboot Node-red after add node

** Describe issue **
When adding a new deconz-in or deconz-out node or after deleting them after deploying immediately or after accessing to nodes (deconz-in or deconz-out), node red is reboot...

** Hardware / Software **
  - raspbian for node-red (windows for conbee)

  • version of deconz gateway: [2.05.69 / 07/09/2019]
      - version of node-red-contrib-deconz: [1.0.4]

Support for Friends of Hue switches (Extra button compared to the currently supported 5 buttons)

It would be very nice to have support for an additional (6th) button in the IN node.
Currently it only seems to support 5 buttons. The Friends of Hue switches of VIMAR, BUSCH-JEAGER etc. have 4 physical buttons, but pressing the upper two / lower two buttons together also counts as a button press and therefore should result in a code for button 5 or button 6. See also: dresden-elektronik/deconz-rest-plugin#1454. I already get the button event for button 5, but not yet for button 6. Thanks in advance, Robert.
(And thanks soo much for the work already done on this component!!!)

Light Groups in Get node

** Describe your idea here**

I remember now what I wanted to say before :)

It would be nice to have the light groups in the get node so we can check if a light in a group is one before starting some kind of automation :)

Develist empty after update to 1.1.0

** Describe issue **
After updating to 1.1.0 the devicelist is empty on existing nodes as well as in new nodes, no error.
Seems a cosmetic issue because everything still works as configured.
Issue appears in in/get/out nodes.

** Hardware / Software **
  - raspberry 4  

  • version of deconz gateway: [2.05.69]
      - version of node-red-contrib-deconz: [1.1.0]

Correct format of Switch(true/false)

I wanted to setup a Deconz-out node switching a light off. if switch the payload to "string" and put in true, it will switch the light on. But if I put in false it does not switch it off. If I put the payload to number and put in 0 it will switch it off.

What is the correct way of doing it?

Possibility to select multiple sensors in one IN node.

** Describe your idea here**
I think it would be nice to have the option to select multiple (motion) sensors in one IN-node.
This could be useful for rooms with multiple sensors and/or group all the motion sensors for notification reasons.

Create option to passtrough the data from a node before get node.

I would be a nice feature to have an option the have the output of the getnode just passtrough the payload coming in on the input. This would be usefull to things like pass message trough if light is on only. this would also mean we need to change the workings of the get node so it can handles such checks :)

ReferenceError: truncateWithEllipses is not defined

in static/js/node-red-contrib-deconz-helpers.js there is reference to a functino ../static/js/node-red-contrib-deconz-helpers.js but this function does not exist anywhere:

ReferenceError: truncateWithEllipses is not defined
    at Object.eval (eval at <anonymous> (vendor.js:2), <anonymous>:210:47)
    at j (vendor.js:2)
    at Object.fireWith [as resolveWith] (vendor.js:2)
    at x (vendor.js:5)
    at XMLHttpRequest.b (vendor.js:5)

Set device by name or id instead off select box

Is it possible to set the device by the msg.payload or msg.topic, rather than selecting a device within the node settings? So that you are able to switch multiple devices by a single function node for example.

"Get Settings" button only discovers second gateway in network

Hi,

When trying to configure a new server, I enter the address of what I consider to be my primary deeconz device (e.g 10.0.1.150) - When I click the "Get Settings" button to get the API key an error message is displaying saying "lnk button not pressed" - the IP address in the server field then switches to my second deeconz device (e.g 10.0.1.151) - it is then impossible to get it to get the API key for the first.

I have tried this with the "Authenticate App" button pressed on the first deconz gateway only (10.0.1.150) - I have then tried it with the button pressed on the second gateway, when I do this the server configuration details change to the second gateway and it does populate an API key.

image

image

image

I only use the second deconz as a development / test box, so I don't have all my devices added to it.

  - raspberry 3 

  • version of deconz gateway: 2.05.69
      - version of node-red-contrib-deconz: 1.1.10

interval between Xiaomi double click

Hi,

I have found out, that for unknown reason there must be 3-5s delay between repeating double-click (code 1004).

Single click 1002 does not suffer with this.

Same if I do double-single-double then internal is also not needed and all messages are sent right away. however with 1004 right next to the 1st one, 2nd is not not send.

tested with debug node on simple Deconz-IN.

thx
Jakub

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.