Building a device with CoRe question


I’m working on a project putting together a simulated thermostat. Is it possible for me to just create the shell device type and have CoRE provide the functionality of each tile? I made a prototype but CoRe only sues the main device, not the individual tiles in the interface. So it doesn’t seem as though anything other than the basic on/off of the main device is possible. Is there something I’m not seeing or do I need to have a special setting in the creation of the DTH? Or is this just not possible? I tried in both the CoRe and WebCore apps. Forgive my ignorance, this is my first stab at building a project from scratch.

Thank you,

CoRE can do “anything” (ok, that’s an assumption, but I’d bet I’m not wrong)… There’s a word in computer science for that, and gosh darn if it’s not coming to me right now.

However, for something as specifically contained as a Virtual / Simulated Thermostat, it is worth considering more efficient custom code,… And it’s not particularly complex code relatively.

In fact, there are a few Virtual Thermostats developed by the Community which you can tailor as desired. Do some Forum searches?

Thanks for your reply. I literally have been searching for days. I wrote a whole thing about it in a post last night. and i was kind of at wits end. When I saw no replies, I started thinking and reading some more and that idea came to me. Perhaps I’m searching for the wrong thing. I’m usually pretty good at quickly finding solutions and answers but it’s possible that my question is flawed since I’ve not attempted a project on my own till now.

Since what I’m attempting only requires polling one temperature sensor and sending commands via URL, I don’t know if efficiency or lack thereof would make that huge a difference in this particular case. Please though, if you have any suggestions on where I can at least begin searching for a better idea or an answer to this one, it would really be a huge help because I’m really not sure.

A quick 3 minute search doesn’t yield a conclusive answer, but perhaps a good starting point(s):

This one involves NodeMCU ESP8266, which therefore likely uses a URL / REST-API

This one is a skeleton, but only turns on a Switch … so, you would either change the switch triggering code to call the URL endpoint, or use a Virtual Switch to http call SmartApp (there are a few of those!)

Another DTH skeleton… not sure if better or worse than the previous:

###My Recommendation?
Unless you are super tight on time and don’t want to make a “learning exercise” of this, then a Thermostat is not super difficult DTH to build from the right template.

  1. I’d recommend building a simple Virtual Switch DTH (with synchronizing SmartApp) first, as that basic practice is needed to understand the IDE, syntax, debugging.

  2. Make your Virtual Switch call a URL / REST-API for on() and off() commands. i.e., Study the simple http() commands, not the entire chapter on Web Services / Cloud Device Types:

  3. Then port your knowledge from 1 & 2 to the Thermostat template.

Are you thinking of Turing Complete?

That’s it! :bellhop:

I’m not sure whom a "quick “3 minute” search is quoting, nor how that might be inferred from “literally have been searching for days” but what I did mention was that I’d already started work on a DTH and was merely inquiring if perhaps what I was searching might be the problem. I do appreciate the links and I’ll take a look. I didn’t mean to put you out.

I’m sorry; That wasn’t my intended tone, Jerry… :sweat:

It’s my pleasure to try to offer folks a possible starting point, but I feel bad when I can’t find a conclusive answer during a quick response. So that’s why I prefixed my search results describing the limited time I had invested.

So… [quote=“jerrydiaz11, post:7, topic:86356”]
was merely inquiring if perhaps what I was searching might be the problem.

My intent was that by sharing my own search results it might indicate if we’re finding the same dead-ends or maybe I found something to help.

That’s all!

I’m sorry man. I misunderstood. At some point during this exercise my Simple Sync connection got disabled … since last night its Trigger smartapp is only pulling a completely blank interface and I’m pulling my hair out. I’m just frustrated and I took what you said the wrong way. My apologies. Thank you for real though.

1 Like