NodeJS business logic - smart thermostat

I want to basically create a thermostat app for my home so that when it gets hot inside and if it is cooler outside then I will cycle the fans until temperature equalizes or becomes acceptably colder. But I’m not sure how to do this. I know basics of NodeJS and Express, but I’m mainly a front end guy and trying to learn more backend technologies.

Can anyone point me to an article that could be helpful or some sample code? I’m able to use Postman to actuate things, but I guess my problem is NodeJS and implementing the business logic.

Hello @Elsewhere

What devices are you going to use? note that all this technology is based on using cheap microcontrollers that works with C++ source code. But the project you are talking about appears very easy to make, so I recommend you reading the documentation and using the example codes sure that you can make it.

Best!

Thanks! The C++ and using thinger.io is easy stuff. I only really code simple c++ and am decent with Node, but cant figure out basics of how to implement an https request in node on my own server to thinger.io cloud for temps, then use a callback function that turns on fan if temps are too high.

Answered follow up questions but no response

Hi @Elsewhere

Honestly Im not sure how do you want to do the temperature control, you can communicate a microcontroller directly to thinger cloud, and in the microcontroller define the control logic (if temp1 is XX Celsius or Fahrenheit over temp2 do something), and report the status to thinger cloud every 10 mins for example, without NodeJS.

And of course you can estblish control set points across thinger platform, if you want to change the values.

Hope this helps

It does help that it’s possible. I want my app to be able to control the set points though, sending message through thinger.io’s RESTapi to change that temp1 XX set point.

Oh I see, sorry but I can’t help you, I’m more electronic guy than programmer guy, but I guess that I’ve seen some about it at documentation or in another topic.

Good luck.