Hi,
About I week ago I messed up my previous Raspberry installation. It had Pimatic running with Homeduino and with a RF433 transmitter and receiver connected to the GPIO pins. This was all working until I did something wrong when installing a new plugin (Tradfri lights).
So this week I started from scratch with a newly formatted SD-card and a fresh install of Raspbian. Because I also need to run a separate Node app that needs a newer version of Node, I chose to do things properly this time and installed nvm. And then I also installed the latest version of Pimatic with nvm running Node v4.6.2.
Then after installing the Homeduino plugin again I ran into my first problem. I also got the “hardware not supported” and “garbage collected wiringX library” errors. After some searching I found this topic and followed the instructions carefully.
After this I ran into the second problem. Apparently, Pigpio needs to run as root, but you can’t use sudo when using nvm. So I did some more searching and found a solution here: https://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo
sudo ln -s "$NVM_DIR/versions/node/$(nvm version)/bin/node" "/usr/local/bin/node"
sudo ln -s "$NVM_DIR/versions/node/$(nvm version)/bin/npm" "/usr/local/bin/npm"
That solved the second issue. Now I can run Pimatic without any errors. Great! So all is fine, except for one thing… The rf433-part is not working. It’s as if the transmitter and receiver are not connected at all! The wiring is unchanged and worked before and Pimatic runs with no errors, but nothing happens when I send a message.
Does someone have a clue what is wrong? Maybe @layereight or @DaanNL ?
Logs from Pimatic:
pi@pi:~/pimatic-app $ sudo node node_modules/pimatic/pimatic.js
13:19:43.894 2018-09-01 Saturday
13:19:49.278 [pimatic] Starting pimatic version 0.9.43
13:19:49.290 [pimatic] Node.js version 4.6.2
13:19:49.291 [pimatic] OpenSSL version 1.0.2j
13:19:49.828 [pimatic] settings.debug is true, showing debug output for pimatic core.
13:19:51.756 [pimatic, ppm] 2.15.12
13:19:51.809 [pimatic] Loading plugin: "pimatic-cron" (0.8.8)
13:19:52.283 [pimatic] Loading plugin: "pimatic-mobile-frontend" (0.9.12)
13:19:53.020 [pimatic] Loading plugin: "pimatic-homeduino" (0.9.11)
13:19:53.024 [pimatic] debug is true in plugin config, showing debug output for pimatic-homeduino.
13:19:53.670 [pimatic] Loading plugin: "pimatic-sunrise" (0.9.2)
13:19:53.831 [pimatic] Loading plugin: "pimatic-smartmeter2" (0.0.18)
13:19:53.869 [pimatic] Loading plugin: "pimatic-tradfri" (0.1.17)
13:19:53.874 [pimatic] debug is true in plugin config, showing debug output for pimatic-tradfri.
13:19:54.065 [pimatic-cron] the time is: Sat Sep 01 2018 13:19:54 GMT+0200 (CEST)
13:19:54.452 [pimatic-sunrise] Your location is set to lat: 52.367027, long: 6.668492
13:19:54.501 [pimatic-tradfri] Plugin initialization...
serialport options
{ portName: '/dev/serial/by-id/usb-FTDI_P1_Converter_Cable_P12H655V-if00-port0',
baudRate: 115200,
dataBits: 7,
parity: 'even',
stopBits: 1,
flowControl: true }
13:19:55.104 [pimatic] New device "Smartmeter"...
13:19:55.109 [pimatic] The device type Smartmeterdevice2 does not implement a destroy function
13:19:55.188 [pimatic] New device "Totaal Electriciteit"...
13:19:55.225 [pimatic] New device "Totaal Gas"...
13:19:55.252 [pimatic] New device "Actueel Electriciteit"...
13:19:55.323 [pimatic] New device "Electriciteit Dag Verbruik"...
13:19:55.352 [pimatic] New device "Electriciteit Uur Verbruik"...
13:19:55.382 [pimatic] New device "Gas Dag Verbruik"...
13:19:55.413 [pimatic] New device "Gas Uur Verbruik"...
13:19:55.447 [pimatic] New device "Electriciteit Dag Kosten"...
13:19:55.480 [pimatic] New device "Electriciteit Uur Kosten"...
13:19:55.501 [pimatic] New device "Gas Dag Kosten"...
13:19:55.532 [pimatic] New device "Gas Uur Kosten"...
13:19:55.570 [pimatic] New device "TV Meubel"...
13:19:55.604 [pimatic] New device "Vloerlamp"...
13:19:55.628 [pimatic] New device "LED lamp"...
13:19:55.659 [pimatic] New device "Alles aan/uit"...
13:19:55.700 [pimatic] New device "Weerstation1"...
13:19:55.743 [pimatic] New device "Weerstation2"...
13:19:55.769 [pimatic] New device "Bolletjes"...
13:19:55.798 [pimatic] New device "Boiler"...
13:19:55.837 [pimatic] New device "Contactsensor woonkamer"...
13:19:55.870 [pimatic] New device "Contactsensor achterdeur"...
13:19:55.900 [pimatic] New device "Contactsensor voordeur"...
13:19:55.930 [pimatic] New device "Kleurtjeslamp"...
13:19:55.965 [pimatic] New device "Weerstation3"...
13:19:55.999 [pimatic] New device "TradfriHub"...
13:19:56.020 [pimatic] New device "TRADFRI wireless dimmer"...
13:19:56.050 [pimatic] New device "Barretje keuken 1"...
13:19:56.079 [pimatic] New device "Barretje keuken 2"...
13:19:56.101 [pimatic] New device "TRADFRI remote control"...
13:19:56.132 [pimatic] New device "Tafel 1"...
13:19:56.155 [pimatic] New device "Tafel 2"...
13:19:56.180 [pimatic] New device "Keuken"...
13:19:56.202 [pimatic] New device "Tafel"...
13:19:56.228 [pimatic] New device "Scenes Keuken"...
13:19:56.277 [pimatic] New device "Scenes Tafel"...
13:19:59.046 [pimatic-tradfri] tradfri cfg: Gateway IP: 192.168.2.10
- Serial port is open
13:19:59.880 [pimatic-mobile-frontend] packing static assets
13:20:01.747 [pimatic-mobile-frontend] packing static assets finished
13:20:01.756 [pimatic-mobile-frontend] rendering html
13:20:11.710 [pimatic-mobile-frontend] rendering html finished
13:20:11.836 [pimatic] Listening for HTTP-request on port 8080...
13:20:11.843 [pimatic-tradfri] ...connection error!
CLEANUP
13:20:11.854 [pimatic-tradfri] Try to connect to Tradfri
13:20:11.889 [pimatic-homeduino] data: "ready"
13:20:12.242 [pimatic-homeduino] Connected to homeduino device.
13:20:12.288 [pimatic-homeduino] data: "ACK"
13:20:12.508 [pimatic-homeduino] Receiving on pin 17
13:20:12.869 [pimatic-tradfri] Gateway online - Firmware: 1.4.15
13:20:12.872 [pimatic-tradfri] Tradfri plugin ready
13:20:12.877 [pimatic-tradfri] TRY Obeserving now the device Barretje keuken 1
13:20:12.880 [pimatic-tradfri] TRY Obeserving now the device Barretje keuken 2
13:20:12.883 [pimatic-tradfri] TRY Obeserving now the device Tafel 1
13:20:12.884 [pimatic-tradfri] TRY Obeserving now the device Tafel 2
13:20:12.921 [pimatic-tradfri] Obeserving now the device Barretje keuken 1
13:20:12.929 [pimatic-tradfri] Obeserving now the device Barretje keuken 2
13:20:12.944 [pimatic-tradfri] Obeserving now the device Tafel 1
13:20:12.953 [pimatic-tradfri] Obeserving now the device Tafel 2
13:20:12.969 [pimatic-tradfri] Obeserving now the group Keuken
13:20:12.986 [pimatic-tradfri] Obeserving now the group Tafel
13:20:43.590 [pimatic-homeduino] Sending Protocol: switch2 houseCode:24 unitCode:2 all:false state:false Pin:18 Repeats:7
13:20:43.888 [pimatic-homeduino] data: "ACK"
13:21:04.965 [pimatic-homeduino] Sending Protocol: switch1 id:22641066 unit:1 all:false state:false Pin:18 Repeats:7
13:21:05.535 [pimatic-homeduino] data: "ACK"
13:26:11.903 [pimatic-homeduino] data: "PING"
13:31:11.917 [pimatic-homeduino] data: "PING"
13:36:11.929 [pimatic-homeduino] data: "PING"
13:41:11.941 [pimatic-homeduino] data: "PING"
13:46:11.950 [pimatic-homeduino] data: "PING"
13:51:11.960 [pimatic-homeduino] data: "PING"
13:56:11.973 [pimatic-homeduino] data: "PING"
14:00:00.104 [pimatic] Suppressing rule smartmeter2_hour_usage_costs execute because it was executed recently.
14:00:00.113 [pimatic] Suppressing rule smartmeter2_hour_usage_costs execute because it was executed recently.
And logs from my RPi:
pi@pi:~ $ gpio
gpio: At your service!
Type: gpio -h for full details and
gpio readall for a quick printout of your connector details
pi@pi:~ $ gpio -v
gpio version: 2.46
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty
Raspberry Pi Details:
Type: Pi 3, Revision: 02, Memory: 1024MB, Maker: Sony
* Device tree is enabled.
*--> Raspberry Pi 3 Model B Rev 1.2
* This Raspberry Pi supports user-level GPIO access.
pi@pi:~ $ gpio readall
+-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| | | 3.3v | | | 1 || 2 | | | 5v | | |
| 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5v | | |
| 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | |
| 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 1 | ALT5 | TxD | 15 | 14 |
| | | 0v | | | 9 || 10 | 1 | ALT5 | RxD | 16 | 15 |
| 17 | 0 | GPIO. 0 | IN | 0 | 11 || 12 | 0 | OUT | GPIO. 1 | 1 | 18 |
| 27 | 2 | GPIO. 2 | OUT | 0 | 13 || 14 | | | 0v | | |
| 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 |
| | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 |
| 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | |
| 9 | 13 | MISO | IN | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 |
| 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | IN | CE0 | 10 | 8 |
| | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 |
| 0 | 30 | SDA.0 | IN | 1 | 27 || 28 | 1 | IN | SCL.0 | 31 | 1 |
| 5 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | |
| 6 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | IN | GPIO.26 | 26 | 12 |
| 13 | 23 | GPIO.23 | IN | 0 | 33 || 34 | | | 0v | | |
| 19 | 24 | GPIO.24 | IN | 0 | 35 || 36 | 0 | IN | GPIO.27 | 27 | 16 |
| 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | IN | GPIO.28 | 28 | 20 |
| | | 0v | | | 39 || 40 | 0 | OUT | GPIO.29 | 29 | 21 |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
pi@pi:~ $ pinout
,--------------------------------.
| oooooooooooooooooooo J8 +====
| 1ooooooooooooooooooo | USB
| +====
| Pi Model 3B V1.2 |
| +----+ +====
| |D| |SoC | | USB
| |S| | | +====
| |I| +----+ |
| |C| +======
| |S| | Net
| pwr |HDMI| |I||A| +======
`-| |--------| |----|V|-------'
Revision : a02082
SoC : BCM2837
RAM : 1024Mb
Storage : MicroSD
USB ports : 4 (excluding power)
Ethernet ports : 1
Wi-fi : True
Bluetooth : True
Camera ports (CSI) : 1
Display ports (DSI): 1
J8:
3V3 (1) (2) 5V
GPIO2 (3) (4) 5V
GPIO3 (5) (6) GND
GPIO4 (7) (8) GPIO14
GND (9) (10) GPIO15
GPIO17 (11) (12) GPIO18
GPIO27 (13) (14) GND
GPIO22 (15) (16) GPIO23
3V3 (17) (18) GPIO24
GPIO10 (19) (20) GND
GPIO9 (21) (22) GPIO25
GPIO11 (23) (24) GPIO8
GND (25) (26) GPIO7
GPIO0 (27) (28) GPIO1
GPIO5 (29) (30) GND
GPIO6 (31) (32) GPIO12
GPIO13 (33) (34) GND
GPIO19 (35) (36) GPIO16
GPIO26 (37) (38) GPIO20
GND (39) (40) GPIO21
For further information, please refer to https://pinout.xyz/
pi@pi:~ $ uname -r
4.14.62-v7+
pi@pi:~ $ pigpiod -v
64
pi@pi:~ $ cd virtualhomeduino
pi@pi:~/virtualhomeduino $ sudo ./vhduino
ready
^C2018-09-01 14:07:44 sigHandler: Unhandled signal 2, terminating
pi@pi:~/virtualhomeduino $ cd
pi@pi:~ $ cd pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/bin
pi@pi:~/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/bin $ sudo ./vhduino
ready
^C2018-09-01 14:08:44 sigHandler: Unhandled signal 2, terminating
pi@pi:~/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/bin $ cd
pi@pi:~ $ node -v
v4.6.2
pi@pi:~ $ npm -v
2.15.11
pi@pi:~ $
Thanks a lot in advance!