Config-Noob needs pointers

Moin,
I am lost between unfamiliar terminology and concepts that feel alien to me.
And the Docs are a bit - äh - sparse and terse.

I need a pointer to a step-by-step tutorial how to add a new device to homeassistant.

The device in question is currently a concept I have a simulation of.
It exposes a REsTful API to get and set values.
Lets for the sake of discussion pretend this to be a light: analog values with ranges (such as brightness in permille, color temperature on a limited-range Kelvin scale).

So I gather, I need a device in Homeassistant.
This device then needs to have sensor entities (to get the current values) and some other type of entity to set values?

I also seem to need scripts to be called for get and set operations.
These could be shell scripts using curl for the https layer.
I would prefer pythons requests module, but I will do with whatever works for now.

I run Homeassistant in a VM created by a helper script

I also tried to install the software on a Debian machine, but when I tried to configure anything there, all instructions were pointing to features unavailable in that edition.

In an earlier iteration of my question, I was pointed to a Template Light.
Just loading this template into the template editor in the “Entwicklerwerkzeuge” section of the Web Gui throws errors.
For me, the documentaitn does not tie the dicerse concepts together: what does the Jinja-template represent? A Gui tile?
How does it link to the entities of a device?

Is there a tutorial out there, showing how to add the yaml-config toaccess an (so far) unsupported device?

I am a bit familiar with python (10 years developing), Jinja2 (well, beginner level, I usually use cherrypy and hardcoded html), C, html and such (68k, AVR and Arm-Thumb Assembler, realtime programming, microcontrollers, electronics, pcb design and -manufacturing; take a guess at my profession…)

Homeassistant concepts are documented, but I can not see the data flow in the system etc.
And having a locked-down installation without shell access does not help.

merci
hase

1 Like

That’s cryptic. What is the device?

Is this device supported by an existing integration?

If not, then you can use the RESTful Sensor integration to create sensor entities that communicate with the device via its API.

I am currently developing the device. At the moment there is more a concept and I want to see how it would integrate into existing home automation systems.
Since I am using Homeassistant to some extent in my own home, it seemed like a good starting point.

I tried out the Rest integration: no dice, it only supports sensors.
i also need to set values.
Everything seems so - well - undocumented. There is shards of information, but I am an engineer, not an archeologist or paleontologist; those are fond of puzzles.
I am more a datasheet-reading kind of person.

Since I am still developing my device, I am still free to choose the integration path.
MQTT looked like a way, but setting that up with TLS client authentication is such a hassle (and afaik not supported in Homeassistant).
So I chose ReST as that is used everywhere nowadays.

I am still looking for documentation that ties together the concepts and the data-flow beween sensors, actors, UI representation and communication paths.

Any hints where to find an overarching documentations?

MQTT is the way forward if there is a device type that represents the hypothetical device.
TLS is definitely supported, because I am running Home Assistant on Proxmox using the exact same method of installation, and I have an LXC on proxmox that is the Mosquitto MQTT server - again using the tteck proxmox scripts to install it. It works perfectly fine with security turned on.

The device I am fiddling with is a class that is not represented.
Maybe that is my general problem here.

I may check out the MQTT route, despite all its drawbacks (TCP is hell in the type of networks I usually deal with; no timing control…)

Skimming through the docs, I found the python_scripts integration.
And a pointer to “services” again, and again I am lost in the sea of concepts.

Still looking for an overarching doc to teach me how devices, entities, services, helpers, state objects and events tie together…

1 Like

You are probably going to want to read up on the architecture then.