unable to open USB port



  • Hi .
    i am having an issue with getting HA to talk to my serial gateway 0_1468420353578_error-2.txt

    not sure what is going on (newbie) can any one help
    running Debian 8 on pc
    HA is running fine
    i have something now showing on Available services please screen shot0_1468420640419_screen shot.jpg
    hope you can help

    chilliman


  • Plugin Developer

    Have you tested your setup with just a serial monitor on both ends, gateway and a node? Do you see output in the serial monitor for the same port you've specified in the home assistant config for mysensors? What are the permissions for the port? Do you have anything else running connected to the port?



  • @martinhjelmare
    i will check that out and let you know what i find

    chilliman



  • martinhjelmare
    i had to check the info from the gateway and sensor on a different m/c for some reason the install on Debain 8.5 i was unable to access the desktop .
    for the gateway :-
    0;0;3;0;9;gateway started, id=0, parent=0, distance=0
    0;0;3;0;14;Gateway startup complete.

    for the sensor( motion sensor)
    send: 3-3-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=ok:1.5.1
    send: 3-3-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
    sensor started, id=3, parent=0, distance=1
    send: 3-3-0-0 s=255,c=3,t=11,pt=0,l=13,sg=0,st=ok:Motion Sensor
    send: 3-3-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0
    send: 3-3-0-0 s=1,c=0,t=1,pt=0,l=0,sg=0,st=ok:
    0
    send: 3-3-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,st=ok:0
    1
    send: 3-3-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,st=ok:1
    0
    send: 3-3-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,st=ok:0

    add both:-
    0;0;3;0;9;gateway started, id=0, parent=0, distance=0
    0;0;3;0;14;Gateway startup complete.
    0;0;3;0;9;read: 3-3-0 s=1,c=1,t=16,pt=0,l=1,sg=0:0
    3;1;1;0;16;0
    0;0;3;0;9;read: 3-3-0 s=1,c=1,t=16,pt=0,l=1,sg=0:1
    3;1;1;0;16;1
    0;0;3;0;9;read: 3-3-0 s=1,c=1,t=16,pt=0,l=1,sg=0:0
    3;1;1;0;16;0

    hope you make some sense of this numbers
    if you need any info please let me know so i can get it for you , do you know why i can not open the debian desk ?
    chilliman


  • Plugin Developer

    The serial output looks good. Now you should check the permission and ownership information of the usb device on the computer. But of course you need access to that first. Have you had access to the desktop before? How did you install Debian?



  • hi.
    i was not able to access the desktop from the start i reload the OS three time make sure i select the correct option (the one i through i needed), as it boots up it ask me for my password screen clears and comes up with Opp's where was a problem and goes back to the sign in screen

    chilliman


  • Plugin Developer

    If it's a fresh install and you don't mind wiping the disk or partition , it might be easiest to just reinstall the complete OS, if you don't know what's wrong. Otherwise try googling the error message.

    I'm using Ubuntu myself which is another distribution but based on Debian. If you don't have a specific reason for choosing Debian, I would recommend Ubuntu. My installs have gone without hiccups for probably more than 90% of times over multiple different systems for more than 10 years that I've been using Ubuntu.



  • martinhjelmare
    what version of ubuntu do you i should i use 14.04 ,15.10 or 16.04LTS i am more that happy to reinstall the OS i am just trying to get Home Assistant and MySensors working correctly

    thanks for you help
    chilliman



  • @chilliman

    Go with the latest LTS build of Ubuntu. LTS stands for Long Term Support and guarantees security updates to that version for 5 years(?); and can be easily updated to the latest if you wish.

    Also depending on what you comfort level is with Linux in general. there are several other flavours/distributions of Ubuntu, including a Server edition that is completely text based and uses the least system resources.



  • 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.json

    what do i have to do to get this working correctly any ideas

    chilliman



  • The error says it. You have persistence turned on, but the file location is invalid or you do not have read/write access to it.

    What user are you using to turn on hass and what does the MySensors entry of configuration.yaml look like?



  • 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: 115200

    if 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.pickle

    any 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: true
    

    The 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 error

    16-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/.homeassistant

    not 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: true

    My 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.json

    chilliman



  • Drock1985
    please find attached HA start up file
    0_1468799007226_HA-startup.txt

    thanks
    chilliman


  • Plugin Developer

    @chilliman

    The 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



  • @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: true
    

    Other 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.



  • @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.



  • This post is deleted!

Log in to reply
 

Suggested Topics

  • 1
  • 3
  • 2
  • 8
  • 5

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts