# \[ANNOUNCE\] node-red-contrib-energenie-ener314rt

**URL:** https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475
**Category:** Share Your Nodes
**Created:** [23 April 2019 18:07 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475 "2019-04-23T18:07:39Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Achronite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/achronite/32/31868_2.png) [@Achronite](https://discourse.nodered.org/u/Achronite)
#### Post date: [23 April 2019 18:07 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/1 "2019-04-23T18:07:39Z")

</div>

Hi everyone,

I've just completed testing of my first node-red module. You can use the nodes of this module to control and monitor the Energenie MiHome radio based smart devices such as adapters, sockets, lights and relays on a Raspberry Pi with an **ENER314-RT** board installed using node-red. This is _instead_ of operating the devices using a MiHome Gateway.

There are 4 nodes in total:

- 'Blue' for switching 'Control Only' (OOK) based devices
- 'Pink' for monitoring MiHome **'Monitor'** devices
- 'Purple' for monitoring and controlling **'Control & Monitor'** devices
- 'Green' for sending any OOK or FSK raw byte array (Advanced node)

It was quite tricky to get this going as it uses a C library to communicate with the radio adaptor, I've used a combination of sync and async calls at the moment with a mutex on the radio calls. If anyone has recommendations about which is best (sync or async) please let me know!

I would be interested in anyone to perform testing of these nodes, it currently should work with all switches and monitor only devices; but only the Adaptor Plus in the 'control & monitor' range.

**UPDATE** : I have now tagged this release with 'node-red', so you can install using 'Manage palette' option directly in node-red.

Direct links:  
[npm link](https://www.npmjs.com/package/node-red-contrib-energenie-ener314rt)  
[github link](https://github.com/Achronite/node-red-contrib-energenie-ener314rt)

---

<div class="post-metadata">

### Author: ![bwims](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bwims/32/64907_2.png) [@bwims](https://discourse.nodered.org/u/bwims)
#### Post date: [7 June 2019 14:31 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/2 "2019-06-07T14:31:28Z")

</div>

Hi, there are an awful lot of warning messages during installation regarding "NAN-DEPRECATED". Should I be concerned?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [7 June 2019 15:43 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/3 "2019-06-07T15:43:31Z")

</div>

What version of node are you running? You can see this from the node-red startup log, or run the command  
`node -v`  
You should be running node 8.x or 10.x, if it is earlier that may cause the problem.  
If that is the problem and you don't know how to update then tell us what hardware and operating system you are using.

---

<div class="post-metadata">

### Author: ![bwims](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bwims/32/64907_2.png) [@bwims](https://discourse.nodered.org/u/bwims)
#### Post date: [7 June 2019 18:43 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/4 "2019-06-07T18:43:39Z")

</div>

Hi, thanks for replying!

Weirdly, it is v11.15 !

I installed it from the Diet-Pi distribution.

---

<div class="post-metadata">

### Author: ![Achronite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/achronite/32/31868_2.png) [@Achronite](https://discourse.nodered.org/u/Achronite)
#### Post date: [7 June 2019 21:09 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/5 "2019-06-07T21:09:04Z")

</div>

Can you post a log file please? Are they in a dependent library? If so which one?

---

<div class="post-metadata">

### Author: ![bwims](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bwims/32/64907_2.png) [@bwims](https://discourse.nodered.org/u/bwims)
#### Post date: [8 June 2019 10:10 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/6 "2019-06-08T10:10:07Z")

</div>

Hi, thanks for helping! I just have an installation of Diet Pi and I first did an npm install as per your instructions, saw all the error messages, realised my default directory was wrong, assumed that was the problem, then saw your advice about using manage palette. The attached is a copy and paste of the entire installation from there.

[temp.txt (81.9 KB)](https://discourse.nodered.org/uploads/short-url/5J45Qe68abKJs9tvXunKxHGZBE3.txt)

---

<div class="post-metadata">

### Author: ![bwims](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bwims/32/64907_2.png) [@bwims](https://discourse.nodered.org/u/bwims)
#### Post date: [8 June 2019 10:16 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/7 "2019-06-08T10:16:29Z")

</div>

Incidentally, you may not want to take too much time over this for me, since having read more detail, I'm guessing it won't give me control over my TRV devices (MIHO013). I'm currently accessing these as MQTT devices via the Github package [here](https://github.com/gpbenton/engMQTTClient)  
It works wonderfully, but has so many dependencies, and is not a system service, so I was hoping to move towards something more integrated.

Best regards!  
Brian

---

<div class="post-metadata">

### Author: ![Achronite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/achronite/32/31868_2.png) [@Achronite](https://discourse.nodered.org/u/Achronite)
#### Post date: [9 June 2019 20:22 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/8 "2019-06-09T20:22:15Z")

</div>

Hi Brian,

I do have TRVs on my github to-do list, but as I don't own any it's a little tricky to test!

The deprecation errors are in the 'ref', 'ffi' and 'v8' libraries that I'm using to make the C calls. I'll raise a bug on tootallnate's github. If I don't get any luck, I might have to change the way I do the calls to C.

Anyone else on here have any recommendations on better ways to call C routines?

---

<div class="post-metadata">

### Author: ![bwims](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bwims/32/64907_2.png) [@bwims](https://discourse.nodered.org/u/bwims)
#### Post date: [10 June 2019 13:38 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/9 "2019-06-10T13:38:11Z")

</div>

Hi!

many thanks for the trouble! I will look back from time to time to see how you are getting on. Would any further announcements come via this thread? If so, I will get notified. I do appreciate your philanthropic efforts!

---

<div class="post-metadata">

### Author: ![Achronite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/achronite/32/31868_2.png) [@Achronite](https://discourse.nodered.org/u/Achronite)
#### Post date: [12 June 2019 14:24 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/10 "2019-06-12T14:24:11Z")

</div>

Probably best to follow my github repo. Issue 4 is to add TRV support: [https://github.com/Achronite/node-red-contrib-energenie-ener314rt/issues/4](https://github.com/Achronite/node-red-contrib-energenie-ener314rt/issues/4)

---

<div class="post-metadata">

### Author: ![ab55koy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ab55koy/32/14643_2.png) [@ab55koy](https://discourse.nodered.org/u/ab55koy)
#### Post date: [27 November 2019 06:45 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/11 "2019-11-27T06:45:39Z")

</div>

Hi, I'm new here, just getting started with node-red. My house is filled with energinie light switches and would love to control them locally rather than the gateway.

I stumbled upon this node-red addon while I was trying to find a way to achieve this with Home Assistant.

Unfortunately, when I attempt to install this, it seems to fail every time.

I have latest version of raspian v10 buster (freshly installed), node-red v1.0.3 and node js version v12.13.1

As I a new user I am unable to attach the log. I have pasted the log file on just paste (link below)

[https://justpaste.it/710ee](https://justpaste.it/710ee)

Any help would be appreciated. Thanks!

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 November 2019 10:25 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/12 "2019-11-27T10:25:42Z")

</div>

You are right, it won't install. Possibly it is incompatible with the later version of nodejs. Probably the best thing is to submit an issue on the node's github page.

---

<div class="post-metadata">

### Author: ![ab55koy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ab55koy/32/14643_2.png) [@ab55koy](https://discourse.nodered.org/u/ab55koy)
#### Post date: [27 November 2019 19:49 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/13 "2019-11-27T19:49:28Z")

</div>

Thank you for responding. I have posted this as an issue on the github page. hope it gets resolved soon.

---

<div class="post-metadata">

### Author: ![Achronite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/achronite/32/31868_2.png) [@Achronite](https://discourse.nodered.org/u/Achronite)
#### Post date: [28 November 2019 18:53 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/14 "2019-11-28T18:53:52Z")

</div>

This is a problem in the 'ref' library which is deprecated. The new v3 version (see develop branch) completely changes the dependencies to use node native API instead. I'll take this as a prompt to get it released 🙂

---

<div class="post-metadata">

### Author: ![Achronite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/achronite/32/31868_2.png) [@Achronite](https://discourse.nodered.org/u/Achronite)
#### Post date: [10 January 2020 18:46 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-energenie-ener314rt/10475/15 "2020-01-10T18:46:06Z")

</div>

New version 0.3.0 now available. This release is a major change.

- Switched to use node.js Native API (N-API) for calling C functions, and split off new node module
- All external dependencies have been removed, apart from the sister module
- Added a new node to support MiHome Radiator Valve
- Added a separate thread for monitoring that implements caching (for eTRV) and dynamic polling
- This module requires node.js v10+, and should work with most versions of node-red that work with this version of node.js.
