-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to initialise Energenie ENER314-RT board error: -1 #14
Comments
Error -1 is caused by either the version of the radio returning less than 36 via SPI, or it could be caused by a mutex locking issue. The former may be caused by different SPI pin assignments on the zero or Pi B. Can you confirm which version of the boards you have? Is there anything else output in the node-red-log ? Have you had any success outside of node-red and this module? How are your editing/compiling skills? I can send you instructions on how to enable debug to diagnose this further. |
I am using pi zero and pi model B, i have just tried moving sd card from the zero to model B3+ because i couldn't install on B3, same errors. |
tried on pi B again these are the errors when control node is deployed: 05/01/2020, 09:27:14 lsmod shows: |
Strange - looks like it is not finding the C functions via the library that this version uses known as 'ref'. This library has unfortunately been deprecated, and is known not to work under node v12+ and node-red v1.+ What version of node and node-red are you using? I have a new version which has had a substantial rewrite and is currently undergoing test (see my develop branch) which removes the dependency on 'ref', and also introduces support for the thermostatic radiator valves. I hope to release this soon as v0.3 after I have tidied up the code. In the meantime if you did want to try and run a debug version of the v0.2 code do the following as user 'pi': if you don't have node-gyp installed, you can install it via npm: |
i am running v1.0.3, i will try and recompile early next week |
I think this error is probably due to 'ref' and 'ffi' being deprecated then, you need to wait for v0.3. I'm in final test with it now. |
Thanks, I wait for new release |
New version is now released, please let me know if it fixes your issue |
Hi, node-red hangs on deploy, node-red doesn't start again.
Flashed new sd card installed node-red still hangs, left it for a while no
luck I will try again tomorrow
Thanks
…On Fri, 10 Jan 2020, 18:52 Achronite, ***@***.***> wrote:
New version is now released, please let me know if it fixes your issue
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAZG6S7HEEFMTDHRUGZUULDQ5C7W7A5CNFSM4KCO5GTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIU32NQ#issuecomment-573160758>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZG6S5IKQBN4EEEW5JLZ3TQ5C7W7ANCNFSM4KCO5GTA>
.
|
Can you please check the version of node? (node -v) It needs to be at least v10. I've put together a quick test program for you to try outside of node-red (with debug enabled), you can find it here: https://github.com/Achronite/ener314rt-debug Please node-red-stop first if you have my node installed. |
Node red v1.0.3 node v12.14.1 npm 6.13.6 on pi 3+, node red hangs deploying
ener314rt.
Node red v1.0.3 node v10.15.2 npm 6.13.0 on
pi model b error "something went wrong deploying node"
All running buster.
Tried 2 different ener314s in different combinations on pi zero, realy old
pi model b and pi 3+.
Thanks
…On Sat, 11 Jan 2020, 18:02 Achronite, ***@***.***> wrote:
Can you please check the version of node? (node -v) It needs to be at
least v10.
I'll put together a quick test program for you to try outside of node-red
(with debug enabled) in the child node.js module. I'll ping you when it is
done, should be tomorrow by the latest.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAZG6S2C7HBW3BQTXPC2DNTQ5ICTNA5CNFSM4KCO5GTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWHRAY#issuecomment-573339779>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZG6S7UOMQCRU2CWPKF4OLQ5ICTNANCNFSM4KCO5GTA>
.
|
Please try the debug stand-alone program that I created for you. https://github.com/Achronite/ener314rt-debug. And paste the log. I have an old Model B too somewhere... |
the asterisk go on forever, both ener314rt on pi 3+
ook socket still flashing led
pi@raspberrypi:~/ener314rt-debug $ node test.js
napi_energenie.Init() called
radio-test: Initialising
init_ener314(): initialising
init_ener314(): mutex created & locked
radio_init
radio_ver=0
warning:unexpected radio ver<min
radio_standby
_wait_ready
***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************^C
…On Sat, 11 Jan 2020, 18:02 Achronite, ***@***.***> wrote:
Can you please check the version of node? (node -v) It needs to be at
least v10.
I'll put together a quick test program for you to try outside of node-red
(with debug enabled) in the child node.js module. I'll ping you when it is
done, should be tomorrow by the latest.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAZG6S2C7HBW3BQTXPC2DNTQ5ICTNA5CNFSM4KCO5GTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWHRAY#issuecomment-573339779>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZG6S7UOMQCRU2CWPKF4OLQ5ICTNANCNFSM4KCO5GTA>
.
|
OK the unexpected radio version is a clue. The device is not being recognised. It could be a problem accessing the SPI driver, the board is faulty or is not installed correctly. It is definitely the ENER314-RT that you are using? (the one with the gold coil on top). Do the red and green lights flash quickly when the program starts? |
it is the ener314rt the same as the picture, the leds are on all the time
no flashing, the board is fitted correctly, i have enable spi with
raspi-config.
i have only ran the test on the pi 3, i will run on pi zero, one of the
boards is only a few of weeks old, i will try and return if no joy.
…On Sun, 12 Jan 2020 at 13:12, Achronite ***@***.***> wrote:
OK the unexpected radio version is a clue. The device is not being
recognised. It could be a problem accessing the SPI driver, the board is
faulty or is not installed correctly. It is definitely the ENER314-RT that
you are using? (the one with the gold coil on top).
Do the red and green lights flash quickly when the program starts?
[image: image]
<https://user-images.githubusercontent.com/10363609/72219363-31066000-353d-11ea-865c-74a65d56a378.png>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAZG6S27F5N2DWBOZ6RKDTDQ5MJMZA5CNFSM4KCO5GTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWZVPY#issuecomment-573414079>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZG6S6WPHH7DGOLWS62ZTDQ5MJMZANCNFSM4KCO5GTA>
.
|
I'll check with the person who wrote the original SPI driver that I use for this to see if there are any known issues with your config. I'll dig out my old Pi B to see if I can replicate your issue, what version of buster are you running? |
OK, been taking a look at the issue list with the SPI driver, a similar issue to yours where radiover was returning 0: whaleygeek/pyenergenie#82 and whaleygeek/pyenergenie#119 Can you take a look through these threads? particularly the bits around hardware SPI driver being disabled? |
Sorry about triple post :) I've tried to reproduce your issue, I downloaded raspbian buster, ran etcher and then booted up my old Pi model B. `pi@raspberrypi:~ $ wget https://github.com/Achronite/ener314rt-debug/archive/master.zip master.zip [ <=> ] 48.46K 295KB/s in 0.2s 2020-01-12 18:35:56 (295 KB/s) - âmaster.zipâ saved [49618] pi@raspberrypi:~ $ unzip master.zip |
I put together a rfm69w wirewraped checked and checked again the
connections plugged into a pi zero I haven't used for a while, still same
results. I will dig out my scope next week when I have time and check spi
on all pi's and let you know how it goes.
Thanks for all your help
…On Sun, 12 Jan 2020, 18:45 Achronite, ***@***.***> wrote:
Sorry about triple post :)
I've tried to reproduce your issue, I downloaded raspbian buster, ran
etcher and then booted up my old Pi model B.
The program ran OK, without any changes, so I'm really not sure what is
going on for you! Maybe it is faulty hardware?
***@***.***:~ $ wget
https://github.com/Achronite/ener314rt-debug/archive/master.zip
--2020-01-12 18:35:54--
https://github.com/Achronite/ener314rt-debug/archive/master.zip
Resolving github.com (github.com)... 140.82.118.3
Connecting to github.com (github.com)|140.82.118.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/Achronite/ener314rt-debug/zip/master
[following]
--2020-01-12 18:35:55--
https://codeload.github.com/Achronite/ener314rt-debug/zip/master
Resolving codeload.github.com (codeload.github.com)... 140.82.113.10
Connecting to codeload.github.com (codeload.github.com)|140.82.113.10|:443...
connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: âmaster.zipâ
master.zip [ <=> ] 48.46K 295KB/s in 0.2s
2020-01-12 18:35:56 (295 KB/s) - âmaster.zipâ saved [49618]
***@***.***:~ $ unzip master.zip
Archive: master.zip
a5f38bfa6782fa72dacc5c802ad8734d4e216c49
creating: ener314rt-debug-master/
inflating: ener314rt-debug-master/.gitignore
creating: ener314rt-debug-master/C/
creating: ener314rt-debug-master/C/achronite/
inflating: ener314rt-debug-master/C/achronite/lock_radio.c
inflating: ener314rt-debug-master/C/achronite/lock_radio.h
inflating: ener314rt-debug-master/C/achronite/napi_energenie.c
inflating: ener314rt-debug-master/C/achronite/ook_send.c
inflating: ener314rt-debug-master/C/achronite/ook_send.h
inflating: ener314rt-debug-master/C/achronite/openThings.c
inflating: ener314rt-debug-master/C/achronite/openThings.h
creating: ener314rt-debug-master/C/energenie/
inflating: ener314rt-debug-master/C/energenie/LICENSE
inflating: ener314rt-debug-master/C/energenie/delay.h
inflating: ener314rt-debug-master/C/energenie/delay_posix.c
inflating: ener314rt-debug-master/C/energenie/gpio.h
inflating: ener314rt-debug-master/C/energenie/gpio_rpi.c
inflating: ener314rt-debug-master/C/energenie/hrfm69.c
inflating: ener314rt-debug-master/C/energenie/hrfm69.h
inflating: ener314rt-debug-master/C/energenie/radio.c
inflating: ener314rt-debug-master/C/energenie/radio.h
inflating: ener314rt-debug-master/C/energenie/spi.h
inflating: ener314rt-debug-master/C/energenie/spis.c
inflating: ener314rt-debug-master/C/energenie/system.h
inflating: ener314rt-debug-master/C/energenie/trace.h
inflating: ener314rt-debug-master/LICENSE
inflating: ener314rt-debug-master/README.md
inflating: ener314rt-debug-master/binding.gyp
inflating: ener314rt-debug-master/test.js
***@***.***:~ $ cd ener314*
***@***.***:/ener314rt-debug-master $ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using ***@***.***
gyp info using ***@***.*** | linux | arm
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/share/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/ener314rt-debug-master/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/share/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/include/nodejs/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/usr/include/nodejs',
gyp info spawn args '-Dnode_gyp_dir=/usr/share/node-gyp',
gyp info spawn args
'-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/pi/ener314rt-debug-master',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/pi/ener314rt-debug-master/build'
CC(target) Release/obj.target/ener314rt/C/achronite/napi_energenie.o
CC(target) Release/obj.target/ener314rt/C/achronite/lock_radio.o
CC(target) Release/obj.target/ener314rt/C/achronite/ook_send.o
CC(target) Release/obj.target/ener314rt/C/achronite/openThings.o
../C/achronite/openThings.c: In function âeTRV_updateâ:
../C/achronite/openThings.c:1414:17: warning: âstrncatâ output truncated
copying 50 bytes from a string of length 66 [-Wstringop-truncation]
strncat(trvData->errString, "Driver micro has suffered a watchdog reset
and needs data refresh.", MAX_ERRSTR);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../C/achronite/openThings.c:1419:17: warning: âstrncatâ output truncated
copying 50 bytes from a string of length 63 [-Wstringop-truncation]
strncat(trvData->errString, "Driver micro has suffered a noise reset and
needs data refresh.", MAX_ERRSTR);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../C/achronite/openThings.c:1424:17: warning: âstrncatâ output truncated
copying 50 bytes from a string of length 64 [-Wstringop-truncation]
strncat(trvData->errString, "Battery voltage has fallen below 2.2V and
valve has been opened.", MAX_ERRSTR);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC(target) Release/obj.target/ener314rt/C/energenie/radio.o
CC(target) Release/obj.target/ener314rt/C/energenie/hrfm69.o
CC(target) Release/obj.target/ener314rt/C/energenie/spis.o
CC(target) Release/obj.target/ener314rt/C/energenie/gpio_rpi.o
CC(target) Release/obj.target/ener314rt/C/energenie/delay_posix.o
SOLINK_MODULE(target) Release/obj.target/ener314rt.node
COPY Release/ener314rt.node
make: Leaving directory '/home/pi/ener314rt-debug-master/build'
gyp info ok
***@***.***:/ener314rt-debug-master $ node test.js
napi_energenie.Init() called
radio-test: Initialising
init_ener314(): initialising
init_ener314(): mutex created & locked
radio_init
radio_ver=36
radio_standby
_wait_ready
radio_standby
_wait_ready
radio-test: N-API radio_init returned 0
radio-test: switching 1:1:true
ook_send: Zone=1, Switch=1, state=1
_wait_ready
radio_mod_transmit()
_wait_ready
_wait_txready
radio_send_payload(): 20 tx payloads
|*|||||||||*|*|*|*|*|*|*|*|*|*|**_wait_ready
radio-test: switching 1:1:false
ook_send: Zone=1, Switch=1, state=0
radio_mod_transmit()`
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAZG6S4453SBAZYLP6YHBVDQ5NQM5A5CNFSM4KCO5GTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXBGPA#issuecomment-573444924>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZG6S5LC5B6MEK25DWOWV3Q5NQM5ANCNFSM4KCO5GTA>
.
|
after looking at the issue with pyenergenie i disabled spi rebooted and ran the test and it worked, but still error with node red on pi zero "TypeError: Cannot read property 'push' of undefined", and something went wrong teaching device. |
Excellent news! Glad to see that we got to the bottom of that, I'll close this issue with an update that documents the fix in the README and produces a better error message from the node. I believe that I fixed the 'push' error in v0.3 of my node-red node, are you running this version? |
i am running v0.3, the only error i get now is with ook teaching "something went wrong teaching device", iv'e managed to teach ook devices by setting a zone and then injecting a 1 and then i can control the socket with injecting boolean true or false. |
OK I'll take a look at the teaching error. It effectively does the same as sending a true anyway. It's probably something that I broke with the move to the new library. |
Just released v0.3.2 node, this should close all your issues, including the teach error. |
hi, i have tried two different boards on pi zero and pi b, neither initialise the board, i have enabled spi with raspi-config.
debug reports: "Unable to initialise Energenie ENER314-RT board error: -1"
and "TypeError: Cannot read property 'push' of undefined"
the red and green do light when node is added to palette.
when teaching socket i get error something went wrong teaching the device.
thanks
The text was updated successfully, but these errors were encountered: