To me that string looks ok. There are other potential other issues in your script though like this section:
"hs.devicestringbyname(2536)" expect a name to be passed to it, but you are passing a reference number to it. You should be using "hs.devicestring(2536)" instead. Also, for the others, you may need to do explicit conversion, where you need to convert from the Double to a String. For those where you just need the integer, use hs.deviceValue(xxxx) instead, rather than declaring it as an integer and then expecting implicit conversion from the double that's returned by deviceValueEx. Unfortunately there's no way for someone else to test your script unless they have the same plugin (which I don't). Do you have a reference to the "Insert into" command that you are using? Can you provide a link to it, as I'll double check what's needed.
Code:
Dim Dev_ChargeStatus as String Dev_ChargeStatus = hs.devicestringbyname(2536) Dim Dev_EnergyAddedbyLastCharge as Double Dev_EnergyAddedbyLastCharge = hs.devicevalueEx(2537) Dim Dev_EnergyCostLastCharge as Double Dev_EnergyCostLastCharge = hs.deviceValueEx(2555) Dim Dev_EnergyCostKwh as Double Dev_EnergyCostKwh = hs.deviceValueEx(2554) Dim Dev_Odometer as Integer Dev_Odometer = hs.deviceValueEx(2497) Dim Dev_BatteryLevel as Integer Dev_BatteryLevel = hs.deviceValueEx(2498) Dim Dev_BatteryRangeEstimated as Integer Dev_BatteryRangeEstimated = hs.deviceValueEx(2499) Dim Dev_BatteryRangeIdeal as Integer Dev_BatteryRangeIdeal = hs.deviceValueEx(2500) Dim Dev_BatteryRange as Integer Dev_BatteryRange = hs.deviceValueEx(2501) Dim Dev_MilesAddedLastChargeEstimated as Integer Dev_MilesAddedLastChargeEstimated = hs.deviceValueEx(2539) Dim Dev_MilesAddedLastChargeIdeal as Integer Dev_MilesAddedLastChargeIdeal = hs.deviceValueEx(2538) Dim Dev_InsideTemperature as Integer Dev_InsideTemperature = hs.deviceValueEx(2518) Dim Dev_OutsideTemperature as Integer Dev_OutsideTemperature = hs.deviceValueEx(2519) Dim Dev_Latitude as Double Dev_Latitude = hs.deviceValueEx(2547) Dim Dev_Longitude as Double Dev_Longitude = hs.deviceValueEx(2548) Dim Dev_Location as String Dev_Location = hs.deviceValueEx(2549)
Comment