Home made hardware sensors and actuators

Hi, From more 10 year I have a home domotic system composed from:

  1. RPI - where I develop a GUI(java) , a back end (php) and madiaDB for store data af sensor and actuators.
  2. I home made the PCB Sensors and Actuators connect RPI with the serial line 3 wire (power + data)
    I ask you if is there a add-on or other way for use HA as GUI and show my actuators and sensors.
    I would like read data from madiaDB of actuators and sensor and show door open/closed, windows, open/closed thermostat value and relative set for change the state.
  3. is there a add-on where I can read and write data in my mariaDB?
  4. is ther a add-on where I can send a call MQTT or other for read or write data in my maria ìdb?
  5. other idea?
    many thanks in advance
    Guido

I am still learning, but you came to the right place. Home Assitant is the 800 Lb. Gorilla in the rooom for every conversation about home automation. It can do anything and everything for everyone, and s it is open source, if it doesn’t do something you can add that capability. The development community is amazingly busy with constant updates. I believe the answer is easily yes to yourr questions. Do you have HA installed? First thing to do is to take those requirements and decide what flavor would best suit you:

I used HA Supervised in an 8G RPI4 but I may upgrade the hardware before I add video - hope the above helps

What you may have to do is try SQL integration, you’ll have obviously to write all the query (select, update) but I think it’s doable.

Ciao

Thanks at all,
Can Someone tell me a link with a lineguide for SQL integration? or example of show sensor whit read data from external maiaDB…
Bye

Start here

As far as I can see it seems it only supports select (create a sensor, then read something from db and then set the state based on returns).

From my very superficial search it’s not possible to do the contrary ( set db field value via insert/update on the db after a state change in HA) but I may be in error or it may be possible via automation…

If you want more flexibility than the built-in SQL integration, you can also write an integration that exposes any sensor you want based on results from SQL queries periodically issued to your MariaDB database.

Writing custom integrations (the thing that lets you create arbitrary devices and sensors of those devices):

Later you can migrate the circuits themselves to use ESPHome and stop relying on the Raspberry Pi.

Hello, This working fine buuut, working only in read “SELECT”. this is perferct but isn’t possible to write in the external database with query “UPDATE”.
Other question, I Can create thermostat or other device with SQL integration or only the sensor device?
many thanks

This I like more…
I need to dig deeper , but in the web I not found any integration example to follow this path… link or tutorial are welcome hahaha
Thanks