Is it possible for a sketch to 'read' value from emoncms?

Evening. I'm fairly new to coding in this world. I'm wondering, can I get a sketch to read a value of an input or a feed from emoncms? I have been able to create code to post data to it, but I'd like to build something a bit more complex.

Based on a value in emoncms (set / calculated as a result of other inputs) being for example 1 or 0, I'd like to execute a different sub-routine in my sketch.

 

Does that make sense?

Robert Wall's picture

Re: Is it possible for a sketch to 'read' value from emoncms?

It makes sense, but I don't think it's practical. For a start, your emonTx cannot be battery powered, because what you're asking implies that it should be awake and listening all the time for the information to come from emonCMS; of failing that, you need to invent a protocol to request the data and then it switches over to receive the data.

But I'm still puzzled as to why you'd want to do different things at the point where you're collecting the data? The emonCMS must obviously be hosted locally, so why can't you process the data, that the emonTx sends, differently inside emonCMS?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.