New hardware connection
Posted: Fri Oct 30, 2020 7:07 pm
Hi,
I'm running all the basic stuff - RPi with dockered cloud, Arduino with LED output and an app controlling the LED. is there somewhere a brief overview of what should I do to smoothly use Supla at my own hardware design?
My device will measure the water flow in the pipe with connection to controlling some GPIOs and display some stuff. So from a design point of view - 2-3 analog signals with "continuous" measurement, 5 GPIOs and exchanging String for the display.
If I understood correctly it should go like this:
Hardware: In case I will have to create a new class, it has to inherit the Element. Then I will create instances of all usable devices in my main method like: new Supla::Sensor::DS18B20 or new My::OutdoorDisplay.
App: Here I should create new layout for my device inheriting DetailLayout and new xml layout description. I saw some constants fetched from SuplaConst and I think that it is somehow important. I think that I have to somehow register new kind of device that the cloud understands it's not a simple thermometer.
Cloud: I'm running the cloud at my RPi from docker but I don't have any idea how to tell the cloud that I have a device with those specific inputs and be able to connect my phone with a device thru this cloud layer.
Can someone please point me to some kind of tutorial where I can read more about implementing such a device? Or can you please point me to the methods or classes which are important to notice? Otherwise it's several thousand lines of code which are difficult to go thru.
Thank you very much,
Martin
I'm running all the basic stuff - RPi with dockered cloud, Arduino with LED output and an app controlling the LED. is there somewhere a brief overview of what should I do to smoothly use Supla at my own hardware design?
My device will measure the water flow in the pipe with connection to controlling some GPIOs and display some stuff. So from a design point of view - 2-3 analog signals with "continuous" measurement, 5 GPIOs and exchanging String for the display.
If I understood correctly it should go like this:
Hardware: In case I will have to create a new class, it has to inherit the Element. Then I will create instances of all usable devices in my main method like: new Supla::Sensor::DS18B20 or new My::OutdoorDisplay.
App: Here I should create new layout for my device inheriting DetailLayout and new xml layout description. I saw some constants fetched from SuplaConst and I think that it is somehow important. I think that I have to somehow register new kind of device that the cloud understands it's not a simple thermometer.
Cloud: I'm running the cloud at my RPi from docker but I don't have any idea how to tell the cloud that I have a device with those specific inputs and be able to connect my phone with a device thru this cloud layer.
Can someone please point me to some kind of tutorial where I can read more about implementing such a device? Or can you please point me to the methods or classes which are important to notice? Otherwise it's several thousand lines of code which are difficult to go thru.
Thank you very much,
Martin