Closed mskorge closed 8 years ago
Hmm! Do you have the latest version of telldus-core and telldus-core-dev installed?
I believe so!
apt-cache show telldus-core Package: telldus-core Version: 2.1.2-1 Architecture: armhf
apt-cache show libtelldus-core-dev Package: libtelldus-core-dev Source: telldus-core Version: 2.1.2-1 Architecture: armhf
I am running on a RPi
Thanks!
Interesting, i've got the same version, and it compiles just fine :)
[...]$ sudo pacman -Q telldus-core
telldus-core 2.1.2-1
What does find /usr -name 'telldus-core.h' 2>/dev/null
output?
[...]$ find /usr -name 'telldus-core.h' 2>/dev/null
/usr/include/telldus-core.h
L118-L125 in telldus-core.h should contain the missing defines
// Sensor value types
#define TELLSTICK_TEMPERATURE 1
#define TELLSTICK_HUMIDITY 2
#define TELLSTICK_RAINRATE 4
#define TELLSTICK_RAINTOTAL 8
#define TELLSTICK_WINDDIRECTION 16
#define TELLSTICK_WINDAVERAGE 32
#define TELLSTICK_WINDGUST 64
whereis telldus-core.h telldus-core: /usr/include/telldus-core.h /usr/share/telldus-core
I've tried pulling your source and compile instead of using npm and it gives me the same result.
Yep those lines are the same in my system...
Michael
On Sat, 2 Jan 2016 14:41 Robin Nilsson notifications@github.com wrote:
L118-L125 in telldus-core.h should contain the missing defines
// Sensor value types
define TELLSTICK_TEMPERATURE 1
define TELLSTICK_HUMIDITY 2
define TELLSTICK_RAINRATE 4
define TELLSTICK_RAINTOTAL 8
define TELLSTICK_WINDDIRECTION 16
define TELLSTICK_WINDAVERAGE 32
define TELLSTICK_WINDGUST 64
— Reply to this email directly or view it on GitHub https://github.com/Hexagon/node-telldus/issues/68#issuecomment-168394000 .
Hälsningar Micke
Can't really figure out why that is happening, it do seem like an old version of telldus-core.h is used as RAINRATE etc was added in one of the last updates of telldus-core.
However, master-branch now have a possible fix for this, which disables support for weather stations if the appropriate headers isn't available. Try compiling from source again :)
Thanks! Will try.
I added the full path in telldus.cc to telldus-core.h and that worked fine too.
Thanks for your creating this package!
Pulled your updates and it builds fine! Thanks a lot!
Great to hear, np!
Hi,
I am unable to get around this. Tried different node versions and made sure I had recent gcc and g++ versions. Any suggestions?
make: Entering directory '/usr/local/lib/node_modules/telldus/build' CXX(target) Release/obj.target/telldus/telldus.o ../telldus.cc: In function ‘v8::Localv8::Object telldus_v8::GetSupportedSensorValues(telldusv8::telldusSensorInternals, v8::Isolate)’: ../telldus.cc:247:24: error: ‘TELLSTICK_RAINRATE’ was not declared in this scope if (si.dataTypes & TELLSTICK_RAINRATE) { ^ ../telldus.cc:255:24: error: ‘TELLSTICK_RAINTOTAL’ was not declared in this scope if (si.dataTypes & TELLSTICK_RAINTOTAL) { ^ ../telldus.cc:263:24: error: ‘TELLSTICK_WINDDIRECTION’ was not declared in this scope if (si.dataTypes & TELLSTICK_WINDDIRECTION) { ^ ../telldus.cc:271:24: error: ‘TELLSTICK_WINDAVERAGE’ was not declared in this scope if (si.dataTypes & TELLSTICK_WINDAVERAGE) { ^ ../telldus.cc:279:24: error: ‘TELLSTICK_WINDGUST’ was not declared in this scope if (si.dataTypes & TELLSTICKWINDGUST) { ^ telldus.target.mk:86: recipe for target 'Release/obj.target/telldus/telldus.o' failed make: ** [Release/obj.target/telldus/telldus.o] Error 1 make: Leaving directory '/usr/local/lib/node_modules/telldus/build' gyp ERR! build error gyp ERR! stack Error:
make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 3.12.20+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" gyp ERR! cwd /usr/local/lib/node_modules/telldus gyp ERR! node -v v4.2.4 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok