Configuring Raspberry Pi to send data to my system database

Greeting,
I am a computer science student. 

I am writing this topic seeking your help and knowldge.
Me and my team are using EmonTx V3 for our senior project that is Wireless electricity consumption monitoring system. As we have limited knowledge in hardware, we purchased the fully assembled version with Raspberry Pi fully assembled as well.

Our project idea is centralized on providing a web-based system to an end user. We are working in designing and developing our own website and database that needs the data read by the EmonTx and forwarded using the Raspberry Pi.

I tried so hard to find and understand how to configure the Raspberry Pi to send the data directly to our MySQL database? I also did not find in what format the data will be sent?
We do not want to use emonCMS website. We want all the data to be stored in our own database. How can we do that??

I hope you help me and I will really appreciate that.
Can’t wait to read form you.
Regards,
 

TrystanLea's picture

Re: Configuring Raspberry Pi to send data to my system database

Hello kh_saf. There could be multiple ways of doing this:

- Write a script to read from the rfmpi serial port, decode the rfm byte value string and then insert in your mysql database.

- Use emonhub to read from the serial port and write an emonhub interfacer in python to write to an sql database, you will need to study emonhub source code to do this as there is not yet developer documentation.

- Implement your own HTTP api for your sql database and have emonhub send data to this.

Perhaps a good first step would be to familiarise with emonhub and how it reads the data from the rfmpi adapter. Let us know how you get on

Trystan

kh_saf's picture

Re: Configuring Raspberry Pi to send data to my system database

Thank you Trystan. I think I will go with  study emonhub source code for now.

I'll let you now if I figured it out.

Comment viewing options

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