Improved support for customized homeduino sketches
Hi folks,
first of all thanks for this great pimatic framework and the homeduino plugin!
The thing is that although I try to dig into coffeescript and nodejs Î am not able to quickly add own functionality.
The homeduino sketch for arduino is quite easy to extend by adding a serial "identifier" for the new function and creating a function which will be called when the corresponding identifier is received over serial. The idea for the pimatic-homeduino plugin would be to add a device class where you can configure the serial identifier and it's parameters directly in the pimatic interface. This is already done in a quite comparable way for the mqtt plugin where you simply create the attributes list according to the data which will be received in a message from the device.
Difference is that mqtt will mostly receive JSON formatted messages while homduino splits the parameters with a space.
We would need two device classes:
- On / Off device (for example to add an IR blaster to the arduino) here we would need an on message string and an off message string e.g.: "irblast 16236607"
- Interval device (for example for i2c sensors) here we would need to configure the "requestor" string (e.g.: "bme280") and the attributes list which defines how to interpret the return values from homeduino. (e.g.: temperature -> datatype float -> unit °C; humidity -> datatype.....)
Do you think this would be a lot of work? This is of course no issue but it could push the homeduino-pimatic plugin from "super" to "awesome" :)
Best regards, Peter