Hello,
Starting with the I’m still quite a noob with all this.
However the situation is like this:
-
I have one Arduino Nano node with DHT22 sensor attached to it. It communicates with NFR24L01+. The code is more or less from MySensors library.
-
One Arduino Uno node with NFR24L01+ acting as serial Gateway. This gateway is connected to Pi3 running newest HASSbian by USB cable. It is shown as /dev/ttyACM0. Sketch is default MySensor serial gateway model.
[ 1369.040091] cdc_acm 1-1.5:1.0: ttyACM0: USB ACM device
[ 3835.067626] usb 1-1.5: USB disconnect, device number 6
[ 4001.212899] usb 1-1.4: new full-speed USB device number 7 using dwc_otg
[ 4001.327967] usb 1-1.4: New USB device found, idVendor=2341, idProduct=0043
[ 4001.327987] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 4001.328001] usb 1-1.4: Manufacturer: Arduino (www.arduino.cc)
[ 4001.328013] usb 1-1.4: SerialNumber: 9543334393335160E171
-
My configuration.yaml is pretty simple. The default startup lines and then MySensors serial addittions on the bottom:
mysensors:
gateways:
- device: ‘/dev/ttyACM0’
persistence_file: ‘/home/homeassistant/mysensors1.json’
baud_rate: 115200
debug: true
optimistic: false
persistence: true
retain: true
version: 2.0 -
Startup goes ok, but gives errors of persistence_file even it should really be authorized by homeassistant as the file is in its home directory:
16-10-31 11:27:31 WARNING (Thread-1) [mysensors.mysensors] File does not exist or is not readable: /home/homeassistant/mysensors1.json
16-10-31 11:27:31 WARNING (Thread-1) [mysensors.mysensors] Trying backup file: /home/homeassistant/mysensors1.json.bak
16-10-31 11:27:31 WARNING (Thread-1) [mysensors.mysensors] File does not exist or is not readable: /home/homeassistant/mysensors1.json.bak
16-10-31 11:27:31 WARNING (Thread-1) [mysensors.mysensors] Failed to load sensors from file: /home/homeassistant/mysensors1.json -
After this log messages are all green, and it continues with:
16-10-31 11:29:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state sun.sun=above_horizon; next_setting=2016-10-31T14:26:13+00:00, azimuth=200.83, next_rising=2016-11-01T05:46:08+00:00, friendly_name=Sun, elevation=13.65 @ 2016-10-31T13:27:29.856190+02:00>, entity_id=sun.sun, new_state=<state sun.sun=above_horizon; next_setting=2016-10-31T14:26:13+00:00, azimuth=201.08, next_rising=2016-11-01T05:46:08+00:00, friendly_name=Sun, elevation=13.6 @ 2016-10-31T13:27:29.856190+02:00>>
16-10-31 11:29:32 INFO (Thread-5) [mysensors.mysensors] Trying to connect to /dev/ttyACM0
16-10-31 11:29:32 ERROR (Thread-5) [mysensors.mysensors] Unable to connect to /dev/ttyACM0
16-10-31 11:29:42 INFO (Thread-5) [mysensors.mysensors] Trying to connect to /dev/ttyACM0
16-10-31 11:29:42 ERROR (Thread-5) [mysensors.mysensors] Unable to connect to /dev/ttyACM0
16-10-31 11:29:52 INFO (Thread-5) [mysensors.mysensors] Trying to connect to /dev/ttyACM0
16-10-31 11:29:52 ERROR (Thread-5) [mysensors.mysensors] Unable to connect to /dev/ttyACM0
16-10-31 11:30:02 INFO (Thread-5) [mysensors.mysensors] Trying to connect to /dev/ttyACM0
16-10-31 11:30:02 ERROR (Thread-5) [mysensors.mysensors] Unable to connect to /dev/ttyACM0
16-10-31 11:30:12 INFO (Thread-5) [mysensors.mysensors] Trying to connect to /dev/ttyACM0
16-10-31 11:30:12 ERROR (Thread-5) [mysensors.mysensors] Unable to connect to /dev/ttyACM0
16-10-31 11:30:22 INFO (Thread-5) [mysensors.mysensors] Trying to connect to /dev/ttyACM0
16-10-31 11:30:22 ERROR (Thread-5) [mysensors.mysensors] Unable to connect to /dev/ttyACM0
First I thought that this is a permission problem and gave all+r to /dev/ttyACM0. When looking ttyACM0 with cat /dev/ttyACM0 it shows:
0;255;3;0;9;TSP:MSG:READ 255-255-255 3,t=3,pt=0,l=0,sg=0:
255;255;3;0;3;
55-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
255;255;3;0;3;
0;255;3;0;9;TSP:MSG:READ 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
255;255;3;0;3;
55-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
255;255;3;0;3;
0;255;3;0;9;TSP:MSG:READ 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
255;255;3;0;3;
0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSM:RADIO:OK
0;255;3;0;9;TSM:GW MODE
0;255;3;0;9;TSM:READY
0;255;3;0;14;Gateway startup complete.
0;255;0;0;18;2.0.0
0;255;3;0;9;No registration required
0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=255)
0;255;3;0;9;TSP:CHKUPL:OK
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;TSP:MSG:SEND 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=bc:0
0;255;3;0;9;TSP:MSG:READ 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
255;255;3;0;3;
0;255;3;0;9;TSP:MSG:READ 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
255;255;3;0;3;
I’m really stuck with this now. Can someone help me with this? The HASSbian is the newest version as the MySensors v2.0 library.