Hi,
Is there anyone face the same issue as me for the serial sensor. I am using home assistant 0.91.3 running at Raspberry Pi 3B+ as homeassistant user.
I have arduino uno set up, and above to transmit json data to serial port.
From Pi, i can read serial port data by command: # picocom -b 9600 /dev/ttyUSB0
I tried configuration
sensor:
platform: serial
serial_port: ‘/dev/ttyUSB0’
name: ‘USBserial’
baudrate: 9600
also tried
sensor:
platform: serial
serial_port: ‘/dev/ttyUSB0’
both way, I can get the Serial Sensor entity, but it always showns as unknown, and is not reading data from serial.
Is there anybody have a similar issue, and how is it resolved?
Thanks,
Nanguo Xuecheng
123
(Taras)
May 4, 2019, 5:06pm
2
Someone else had a similar problem and it was due to the received data missing a newline character (\n
) at the end of each transmitted string. Check the arduino’s code to confirm the data is terminated by a newline.
Hello,
I’m trying to setup serial sensor based on HASS documentation:
So… I wrote sketch on my arduino delivering json results (according to documentation on “sensor.serial”)
local picocom returning following results:
$ picocom -b 115200 /dev/ttyUSB0
...
{"channel_1":1,"temperature_1":15.6,"humidity_1":50,"battery_1":90}
I setup serial sensor on… hass side:
sensor:
- platform: serial
baudrate: 115200
serial_port: /dev/ttyUSB0
It looks like that hass launching serial sensor co…
Hi,
Thanks for response. But in my arduino code, the new line char is there. Otherwise, the picocom receiving data cannot be shown in lines.
mishaVee
(michael)
March 13, 2020, 7:26am
4
@nanguoxuecheng Did you ever find a fix for this?
1 Like