I know that some people use btmon.py to do PlottWatt support but my ideal solution is to do everything in the GEM and DB.
Give the info below how easy would it be for me to use the HTTP posting format of the GEM to send data to PlotWatt - or should I be trying to get the DB to do it? (I would prefer not to have to get into python, curl etc if I don't really have to)
**edit** hmm seems the board truncated my URLs - here is the source page https://plotwatt.com/docs/api
PlotWatt API
Schema
In PlotWatt, your house is modeled by a set of meters. Each meter has a stream of readings. Each reading is composed of a timestamp and a kilowatt value. The kilowatt value represents how much energy your meter was consuming at the instant referred to by the timestamp.
Adding Meters to your House
1 $ curl -X POST -d "number_of_new_meters=2" http://3b0f9e9a9d98137c:@plotwatt.com/api/v2/new_meters
2 [123,214]
Only POST request is allowed.
Note that you cannot have more than 50 meters total.
Listing Meters
1 $ curl -X GET http://3b0f9e9a9d98137c:@plotwatt.com/a ... ist_meters
2 [123,124]
Deleting Meters
1 curl -X PUT -d "meter_id=123" http://3b0f9e9a9d98137c:@plotwatt.com/a ... lete_meter
Only PUT request is allowed.
Only one meter may be deleted at a time.
Pushing Data
To upload data, make a post to the following url: http://plotwatt.com/api/v2/push_readings
The readings should be sent via a list of values passed in as POST parameters as in this example:
1 curl -X POST -d "123,1.5,1310172167,123,1.45,1310172227" http://3b0f9e9a9d98137c:@plotwatt.com/a ... h_readings
This examples creates 2 readings by meter 123:
•one reading is 1.5 kw at time 1310172167
•another reading is 1.45 kw at time 1310172227
The format used in the post parameters is a comma separated list of values:
reading1_meter_id,reading1_kw,reading1_occurred_at,reading2_meter_id,reading2_kw,reading2_occurred_at,...
•meter_id - the meter this reading is from
•kw - power use in kilowatts
•occurred_at - the timestamp at which this reading was made. The timestamp should be in (UTC) unix epoch time
Recommended Reading and Posting Frequencies
The reading frequency is the frequency that readings are sampled by your hardware. We currently support a reading frequency up to 1 reading per second. We recommend that you use the highest possible reading frequency that your hardware supports.
NOTE: Reading frequencies less frequent than 1 reading per 100 seconds, are supported, however, not all PlotWatt features will be available.
If your reading frequency is more than 2 or 3 per minute, we recommend that you send us your readings in batches. This decreases the bandwidth required. If you are only collecting 1 or 2 readings per minute, batching is not necessary.
Batches of readings should be sent between once a minute and once every few minutes, depending on your reading frequency. In general, batches should contain no more than about 50 readings at a time.
Further Questions
If you have further questions, please do not hesitate to contact Zach at zdwiel@plotwatt.com
PlotWatt Support?
-
- Posts: 258
- Joined: Sun Apr 06, 2014 7:24 pm
-
- Site Admin
- Posts: 4262
- Joined: Fri Jun 04, 2010 9:39 am
Re: PlotWatt Support?
Likely would have to be done through the DB, once we're done fixing the problems shown in the 4.1.6 thread, we can look into adding additional features like this.scyto wrote:I know that some people use btmon.py to do PlottWatt support but my ideal solution is to do everything in the GEM and DB.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Brultech Research Inc.
E: ben(at)brultech.com
-
- Posts: 258
- Joined: Sun Apr 06, 2014 7:24 pm
Re: PlotWatt Support?
Cool, not trying to be pushy, juts wanting to load up your backlog as I am excited by my GEM (now monitoring the left side of my panel - fitting the CTs to the right is a job for multiple nights this week) and DB (which I will install tonight)
Plus I was wondering if I could use curl to manually create 32 'meters' and then use the custom format of the GEM to send the data... I assume I am overthinking thinking this?
Plus I was wondering if I could use curl to manually create 32 'meters' and then use the custom format of the GEM to send the data... I assume I am overthinking thinking this?
-
- Site Admin
- Posts: 4262
- Joined: Fri Jun 04, 2010 9:39 am
Re: PlotWatt Support?
No problem, keep adding stuff.scyto wrote:Cool, not trying to be pushy, juts wanting to load up your backlog as I am excited by my GEM (now monitoring the left side of my panel - fitting the CTs to the right is a job for multiple nights this week) and DB (which I will install tonight)
Plus I was wondering if I could use curl to manually create 32 'meters' and then use the custom format of the GEM to send the data... I assume I am overthinking thinking this?
The GEM would have to send a format tailored to their style, can't just put together a custom one on the fly unfortunately. Also, would have to know the ID of each meter.
Ben
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Brultech Research Inc.
E: ben(at)brultech.com
-
- Posts: 258
- Joined: Sun Apr 06, 2014 7:24 pm
Re: PlotWatt Support?
Got it, have you thought about allowing truly custom HTTP formats to get you out of the business of having to support multiple services? Or is supporting multiple services less work than an open format editable via gui?