Windows and configuration.yaml
-
Hi
A am trying to configure Home Assistant on Windows, but it does not detect the GW. In configuration.yaml I have these lines:Example configuration.yaml entry
mysensors:
gateways:
- port: com5
version: '1.5'What have I done wrong? Has anybody a working example that they want to share?
Br
Flemming
-
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.
-
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
-
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.
-
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.
-
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.
-
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.
-
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
-
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?
- device: 'COM5'
-
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/868It was solved by installing 32 bit version of python.
For the record, what version of pyserial are you using?
-
@martinhjelmare Hi, with python 32bit, it's perfect. Thank you.
Suggested Topics
-
Hi,
Home Assistant • • diltech