Hi,
Total newbee at this. I´m using Domoticz and a RFXtrx433e transceiver on a Raspberry to see my different sensors. Also have RRDtool installed.
What I like to do is to collect the sensor data every 5, put them in a database, create historical graphs (hourly, daily,weekly montly etc) and send the graphs to my webserver.
Something like this:
Using the /json.htm?type=devices&filter=all&used=true&order=Name in web browser I get this right now:
----------------------------------------------------------------------------------------------------
{
"ActTime" : 1477377023,
"ServerTime" : "2016-10-25 08:30:23",
"Sunrise" : "07:52",
"Sunset" : "17:11",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 100,
"CustomImage" : 0,
"Data" : "22.2 C, 50 %",
"Description" : "",
"DewPoint" : "11.28",
"Favorite" : 1,
"HardwareID" : 3,
"HardwareName" : "RFXCOM",
"HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
"HardwareTypeVal" : 1,
"HaveTimeout" : false,
"Humidity" : 50,
"HumidityStatus" : "Comfortable",
"ID" : "E700",
"LastUpdate" : "2016-10-25 08:29:43",
"Name" : "Xxxx1",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 7,
"SubType" : "Viking 02035, 02038, TSS320",
"Temp" : 22.20,
"Timers" : "false",
"Type" : "Temp + Humidity",
"TypeImg" : "temperature",
"Unit" : 0,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "1"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 100,
"CustomImage" : 0,
"Data" : "21.2 C, 51 %",
"Description" : "",
"DewPoint" : "10.66",
"Favorite" : 1,
"HardwareID" : 3,
"HardwareName" : "RFXCOM",
"HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
"HardwareTypeVal" : 1,
"HaveTimeout" : false,
"Humidity" : 51,
"HumidityStatus" : "Comfortable",
"ID" : "D700",
"LastUpdate" : "2016-10-25 08:29:57",
"Name" : "Vardagsrum",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 7,
"SubType" : "Viking 02035, 02038, TSS320",
"Temp" : 21.20,
"Timers" : "false",
"Type" : "Temp + Humidity",
"TypeImg" : "temperature",
"Unit" : 0,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "2"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 100,
"CustomImage" : 0,
"Data" : "5.2 C",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 3,
"HardwareName" : "RFXCOM",
"HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
"HardwareTypeVal" : 1,
"HaveTimeout" : false,
"ID" : "D800",
"LastUpdate" : "2016-10-25 08:30:02",
"Name" : "Probe",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 7,
"SubType" : "Viking 02811/02813, Proove TSS330",
"Temp" : 5.20,
"Timers" : "false",
"Type" : "Temp",
"TypeImg" : "temperature",
"Unit" : 0,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "3"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Closed",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 3,
"HardwareName" : "RFXCOM",
"HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
"HardwareTypeVal" : 1,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "128DA1A",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2016-10-24 20:57:48",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 15,
"Name" : "Klippare",
"Notifications" : "true",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 7,
"Status" : "Closed",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "AC",
"SwitchType" : "Blinds Inverted",
"SwitchTypeVal" : 6,
"Timers" : "false",
"Type" : "Lighting 2",
"TypeImg" : "blinds",
"Unit" : 10,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "6"
}
],
"status" : "OK",
"title" : "Devices"
}
----------------------------------------------------------------------------------------------------
Someone already have a similar solution in place that can help? Or is there some total different way to do what I want to accomplish?
Help with script for collect sensor data and create graphs
Moderator: leecollings
-
- Posts: 4
- Joined: Monday 24 October 2016 8:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Contact:
Re: Help with script for collect sensor data and create graphs
Issue/question solved
-
- Posts: 7
- Joined: Wednesday 24 January 2018 22:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help with script for collect sensor data and create graphs
Also being a beginner, can you share what the solution was?
Who is online
Users browsing this forum: No registered users and 1 guest