Current section

Files

Jump to
tehama_client_ex lib tehama_client mock_data.ex
Raw

lib/tehama_client/mock_data.ex

defmodule TehamaClient.MockData do
@moduledoc false
def site() do
%TehamaClient.Site{
access_code: "88471391331",
address: "",
city: "Pembroke",
dcap_ip_adrs: "",
get_port_num: "false",
knocker_dly: "5",
knocker_dly_enbld: "False",
name: "Elan Flower Mound #12294 (28667)",
node_id: "614",
node_type: "DCAP",
note: "",
parent_node_id: "4462",
property_id: "4706362",
sql_user_name: "cituser",
state: "NC",
zipcode: "28372"
}
end
def unit() do
%TehamaClient.Unit{
id: "5532",
apt: "68",
addr: "",
building: "4706362",
meters: []
}
end
def device() do
%{
Addr: "",
Apt: "68 ",
NodeId: "5532",
Building: "1",
LocationNote: "Vacant",
LatestLinkStatusDataReadTime: "2022-03-02 04:51:12",
BattVolt: "3020",
LP: "e3000a78",
LQ: "98",
"RadioID-Dec": "2175922659",
"RadioID-Hex": "81B1F1E3",
readings: [
%{
RawReading: 47190,
ReadTime: "2022-03-02 04:29:41",
Reading: 491_900,
alerts: [],
display_type: "Encoded_Meter_1",
factor: "10.000",
meter_serial_number: "0000203389",
meter_style: "A",
meter_type: "W",
sensor_type: "53"
}
]
}
end
def report_data() do
%TehamaClient.Device{
addr: "",
apt: "68 ",
battery_v: 3020,
building: "1",
latest_link_status_data_read_time: "2022-03-02 04:51:12",
link_partner: "e3000a78",
link_quality: 98,
location_note: "Vacant",
node_id: "5532",
radio_dec_id: 2_175_922_659,
radio_hex_id: "81B1F1E3",
readings: [
%TehamaClient.Reading{
alerts: [],
display_type: "Encoded_Meter_1",
factor: 10.000,
initial_meter_read: 0,
initial_meter_time: nil,
mon_pt: nil,
note: nil,
raw: 47190,
read_time: "2022-03-02 04:29:41",
reading: 491_900,
sensor_type: "53",
serial_number: "0000203389",
style: "A",
type: "W",
units: nil
}
]
}
end
end