Adding support for Seneye Aquarium & Pond Sensors (removing the need for a Seneye Web Server)

Yes can do, I am on a tablet at the moment, I will upload to NodeRed Flows Library so you can download it from there.

@Andy8912 Please see flow attached with a bit of a clearer write-up for anyone else wanting to integrate using NodeRED. Big thanks to @notovich for working this out for us.

https://flows.nodered.org/flow/c84c563ae1b73a0315bde0e9c6fd965a

Hi all, so I just spent many hours over the last several days working on this project with a combination of ChatGPT5 and Gemini 2.5 pro and I believe I have created a usable way to use the Seneye with Home assistant: GitHub - tamengual/seneye-mqtt-rpi: A C++ and Python bridge to publish Seneye aquarium data to MQTT for Home Assistant.

I left most of the actual code out of this post due to formatting issues, but you should be able to read the detailed readme file as well as the individual files for your raspberry pi in the github repository

This project provides a reliable, headless solution to read data from a Seneye SUD (Seneye USB Device) using a Raspberry Pi and publish it to an MQTT broker. It’s ideal for integrating your aquarium’s water parameters (Temperature, pH, NH₃) and light metrics (PAR, Lux, PUR) into home automation platforms like Home Assistant.

This guide uses a two-part system for maximum stability:

  1. A lightweight C++ Reader that communicates directly with the Seneye device and outputs clean JSON.
  2. A Python Bridge script that executes the C++ reader, formats the data, and handles publishing to MQTT with Home Assistant auto-discovery.

Hardware Requirements

  • A Raspberry Pi (This guide was developed on a Pi Zero 2 W, but any model should work).
  • A Seneye SUD (Home, Reef, etc.).
  • A quality power supply for the Raspberry Pi.
  • An SD card with Raspberry Pi OS.

Software Requirements

  • Raspberry Pi OS Lite (64-bit) is recommended.
  • An MQTT Broker (like Mosquitto) running on your network.
  • The following software packages: git, g++, libhidapi-dev, libjsoncpp-dev, and python3-paho-mqtt.

Setup Instructions

Step 1: Prepare the Raspberry Pi

  1. Flash Raspberry Pi OS to your SD card using the Raspberry Pi Imager. Use the “Lite” version as no desktop is needed.
  2. Enable SSH and configure your WiFi credentials in the imager settings before flashing.
  3. Boot the Pi, SSH into it, and perform an initial update and upgrade:Bashsudo apt update && sudo apt upgrade -y

Step 2: Install All Dependencies

Install all the necessary compilers, libraries, and Python packages with a single command:

Bashsudo apt install -y git g++ libhidapi-dev libjsoncpp-dev python3-paho-mqtt

Step 3: Create the C++ Reader

This C++ program is the core component that communicates with the Seneye device. It has been specifically written to be non-interactive and reliable for automation.

(see GitHub for these directions)

Step 4: Configure USB Permissions (udev Rule)

This step ensures that the system can always access the USB device, even if the user isn’t root.

  1. Create a new udev rule file:Bashsudo nano /etc/udev/rules.d/99-seneye.rules
  2. Paste the following line into the file. This rule identifies the Seneye device by its unique vendor and product ID.SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2507", ATTRS{idProduct}=="2204", MODE="0666"
  3. Save and exit.
  4. Apply the new rule and reload the system:Bashsudo udevadm control --reload-rules && sudo udevadm triggerIt’s a good idea to unplug and replug the Seneye device after this step.

Step 5: Create the Python MQTT Bridge

This Python script runs the C++ program, gets the JSON data, and publishes it to your MQTT broker. It also handles creating the sensors automatically in Home Assistant.

  1. Create a new directory and the Python script file:Bashmkdir ~/Seneye-Bridge cd ~/Seneye-Bridge nano seneye_bridge.py
  2. Paste the entire Python code block below into the seneye_bridge.py file. Remember to edit the MQTT configuration section with your own details.

Step 6: Automate with systemd :rocket:

This final step creates a service that will automatically run your Python script on boot and restart it if it ever fails.

Your setup is now complete! The service will run in the background, publishing data every minute. Your sensors should appear automatically in Home Assistant under the MQTT integration.

1 Like

So while that did work for a bit I ended up finding that the sensors would drift significantly. I ended up going for a different and much cleaner solution. I switching the raspberry pi to being a USBIP, connected that to home assistant through the USBIP custom Add on then created a custom integration to read the sensors. Now it shows up with sensors accurately and updates every couple of minutes. Here is the link to the newly updated integration:

What caused the drift? Past 30days on the slide?

I just got a Seneye with the Seneye Web Server (SWS). Is there any way to use the ‘Local Data Exchange’ function of the SWS to pull the data into home assistant? So far it looks like this thread has been about connecting the Seneye device to the home assistant host directly by USB. Is there any way to just pull the data into home assistant that is being sent out from the SWS?

This is the documentation for LDE - GitHub - seneye/LDE: Seneye Local Data Exchange

It looks to me like it should be possible for me to enable the LDE on my SWS and the information should be available for home assistant to pickup and use, I think by MQTT, I just have no idea how to implement something like that myself.