Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Home Assistant
  4. Windows and configuration.yaml

Windows and configuration.yaml

Scheduled Pinned Locked Moved Home Assistant
11 Posts 5 Posters 6.3k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    drock1985
    wrote on last edited by
    #2

    Might be the formatting of your configuration.yaml file. Spacing is very important. Try opening in notepad or a more text base/programmer environment (ex, Notepad++) and do a copy/paste from the info on the HA website. Edit as necessary.

    My Projects
    2 Door Chime Sensor
    Washing Machine Monitor

    1 Reply Last reply
    1
    • L Offline
      L Offline
      Lemme
      wrote on last edited by
      #3

      OK - I will check the formatting.

      But the example file are Linux based, I use Windows, and my serial port are Com 5.
      I would be nice if someone with a Windows configuration would share their working config. One thing is the formatting, but I am not sure that I have written the correct com5 statement.

      Br
      Flemming

      martinhjelmareM 1 Reply Last reply
      0
      • D Offline
        D Offline
        drock1985
        wrote on last edited by drock1985
        #4

        Yes and no. They are formatted for the YAML language; which is basically a series of lines with the proper spaces (not tabs) in them.

        You can use any plain text editor, as long as you obey the spaces. A good program to start with is Notepad++ or Notepad2 (make a copy first) and copy/paste the example from the home-assistant wiki/info.

        As for the Windows entry to point to a serial port i'm afraid I can't help you there. Haven't tried this with Windows yet.

        My Projects
        2 Door Chime Sensor
        Washing Machine Monitor

        1 Reply Last reply
        0
        • L Lemme

          OK - I will check the formatting.

          But the example file are Linux based, I use Windows, and my serial port are Com 5.
          I would be nice if someone with a Windows configuration would share their working config. One thing is the formatting, but I am not sure that I have written the correct com5 statement.

          Br
          Flemming

          martinhjelmareM Offline
          martinhjelmareM Offline
          martinhjelmare
          Plugin Developer
          wrote on last edited by
          #5

          @Lemme

          Hi!

          If you have python and pyserial installed you can use pyserial to list the available ports.

          https://pythonhosted.org/pyserial/shortintro.html#testing-ports

          I think that COM# (COM5, for example) is correct though. The device manager in Windows is another bet.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            Lemme
            wrote on last edited by
            #6

            Hi again
            Thanks - I tried to clean up using a YAML translator, and using Notepad2.
            I forgot to set the baudrate to 115200 in Windows, changed that, but still no luck.

            I give up, and continue with Domoticz.

            Thanks for helping.

            martinhjelmareM 1 Reply Last reply
            0
            • L Lemme

              Hi again
              Thanks - I tried to clean up using a YAML translator, and using Notepad2.
              I forgot to set the baudrate to 115200 in Windows, changed that, but still no luck.

              I give up, and continue with Domoticz.

              Thanks for helping.

              martinhjelmareM Offline
              martinhjelmareM Offline
              martinhjelmare
              Plugin Developer
              wrote on last edited by
              #7

              @Lemme

              No problem.

              An advice on the way, would be to look at the log output and activate debug mode wherever possible when troubleshooting. A log and as much background info as possible will also give those you ask for help a better chance of helping you solve the problem.

              1 Reply Last reply
              0
              • Lee GroomL Offline
                Lee GroomL Offline
                Lee Groom
                wrote on last edited by
                #8

                I am using mysensors/home assistant on windows.....its working fine....here is my conf...

                mysensors:
                gateways:
                - port: 'COM4'
                baud_rate: 115200
                debug: true
                version: '1.5'
                optimistic: 'true'

                Hope this helps...
                Lee

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  Gefkuz
                  wrote on last edited by
                  #9

                  Hi,

                  sorry to reply to this old topic, but I have the same problem.

                  my config yaml :

                  mysensors:
                  gateways:

                  • device: 'COM5'
                    baud_rate: 115200
                    debug: true
                    version: '1.5'
                    optimistic: 'true'

                  debug lines on python repeating this :

                  INFO:mysensors.mysensors:Trying to connect to COM5
                  INFO:mysensors.mysensors:COM5 is open...
                  INFO:mysensors.mysensors:Connected to COM5
                  ERROR:mysensors.mysensors:Serial exception
                  Traceback (most recent call last):
                  File "C:\Users\Fabien\AppData\Roaming.homeassistant\deps\mysensors\mysensors.
                  py", line 380, in run
                  line = self.serial.readline()
                  File "C:\Users\Fabien\AppData\Roaming.homeassistant\deps\serial\serialwin32.p
                  y", line 236, in read
                  raise SerialException("ReadFile failed (%s)" % ctypes.WinError())
                  serial.serialutil.SerialException: ReadFile failed ([WinError 6] Descripteur non
                  valide)
                  Traceback (most recent call last):
                  File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\runpy.py", li
                  ne 184, in run_module_as_main
                  "main", mod_spec)
                  File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\runpy.py", li
                  ne 85, in run_code
                  exec(code, run_globals)
                  File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\site-packages
                  \homeassistant_main
                  .py", line 335, in <module>
                  sys.exit(main())
                  File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\site-packages
                  \homeassistant_main
                  .py", line 327, in main
                  exit_code = setup_and_run_hass(config_dir, args)
                  File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\site-packages
                  \homeassistant_main_.py", line 225, in setup_and_run_hass
                  subprocess.check_call(args)
                  File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\subprocess.py
                  ", line 576, in check_call
                  retcode = call(*popenargs, **kwargs)
                  File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\subprocess.py
                  ", line 559, in call
                  return p.wait(timeout=timeout)
                  File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\subprocess.py
                  ", line 1275, in wait
                  timeout_millis)

                  Some one have an idea?

                  martinhjelmareM 1 Reply Last reply
                  0
                  • G Gefkuz

                    Hi,

                    sorry to reply to this old topic, but I have the same problem.

                    my config yaml :

                    mysensors:
                    gateways:

                    • device: 'COM5'
                      baud_rate: 115200
                      debug: true
                      version: '1.5'
                      optimistic: 'true'

                    debug lines on python repeating this :

                    INFO:mysensors.mysensors:Trying to connect to COM5
                    INFO:mysensors.mysensors:COM5 is open...
                    INFO:mysensors.mysensors:Connected to COM5
                    ERROR:mysensors.mysensors:Serial exception
                    Traceback (most recent call last):
                    File "C:\Users\Fabien\AppData\Roaming.homeassistant\deps\mysensors\mysensors.
                    py", line 380, in run
                    line = self.serial.readline()
                    File "C:\Users\Fabien\AppData\Roaming.homeassistant\deps\serial\serialwin32.p
                    y", line 236, in read
                    raise SerialException("ReadFile failed (%s)" % ctypes.WinError())
                    serial.serialutil.SerialException: ReadFile failed ([WinError 6] Descripteur non
                    valide)
                    Traceback (most recent call last):
                    File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\runpy.py", li
                    ne 184, in run_module_as_main
                    "main", mod_spec)
                    File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\runpy.py", li
                    ne 85, in run_code
                    exec(code, run_globals)
                    File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\site-packages
                    \homeassistant_main
                    .py", line 335, in <module>
                    sys.exit(main())
                    File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\site-packages
                    \homeassistant_main
                    .py", line 327, in main
                    exit_code = setup_and_run_hass(config_dir, args)
                    File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\site-packages
                    \homeassistant_main_.py", line 225, in setup_and_run_hass
                    subprocess.check_call(args)
                    File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\subprocess.py
                    ", line 576, in check_call
                    retcode = call(*popenargs, **kwargs)
                    File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\subprocess.py
                    ", line 559, in call
                    return p.wait(timeout=timeout)
                    File "C:\Users\Fabien\AppData\Local\Programs\Python\Python35\lib\subprocess.py
                    ", line 1275, in wait
                    timeout_millis)

                    Some one have an idea?

                    martinhjelmareM Offline
                    martinhjelmareM Offline
                    martinhjelmare
                    Plugin Developer
                    wrote on last edited by martinhjelmare
                    #10

                    @Gefkuz

                    This looks like a problem with pyserial and not with your configuration. User bazis posted a similar problem in the middle of this thread:
                    https://github.com/home-assistant/home-assistant/issues/868

                    It was solved by installing 32 bit version of python.

                    For the record, what version of pyserial are you using?

                    G 1 Reply Last reply
                    0
                    • martinhjelmareM martinhjelmare

                      @Gefkuz

                      This looks like a problem with pyserial and not with your configuration. User bazis posted a similar problem in the middle of this thread:
                      https://github.com/home-assistant/home-assistant/issues/868

                      It was solved by installing 32 bit version of python.

                      For the record, what version of pyserial are you using?

                      G Offline
                      G Offline
                      Gefkuz
                      wrote on last edited by
                      #11

                      @martinhjelmare Hi, with python 32bit, it's perfect. Thank you.

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      12

                      Online

                      12.0k

                      Users

                      11.2k

                      Topics

                      113.4k

                      Posts


                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular