Serial to Emoncms?

Is it possible to import data as it arrives from serial to Emoncms, and if so, how?

I have a thermistor sensor with a Ciseco XRF and a Raspberry Pi with a Ciseco slice of radio attached. I have used the Emoncms image for the Raspberry Pi and I can see the serial data coming into the Raspberry Pi from the XRF via the slice of radio using Minicom.

The data comes in the following format; "aAFTMPA20.27" the "a" indicates the start of the message,  "AF" is the XRF's ID, "TMPA" is the data type and the "20.27" is the temperature in °C.

My immediate goal is to be able to view a graph online of the temperature readings over time.

Thank you in advance,

David.

Jérôme's picture

Re: Serial to Emoncms?

You need to implement a software gateway that reads incoming serial data and generates the corresponding http requests to emoncms.

I'm working on a versatile gateway, designed to be extendable with such kind of feature. It may be a bit early, right now but I'll try to keep you posted.

In the meantime, your best choice is to adapt the python serial link :

https://github.com/openenergymonitor/EmoncmsPythonLink/blob/master/pylin...

The idea is to modify the csv string to put your info, extracted from the serial data. Should be easy.

Please come back in case of success or if you have more questions.

Comment viewing options

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