Send message to Emonhub

Can anyone help me on this?  

I would like to know how to send a simple message in byte format to emonhub and subsequently to a node through EmonPi.

I can send a simple message with an integer with this format from command line:  
wget --delete-after http://emoncmsaddress/nodes/10/tx/values?apikey=XXXXXXXXXXXXXXXXXXX --post-data="65540"  
note that the tx section is set for node 10 for the above command to work, but I couldn't ever send more than one variable even configuring it in the nodes:
    [[[tx]]]
        names = O
        units = X
        scales = 1
        datacodes = L

But instead I would like to send a sequence of bytes (not always the same quantity) that would be sent to the serial port and received at the node like this:  
10,7,0,23,42,50,s
where 10 is the destination node and could be omitted if specified in other way like in the above link, the same would apply to the "s", but defining the "s" would also be good the send different types of messages.

And preferably through the GET method instead of POST so I could easily send it from the browser address.

Cheers.

CidiRome's picture

Re: Send message to Emonhub

Is this impossible?

Robert Wall's picture

Re: Send message to Emonhub

Paul (pb66) I think envisages something like this for setting calibration values, but that's a long way into the future. None of the standard emonTx sketches are able to receive data from anywhere, though there's no reason, other than power consumption, why this can't be done.

 

CidiRome's picture

Re: Send message to Emonhub

Thanks for the info.

I thought that I was doing it wrong, it seems to be such a strait forward thing that I didn't thought it wasn't implemented at all.

Maybe I will try to dive in the EmonHub source code and implement it if I'm able to, or at least try...

Cheers.

Comment viewing options

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