Old construction business and new technologies, or the story of a startup





Introduction



I greet everyone, my name is Kirill, I am a product manager or engineer, organizer or foreman and techie, or perhaps neither one nor the other, I honestly don't know who I am by profession, but in a relatively short period I managed to create a team development, installers, designers, which in turn managed to implement a huge product in the IoT field. In this article I would like to share with you what mistakes we made in product development and mistakes in the legal and contractual areas of product development.



So, it all started from the moment when I left the position of an engineer for the design of elevator equipment, and with the education of a mechanical engineering technologist, I got a job in one large construction company in the city, as an administrator of systems for automated collection of meter readings and control of the supply of heat carrier to apartments, such as Smart home in an apartment building. At that time, the developer had the following requirements:



  • Accounting for all apartment devices
  • Controlling the supply of the thermal medium according to the thermostat principle
  • Consumption analytics
  • Alarms and warnings
  • Interface for the management company with all objects
  • Resident interface


Houses were built large, 20-25 stories high, with an average of 280-300 apartments per section. At that time, the developer had about 10 such houses.



Having started work, the first thing I did was to figure out how the two systems already implemented at the customer's construction sites work. These were two completely different systems: from the transmission protocols between the server and the field equipment (some have CAN-bus, the second have Modbus RTU and TCP), to the application architecture itself (some have self-written software rolled out in the cloud, the second have SCADA for each object with local computers).



But one thing these guys had in common, they were both manufacturers of their own equipment (blocks, controllers, gateways), which they sold at unrealistically high prices, their equipment lacked any certificates, those. documentation, and there was no possibility of interchangeability. Thus, when the device failed, and this happened very often, we had to buy equipment from them at an inflated price. And a couple more unpleasant moments in working with these comrades.



Upgrading the application in terms of functionality was impossible, not because the price was very high, but because they could not / wanted / knew how to calculate the cost of the revision, and they did not need it. They had a business built to maintain and replace their devices.

We pay for software all the time, but what software? License, software purchase under a contract, software development? The answer to all questions is the same - "Our software, write letters."



Actually, all of the above factors led to the fact that I suggested assembling a team of developers and cutting something similar ourselves, but using factory-made equipment available on the market of the country and Europe.



First decisions and agreements



And so I came to negotiate with my management - director # 1. He offered to put together a team for the development of a full cycle product development - design - installation - start-up - operation. To begin with, we agreed on the fact that we will outsource one back-end developer - Lechu, and we will outsource a team of web developers and designers. The costs for me and Lyokha were so small that it's a shame even to think about it, but I took a chance for five reasons:



  1. , , , .
  2. ! .
  3. .
  4. , .
  5. , .


MVP



To celebrate, we buy the first Siemens Modicon MT221 controller with ModBus TCP on board, for four days we wrote a program on it in the Ladder Diagram language, in which, when the contacts are closed, the register changes from 0 to 1, we tested it using the Modbus Poll program (roughly speaking, Modbus TCP client ), and here Leha says:

“At the department we were taught that such tasks are solved using SCADA systems”

To which I answered:

“Leha, you had to fight evil, not join it.”

We decided to do this - Lech is trying to find the SCADA and retrieve data from the controller and store it somewhere, and I will try to write a program in Java, I was just taking Java Elementary courses at that moment (my teacher from the courses knew that I would try code ...).



And as a result, Lech received data from the controller via ModBus TCP first, but folded his computer with a blue screen because of 4-6 SCADs on his computer. And with the help of Java and 5 lines of code, I pulled out the data, Lesha liked it and he plunged into the world of Java and I can proudly say that he became a very good specialist.



As I remember now, on March 10, 2018, we started the first project. We had 6 months to write a program, create a design, release design documentation, install and start up.



I completely went into design, selection of equipment and network topology, installation and design (I myself did the first project in the AutoCAD, and at the first time I pulled wires at the facility), and Lech took on everything related to the server, back and DB.



Many did not believe in our success and did not set us specific tasks, it sounded something like this:



  • pull the data out of the counters
  • display somewhere


We initially had some vision of how this should work. Outlined our minimum requirements for what we want to achieve:



  • we have to collect readings from heat meters, cold and hot water meters, electric meters
  • receive data from all temperature sensors located in apartments
  • control the temperature in the apartment using this sensor and the settings that the tenant will set
  • the tenant must have his own personal account, in which the tenant user will receive data on his apartments: graphs of readings, feedback from the management company, temperature control
  • administrators must have a web application with all system data, alarms, users and analytics


Within 1 month, we tried all the ready-made solutions that we found in 20 pages of Google search. Each solution had 1 or more of the following problems:



  • no split authentication
  • there is no way to create a secure API for the collected data
  • design from the 90s
  • poor performance
  • low level of customization of backend logic
  • unacceptable pricing for the solution of the selected task


My gut told us that if we used one of these systems, we would be no better than our competitors. Which led us down a different path, a beautiful path. We took the path of writing our system and product in the best language in the world, Java or EasyModbus. And when we slightly modified the code and forced the console to report a button press to our joy, then there was simply no limit. On the way home, we could not calm down and discussed how many opportunities it could give us! We will create our own SCADA with a beautiful web application and smart home. That evening, we drew ourselves plans for the year ahead. But everything was still ahead ...



We started small, and a month later we had the temperature controller software written in FBD ready. Our backend stack was Java 8 + MySQL. Soon, classes were ready to work with our freely programmable controllers. A month later, we successfully tested a bunch of our backend and a gateway that interrogated heat meters using the M-BUS protocol. Learned how to work with MySQL. We began to write all the received data into the database. To read readings from electricity meters via the RS-485 interface (PLC did not suit us), we made a reverse engineering protocol from the initial data from the USB port monitor.



Our programming experience at that time was a couple of months, looking at it now - blood is coming from our eyes. BUT this shit code worked - it's a miracle. We are very motivated guys and strive for knowledge with terrible force. We were very lucky and all the difficulties appeared gradually: the first problems with multithreading and the database - and we discovered c3p0 for ourselves, a huge amount of dependency - we learned how to work with maven, performance problems when reading from the database - and we did not know that such indexes, every bit of information received was applied in the project.



In order to show the authorities the seriousness of our intentions, we put together a stand that demonstrated the work of our system throughout the house. We had 20 temperature controllers, 150 temperature sensors, 60 heat meters (as much as we could get), 2 MBus gateways, a router and 16 routers. We only crimped the FTP cable for 2 days. As a result, the stand is assembled, the software is configured, the mock of the web interface is launched - the director is coming to watch the work.





First stand



Everything whistles, reels click, works out everything instantly, logs run, data from devices is collected correctly. We took designer Vova, system administrator Yura and 3 installers into our team. The development, design and installation process took place in parallel. While the guys were chasing the walls and laying the cables, the designer made them projects and connection diagrams, while the boards were being installed, and we tested new features on them, while the software was being developed - the server rack was being assembled.



As a result, it took us half a year for 144 apartments to be integrated into the system and the first users to whom we personally handed registration QR codes. But we did not want to stop there, our final task was to create an IoT platform sharpened for BMS, and later it will expand to the integration of technical objects (boilers, heating points, backsides and industries) and smart houses.



We spent the next year refactoring our MVP and adding various features. This time we had a plan, architecture, even greater ambitions and fresh blood - we hired 2 students. The first student, Yarik, worked on the backend of our product, and the second, Sashka, worked on Arduino and other single-board computers for a smart home.



We actively flew the UD and BMS market: we talked with potential customers, went to exhibitions, compared ourselves with competitors. At some point, we realized that what we have created is a phenomenon for the Ukrainian market, and none of the potential competitors can do anything similar that we can offer. We have a scalable and customizable BMS system, with a powerful alarm acknowledgment and administration system, with API, with drivers for the most popular metering devices in Ukraine, we can adapt to any customer. We wanted to break out of our company and go on our own.



First success and immediately a pan in the face



So, in the first couples of success, we are already implementing 3 objects (at the moment there are 2 boiler houses, 4 heating points, 4452 units of various metering devices, data from 1164 apartments), everything is fine, applications are not lying around, the equipment behaves very well, installation at a height everything is cool, I and the team are waiting for prizes and bonuses ... but instead, just “Egegey guys, great fellows, THANKS!”.







Then the following began: there is no money, it does not finance, but the product needs to be continued, it is necessary to develop branding, instructions, etc. ... To be honest, we were overwhelmed by the success (and for us it was a wow success, the guys a mechanical engineer and a machine gunner by education implemented a rather big system) , we continued, went on strike, whined, but continued to cut…. At the same time, they constantly optimized the system for hardware, sought discounts, and optimized topologies to reduce costs.



As a result, director # 1 leaves the developer's company, I leave with the team too, our product remains at the old sites, there are no new sites, but where to go? What to do? We got so caught up in the development routine that I missed the moment of the right margin (who owns what, whose software, what rights to use the software), promotion and other moments so necessary for the successful existence of the product. I drop all the moments associated with development and throw myself into market research, trying to find customers, and I understand that our product is very specific for developers, not everyone needs it - all developers have one slogan, built for less money - got more money.



Then my director appears, and offers to create a company whose founders will be he and his partner, but at the same time, supposedly my team and I are in his half of the company (50%), according to the agreements WE (he, I and the team) will decide everything that concerns further development of the product, to accept how and where to move (well, between us girls, nowhere does it appear in the papers). I agree in despair, I say to the team, guys, we found an investor, blah blah, but we are not among the founders, and at first we get tiny salaries (well, like a startup, as they told me), we reduce costs as much as possible (well, a startup that has lasted two years, nothing so-so startup). The guys from the team said: “Maybe it’s not necessary, it all smells strange.”, But I am burning (I have debts on the salary fund, a second child and other expenses), I understand that I must continue at any cost.



I meet with the director number 2, and I understand that something is not right, how could it be different. A couple of meetings and I realized that director # 2 in the 90s was a programmer in the army and really wanted to be realized in this area, he starts to draw us diagrams with the dispatcher's place, with the 1C server, throw nice words, insert the word API everywhere, order “So necessary at this moment” branding and brand beeches.



The whole month we were financed by director # 1, many thanks to him, and with director # 2 there was a market, supposedly he had a hot customer who is ready to start working.



We held out like this for a month, or rather, I held out. Only I communicated with directors No. 1,2, because my goal was to protect my team from their constant meetings, constant attempts to throw some tasks and other bureaucracy. I've always heard from director # 2: “What are you doing? What are you doing? ”, We answered:“ we saw the domain model, test LoRa Wan, investigate the market in terms of opinion leaders and the product sales channel, design dashboards for accidents and warnings ”, no constructive questions were received in response. Eternal distrust and discomfort, how can you continue to create a cool product.



Actually, no customer did not appear, and at one of the meetings director # 2 told me: “Kirill, I don’t care how much you move this project, you will do what, then two directors will tell you,” I got up and answered: “Gentlemen, good luck ”shook hands with them and left.



Feelings and balance



Many people know that feeling when you do a job, give yourself to it to the maximum, put a part of yourself into it and do not get the proper return, although it was, but simply hid from me and the guys. You continue to do this work, although you understand that you do not receive money for it at all, but you cannot quit because quitting is the same as taking and leaving for another country from friends and family, taking and tearing yourself away from a part of something big , significant. We didn’t quit, we started to burn, we began to understand that it couldn’t continue this way anymore. This is very painful.



I am grateful to Director # 1 for all his shortcomings and advantages, he believed in us and supported us, I will remember this and will always support him too. Over the years, my team and I have become really close people to each other and I cannot express it in words, I just understand that if we have to break up, then I will miss them and those times with all my heart.



Conclusions and advice



The conclusions I made:



  • Not knowing the ford do not go into the water, especially when the question is monetary. Check everything, count, calculate the cash - flow, do not be mistaken in the amount of work and, most importantly, in the technology and expediency of its application. No matter how strange it is to talk to the team, and do not forget about the strategy, let it be raw, not voluminous, but it is needed.
  • , . , . , , , .
  • . .
  • , . , .
  • , , , , , , .
  • , , , . 90% .
  • , №1 2, , , . , , , , 5 , . , , ( , ). — .
  • .




Now we are sawing a new platform, expanding the functionality (adding "homecracy" and services for residents, analytics tools and a more sophisticated management interface and boiler room), adding new metering devices and devices.



In parallel, we are looking for a customer and investors. Difficult, a lot of work, but no resources. We will launch the site one of these days.



Peace and success to all!



Continuation of the series of articles:

"Smart home" in each apartment of an apartment building, or our MVP



All Articles