Serial date not importing into binary sensors… please help


I am trying to use an arduino mega as digital I/O pins using serial directly plugged into my HA Green. I followed what I thought were decent examples, but I am not getting anything read in.

Here is the configuration file. I initialized the serial port here, because it did would not compile when in the binary_sensors.YAML file.

With a binary_sensor defined in a separate YAML file.

(I cannot imbed second image due to being new here…will try in second post)

The unique id’s are junk and these are just examples.

The arduino code spits out


And repeats

Any help would be greatly appreciated.

Where to start?

Serial doesn’t seem to provide a binary_sensor. Serial - Home Assistant

Thanks for the Reply!

I was wondering about that.

Is there a way to import the float data, makes sure I am sending only 1.00 and 0.00, then convert the numbers in YAML to Boolean, then assign them to binary sensors?

This is for an alarmo system and I prefer not to have networking required (more power and complexity for an alarm application).

My fall back plan is Ethernet with MQTT. I am pretty sure my examples for that will work.

What does the sensor show?

It says “Unavailable”

I am not sure what that means……

Ok, since I have a HA Green, I have read that the HA install is in a Docker container and does not have access to the serial ports directly, so I cannot do the serial read functions without hacking the install.

I think my fall back plan will be to do wired Ethernet with MQTT using discovery to create my sensors.

Thanks for the help and advice!

Try esphome :slight_smile:

I think I will try this next:

I already have the hardware.