Northq z-wave gas meter reader

Discussions about existing Z-Wave device and their usage with Z-Way/Z-Cloud/Z-Box
Post Reply
rechinul13
Posts: 4
Joined: 24 Jun 2014 12:36

Northq z-wave gas meter reader

Post by rechinul13 »

I have a NorthQ z-wave gas meter reader, and I am trying to use the COMMAND_CLASS_METER_TBL_MONITOR to get historical meter readings. I know that the meter supports this command class, and it can store a maximum of 8000 readings, but I can not figure out what URL to call in order to get the historical data readings.

I was thinking I have to use MeterTableMonitorHistoricalDataGet, but I do not understand what values I have to send.

Can anyone help me????

Thank you.
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Northq z-wave gas meter reader

Post by pofs »

It is MeterTableMonitorHistoricalDataGet(setId, maxResults, startTime, endTime)

setId is a 1-based index of dataset to fetch (device could have several), or 0 to fetch data for all supported datasets.
maxResults, obviously, is a maximum number of results to fetch. 0 to fetch all values in specified time range.
startTime and endTime are time range to get data for. Both of them are integers representing local UNIX time.

Data will be stored as floating point numbers under device[id].MeterTableMonitor.data[setId].history
rechinul13
Posts: 4
Joined: 24 Jun 2014 12:36

Re: Northq z-wave gas meter reader

Post by rechinul13 »

Hello,

Thank you for your answer, it make sense. I struggled with the setId a little bit.

but when i try to run the HTTP request
(URL: http://<ip address>/ZWaveAPI/Run/devices[10].instances[0].commandClasses[61]. MeterTableMonitorCurrentDataGet(0,0,1403590800,1403630386))

i get the following response from my raspberry pi (with z-wave module)

Error 500: Internal Server Error
Uncaught TypeError: undefined is not a function

I'm hoping that there is something wrong with my HTTP request.

The device is number 10, it have only one instance - 0, and i am using command class 61.

i used 0 for the setId since i do not know what other setId the device has,
and 0 to get all the readings.
the timestamp is from 6 / 24 / 14 @ 6:20:0 UTC to 6 / 24 / 14 @ 18:20:0 UTC

and i am sure the meter has readings.

any ideas what i am doing wrong?

Thank you in advance.
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Northq z-wave gas meter reader

Post by pofs »

Oh, sorry. The command class is MeterTableMonitor, and the functions are HistoricalDataGet or CurrentDataGet.
So the request should be:
/ZWaveAPI/Run/devices[10].instances[0].commandClasses[61].CurrentDataGet(0,0,1403590800,1403630386)
or, simplified version:
/ZWaveAPI/Run/devices[10].MeterTableMonitor.CurrentDataGet(0,0,1403590800,1403630386)
rechinul13
Posts: 4
Joined: 24 Jun 2014 12:36

Re: Northq z-wave gas meter reader

Post by rechinul13 »

Hello pofs,

thank you for your response. it seems to work, the command is sent to the z-wave meter, but the history values in the MeteTableMonitor.data seem to disappear. I will take a look at i again tomorrow and see if there is something wrong with the meter. maybe some settings i've missed.

thank you again for you help.
hkoopmans
Posts: 6
Joined: 08 Aug 2014 15:03

Re: Northq z-wave gas meter reader

Post by hkoopmans »

The above postings were very helpfull to me but I still have problems with reading the historical data.
The Get commands are working well but now I need the right command to read the data for the given time period.
....MeterTableMonitor.data[0].history is not working.

Can anyone help?

Thanks.
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Northq z-wave gas meter reader

Post by PoltoS »

Do you see data updated for this CC when NorthQ answers your requests?
Post Reply