unable to open USB port
-
Martin.
i have purchased a raspberry pi 3 running Debian Jessie loaded Home Assistant which working great i have add MySensors Gateway with a motion sensor node there is no error as regards to not opening the usb port (it says found and has open it) what i am getting error :-16-07-17 16:46:03 mysensors.mysensors: File does not exist or is not readable: path/mysensors.json
16-07-17 16:46:03 mysensors.mysensors: Trying backup file: path/mysensors.json.bak
16-07-17 16:46:03 mysensors.mysensors: File does not exist or is not readable: path/mysensors.json.bak
16-07-17 16:46:03 mysensors.mysensors: Failed to load sensors from file: path/mysensors.jsonwhat do i have to do to get this working correctly any ideas
chilliman
-
drock1985
do you have to have the persistence turned on , i turn on hass with pi (user)mysensors:
gateways:
- device: '/dev/ttyUSB0'
persistence_file: 'path/mysensors2.json'
baud_rate: 115200if i turn the persistence off i get a different error
16-07-17 21:42:41 mysensors.mysensors: File does not exist or is not readable: /home/pi/.homeassistant/mysensors1.pickle
16-07-17 21:42:41 mysensors.mysensors: Trying backup file: /home/pi/.homeassistant/mysensors1.pickle.bak
16-07-17 21:42:41 mysensors.mysensors: File does not exist or is not readable: /home/pi/.homeassistant/mysensors1.pickle.bak
16-07-17 21:42:41 mysensors.mysensors: Failed to load sensors from file: /home/pi/.homeassistant/mysensors1.pickleany ideas?
chilliman
-
Your path to the persistence file is wrong. You need to choose a directory that your user (in this case pi) has access to. I would recommend using /home/pi/.homeassistant so that your configuration.yaml flie would look like this:
mysensors: gateways: - device: '/dev/ttyUSB0' persistence_file: 'home/pi/.homeassistant' baud_rate: 115200 debug: false persistence: trueThe entry in your configuration.yaml file is a direct copy/paste of the example; you have to change it to meet your setup. The one I posted above should work fine for your install, and you can enable debug and launch hass manually from a terminal if you need to debug any MySensors related issues.
-
drock1985.
i cut and paste the example you posted but a get a error16-07-17 23:07:10 mysensors.mysensors: File does not exist or is not readable: home/pi/.homeassistant
16-07-17 23:07:10 mysensors.mysensors: Trying backup file: home/pi/.homeassistant.bak
16-07-17 23:07:10 mysensors.mysensors: File does not exist or is not readable: home/pi/.homeassistant.bak
16-07-17 23:07:10 mysensors.mysensors: Failed to load sensors from file: home/pi/.homeassistantnot sure what is going on hopefully you can help me
chilliman -
drock1985.
i cut and paste the example you posted but a get a error16-07-17 23:07:10 mysensors.mysensors: File does not exist or is not readable: home/pi/.homeassistant
16-07-17 23:07:10 mysensors.mysensors: Trying backup file: home/pi/.homeassistant.bak
16-07-17 23:07:10 mysensors.mysensors: File does not exist or is not readable: home/pi/.homeassistant.bak
16-07-17 23:07:10 mysensors.mysensors: Failed to load sensors from file: home/pi/.homeassistantnot sure what is going on hopefully you can help me
chilliman@chilliman said:
mysensors:
gateways:
- device: '/dev/ttyUSB0'
persistence_file: 'home/pi/.homeassistant'
baud_rate: 115200
debug: false
persistence: trueMy bad, forgot to add the file at the end of the directory.
mysensors: gateways: - device: '/dev/ttyUSB0' persistence_file: 'home/pi/.homeassistant/mysensors.json' baud_rate: 115200 debug: false persistence: true -
drock1985
i just changed the conf file to with the latest and i get this error massage
16-07-17 23:16:27 mysensors.mysensors: File does not exist or is not readable: home/pi/.homeassistant/mysensors.json
16-07-17 23:16:27 mysensors.mysensors: Trying backup file: home/pi/.homeassistant/mysensors.json.bak
16-07-17 23:16:27 mysensors.mysensors: File does not exist or is not readable: home/pi/.homeassistant/mysensors.json.bak
16-07-17 23:16:27 mysensors.mysensors: Failed to load sensors from file: home/pi/.homeassistant/mysensors.jsonchilliman
-
Drock1985
please find attached HA start up file
0_1468799007226_HA-startup.txtthanks
chilliman -
Drock1985
please find attached HA start up file
0_1468799007226_HA-startup.txtthanks
chillimanThe first time you start home assistant, the persistence file will not have been created, so you will get the warning message even if you have set the correct path. Only after a sensor has reported a value will the persistence file be written. You should always include a sending of initial value in your setup/presentation function for a node, so once you have started the node, it will be added as a device to home assistant and the persistence file will be populated.
-
martin.
i am sorry i having a newbie moment i just need to understand what is happening so the way it is setup is good.
if so i have few more question , i have the gateway and all have a node with a motion sensor attached so how do i get the motion sensor to show up on HA .
sorry for not understanding its a very steep learning curve.chilliman
-
martin.
i am sorry i having a newbie moment i just need to understand what is happening so the way it is setup is good.
if so i have few more question , i have the gateway and all have a node with a motion sensor attached so how do i get the motion sensor to show up on HA .
sorry for not understanding its a very steep learning curve.chilliman
Not sure what else to tell you. Like Martin said, for a node to appear at all in HA; it must do two things. 1) send the full presentation on the node start. Easiest way to do that is to start HA, and after HA is fully started put power to your motion sensor. 2) It must send a valid sensor status. In the case of a motion sensor, I believe it is either 1 or 0 (1 being motion detected, 0 being none).
The only thing I can see is maybe the / needs to be in front of home. Can't see it causing this many issues though.
mysensors: gateways: - device: '/dev/ttyUSB0' persistence_file: '/home/pi/.homeassistant/mysensors.json' baud_rate: 115200 debug: false persistence: trueOther than that i'm not sure what else to suggest. If everything is configured right, it should see it. You may also want to check out the debug part of MySensors config and HA to better determine your issue. @martinhjelmare help me with that issue some time ago.
-
Drock1985 & Martin.
thanks guys i have it working just needed to do the full presentation and where it was.
just a newbie mistake.
thanks again
chilliman.No problem; just glad to hear you got it working. Everyone is new sometime.
FYI I made quite a few mistakes in the configuration.yaml file - took me a while to realize spaces were important ;)
Let us know if you have any other problems.
-
Not sure what else to tell you. Like Martin said, for a node to appear at all in HA; it must do two things. 1) send the full presentation on the node start. Easiest way to do that is to start HA, and after HA is fully started put power to your motion sensor. 2) It must send a valid sensor status. In the case of a motion sensor, I believe it is either 1 or 0 (1 being motion detected, 0 being none).
The only thing I can see is maybe the / needs to be in front of home. Can't see it causing this many issues though.
mysensors: gateways: - device: '/dev/ttyUSB0' persistence_file: '/home/pi/.homeassistant/mysensors.json' baud_rate: 115200 debug: false persistence: trueOther than that i'm not sure what else to suggest. If everything is configured right, it should see it. You may also want to check out the debug part of MySensors config and HA to better determine your issue. @martinhjelmare help me with that issue some time ago.