I can see that the variable is getting set, %v1% is the value that i enter and set.
I can also see that in the "Devices" window, the value is displayed.
I changed - kwRem = myJson.Sensors[5].TaskValues[0].Value - to kwRem = myJson.Sensors[0].TaskValues[2].Value based on what my json output is, see below, but the value on the ESP page stay "0".
Code: Select all
{"System":{
"Load":17.93,
"Load LC":1203,
"Build":20115,
"Git Build":"pygit2_not_installed",
"System Libraries":"ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support",
"Plugin Count":47,
"Plugin Description":"[Normal]",
"Local Time":"2021-10-23 11:04:30",
"Time Source":"NTP",
"Time Wander":132.205,
"Use NTP":"true",
"Unit Number":1,
"Unit Name":"kWh",
"Uptime":18,
"Uptime (ms)":1072386,
"Last Boot Cause":"Soft Reboot",
"Reset Reason":"Software/System restart",
"CPU Eco Mode":"false",
"Heap Max Free Block":10864,
"Heap Fragmentation":21,
"Free RAM":13872,
"Free Stack":3072,
"Sunrise":"7:40",
"Sunset":"19:47",
"Timezone Offset":120,
"Latitude":0.00,
"Longitude":0.00
},
"WiFi":{
"Hostname":"kWh",
"IP Config":"DHCP",
"IP Address":"192.168.2.196",
"IP Subnet":"255.255.255.0",
"Gateway":"192.168.2.1",
"STA MAC":"BC:DD:C2:27:5C:94",
"DNS 1":"192.168.2.10",
"DNS 2":"(IP unset)",
"SSID":"Zodiac",
"BSSID":"18:E8:29:E1:DF:73",
"Channel":6,
"Encryption Type":"WPA2/PSK",
"Connected msec":1068000,
"Last Disconnect Reason":1,
"Last Disconnect Reason str":"(1) Unspecified",
"Number Reconnects":0,
"Configured SSID1":"Zodiac",
"Configured SSID2":"",
"Force WiFi B/G":"false",
"Restart WiFi Lost Conn":"false",
"Force WiFi No Sleep":"false",
"Periodical send Gratuitous ARP":"false",
"Connection Failure Threshold":0,
"Max WiFi TX Power":17.50,
"Current WiFi TX Power":0.00,
"WiFi Sensitivity Margin":3,
"Send With Max TX Power":"false",
"Extra WiFi scan loops":0,
"Periodical Scan WiFi":"true",
"Use Last Connected AP from RTC":"false",
"RSSI":-36
},
"Sensors":[
{
"TaskValues": [
{"ValueNumber":1,
"Name":"avg_1min",
"NrDecimals":2,
"Value":4140.00
},
{"ValueNumber":2,
"Name":"acc_kWh",
"NrDecimals":3,
"Value":360.577
},
{"ValueNumber":3,
"Name":"remain_kwh",
"NrDecimals":2,
"Value":157.99
}],
"DataAcquisition": [
{"Controller":1,
"IDX":0,
"Enabled":"true"
},
{"Controller":2,
"IDX":0,
"Enabled":"false"
},
{"Controller":3,
"IDX":0,
"Enabled":"false"
}],
"TaskInterval":60,
"Type":"Generic - Pulse counter",
"TaskName":"powermeter",
"TaskDeviceNumber":3,
"TaskEnabled":"true",
"TaskNumber":1
}
],
"TTL":60000
}