LOGDEBUG("Genmon: ForcePoll called")
def params1 = [
uri: "http://${ipaddress}:${port}/cmd/status_json"
]
try {
httpGet(params1) { resp1 ->
resp1.headers.each {
LOGINFO( "Response1: ${it.name} : ${it.value}")
}
if(logSet == true){
LOGINFO( "params1: ${params1}")
LOGINFO( "response contentType: ${resp1.contentType}")
LOGINFO( "response data: ${resp1.data}")
}
// def SwitchState = resp1.data[0].Engine[0]
//def SwitchState = resp1.data['Status'][0]['Engine'][3].RPM
def SwitchState = resp1.data.Status
LOGINFO( "Data: HERE2 ${SwitchState}")
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.749 pm [info](http://192.168.1.16/device/edit/1249) Genmon Driver - INFO: Data: HERE2
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.747 pm [info](http://192.168.1.16/device/edit/1249) Gemon Driver - INFO: response data: {"Status": [{"Engine": [{"Switch State": "Auto"}, {"Engine State": "Off - Ready"}, {"Battery Voltage": "12.90 V"}, {"RPM": "0 "}, {"Frequency": "0.00 Hz"}, {"Output Voltage": "0 V"}, {"Output Current": "0.00 A"}, {"Output Power (Single Phase)": "0.00 kW"}, {"Active Rotor Poles (Calculated)": "0 "}, {"Unsupported Sensors": [{"Raw RPM Sensor": "0"}, {"Frequency (Calculated)": "0.0 Hz"}, {"Unsupported Sensor 1": "0.00"}, {"Unsupported Sensor 2": "65436"}, {"Unsupported Sensor 3": "0"}]}]}, {"Line": [{"Utility Voltage": "240 V"}, {"Utility Voltage Max": "242 V"}, {"Utility Voltage Min": "237 V"}, {"Utility Threshold Voltage": "156 V"}]}, {"Last Log Entries": {"Logs": {"Alarm Log": "07/01/19 17:10:45 Charger Missing AC : Alarm Code: 0000", "Service Log": "11/04/18 12:49:16 Schedule B Serviced ", "Run Log": "07/21/19 10:05:16 Stopped - Auto "}}}, {"Time": [{"Monitor Time": "Sunday July 21, 2019 19:57:17"}, {"Generator Time": "Sunday July 21, 2019 19:57"}]}]}
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.738 pm [info](http://192.168.1.16/device/edit/1249) Genmon Driver - INFO: response contentType: text/html
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.731 pm [info](http://192.168.1.16/device/edit/1249) Genmon Driver - INFO: params1: [uri:http://192.168.1.58:null/cmd/status_json]
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.728 pm [info](http://192.168.1.16/device/edit/1249)Genmon Driver - INFO: Response1: Date : Sun, 21 Jul 2019 23:57:17 GMT
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.725 pm [info](http://192.168.1.16/device/edit/1249) Genmon Driver - INFO: Response1: Server : Werkzeug/0.15.5 Python/2.7.16
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.722 pm [info](http://192.168.1.16/device/edit/1249) Genmon Driver - INFO: Response1: Expires : 0
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.718 pm [info](http://192.168.1.16/device/edit/1249) Genmon Driver - INFO: Response1: Pragma : no-cache
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.713 pm [info](http://192.168.1.16/device/edit/1249) Genmon Driver - INFO: Response1: Cache-Control : no-cache, no-store, must-revalidate, public, max-age=0
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.709 pm [info](http://192.168.1.16/device/edit/1249) Genmon Driver - INFO: Response1: Content-Length : 966
[dev:1249](http://192.168.1.16/logs#dev1249)2019-07-21 07:57:14.706 pm [info](http://192.168.1.16/device/edit/1249) Genmon Driver - INFO: Response1: Content-Type : text/html; charset=utf-8
Here is the raw output from Genmon: https://pastebin.com/raw/dQm6ABCL