Hi there,
I have created my own device based on an RPI and runs in node.js on the local network. It is a scrolling led display sign:
Example of one of my signs
Currently I am using an mqtt npm library on the device to communicate with HA via nodeRed. I have flows setup such as when the lux sensor in the room detects high intensity light, increase the brightness of the sign, and send a string to the sign to scroll the message etc.
However I feel like this would be a case to write a custom component/intergration/device? Since I now have 2 of these devices and want to publish the project.
At what point does it make sense to create an actual device in HA with entities like brightness etc vs just continuing to do the communication via mqtt?
My understanding of writing an intergration is to abstract away the actual communication to the device from the user and just have ‘HA’ standard entities on the device such as brightness.
So then you can have 1 intergration (RPI LED sign) with many devices of same type (bedroom sign, kitchen sign, office sign) etc.
The program/software will be the same on each sign then the user changes config prams per device inside HA UI.
I’m new to HA but keen to get a device written for these LED signs.
Does it matter what language / communication method is used ‘under the hood’ of the intergration? I would like to write in node.js and still use mqtt vs python and rest API… which I gather form docs is the ‘standard’??
If someone can correct my terminology and maybe link to a basic example of an intergration that connects to local IOT devices via mqtt that would be great
Although using mqtt makes most sense for the type of communication, maybe it would require the user’s HA to be setup with a broker before being able to use my intergration, increased complexity? What is the best protocol to use between an intergration in HA and a RPI running node.js on the local lan?