Hi all, I wanted to share my recent success in integrating analog sensors into my Home Assistant setup. I’ve been working on this project for a while now, and it’s finally coming together beautifully. Let me walk you through my journey and some tips I’ve picked up along the way.First, I started with a TCP/IP analog data acquisition board with 8 analog inputs. It’s a 4ma - 20ma current loop type, which I connect and request sensor readings using Hercules SETUP Utility with hex send and receive. The challenge was converting the hexadecimal data into meaningful values for temperature or current. After some research and experimentation, I figured out how to decode the hex values into integers and then convert them into actual measurements.For example, channel 1 gave me a hex value of 0xfab, which converts to 3979 μA or 3.979 mA. Similarly, channel 2 showed 10714 μA or 10.712 mA. The board’s analog ports input current range is 4ma - 20ma, so I needed to ensure accurate conversions. I used the formula provided in the guide: collected AD value has been converted by the module, and the unit is μA. Dividing by 1000 gives the current in mA.I plan on using ACS712 current sensors on 5 of the ports and NTC 10K thermistors on the remaining three. Here’s the sequence I followed based on my limited knowledge:- Send a request to the TCP/IP server:port to retrieve the hexadecimal data.- Receive the hexadecimal data and convert it to an integer.- Convert the integer to temperature or current depending on the sensor type.- Send the converted data to the HA sensors (sensor.1xx, sensor.2xx… sensor.8xx).- Set up further automation as needed.One of the hurdles I faced was figuring out the best way to handle the conversion within Home Assistant. I thought about using templates, but I wasn’t sure if one template could handle all the channels. After some digging, I found that using a custom script with Python was the most efficient way to process and send the data to HA.I also learned the importance of accuracy. The collected current value error of this module is ±0.002ma, so ensuring precise conversions was crucial for reliable data in my smart home setup.This project has been a fantastic learning experience, and I’m thrilled with how everything is working now. If anyone has questions or needs advice, feel free to reach out! Happy tinkering! ![]()