node-red-contrib-onstar2
Version:
An updated Node-RED Library using OnStarJS, an unofficial client library for the OnStar Vehicle API
961 lines (904 loc) • 39.3 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('get-account-vehicles', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Get Account Vehicles' },
onstar2: { value: 'Onstar Config', type: 'onstar2' }
},
inputs: 1,
outputs: 2,
outputLabels: ["Account Vehicle Capabilities","result.response"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'get-account-vehicles';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var originalName = "Get Account Vehicles";
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val(originalName);
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('get-diagnostics', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Diagnostics' },
onstar2: { value: 'Onstar Config', type: 'onstar2' },
diagnostics: { required: false }
},
inputs: 1,
outputs: 2,
outputLabels: ["Diagnostics","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'diagnostics';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditprepare: function() {
$("#node-input-diagnostics").typedInput({
types: [
{
value: "diagnostics",
multiple: "true",
options: [
{ value: "AMBIENT AIR TEMPERATURE" },
{ value: "ENGINE AIR FILTER MONITOR STATUS" },
{ value: "ENGINE COOLANT TEMP" },
{ value: "ENGINE RPM" },
{ value: "EV BATTERY LEVEL" },
{ value: "EV CHARGE STATE" },
{ value: "EV ESTIMATED CHARGE END" },
{ value: "EV PLUG STATE" },
{ value: "EV PLUG VOLTAGE" },
{ value: "FUEL TANK INFO" },
{ value: "GET CHARGE MODE" },
{ value: "GET COMMUTE SCHEDULE" },
{ value: "HANDS FREE CALLING" },
{ value: "HOTSPOT CONFIG" },
{ value: "HOTSPOT STATUS" },
{ value: "INTERM VOLT BATT VOLT" },
{ value: "LAST TRIP DISTANCE" },
{ value: "LAST TRIP FUEL ECONOMY" },
{ value: "LIFETIME EV ODOMETER" },
{ value: "LIFETIME FUEL ECON" },
{ value: "LIFETIME FUEL USED" },
{ value: "ODOMETER" },
{ value: "OIL LIFE" },
{ value: "ONSTAR CONFIG" },
{ value: "TIRE PRESSURE" },
{ value: "VEHICLE RANGE" }
]
}
]
})
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Diagnostics");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('lock-myvehicle', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Lock Vehicle' },
onstar2: { value: 'Onstar Config', type: 'onstar2' },
delay: { required: false, validate: RED.validators.regex(/^(|\d)+$/)}
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'lock-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Lock Vehicle");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('unlock-myvehicle', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Unlock Vehicle' },
onstar2: { value: 'Onstar Config', type: 'onstar2' },
delay: { required: false, validate: RED.validators.regex(/^(|\d)+$/)}
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'unlock-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Unlock Vehicle");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('lock-mytrunk', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Lock Trunk' },
onstar2: { value: 'Onstar Config', type: 'onstar2' },
delay: { required: false, validate: RED.validators.regex(/^(|\d)+$/)}
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'lock-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Lock Trunk");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('unlock-mytrunk', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Unlock Trunk' },
onstar2: { value: 'Onstar Config', type: 'onstar2' },
delay: { required: false, validate: RED.validators.regex(/^(|\d)+$/)}
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'unlock-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Unlock Trunk");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('start-myvehicle', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Start Vehicle' },
onstar2: { value: 'Onstar Config', type: 'onstar2' }
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'start-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Start Vehicle");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('cancel-start-myvehicle', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Cancel Start Vehicle' },
onstar2: { value: 'Onstar Config', type: 'onstar2' }
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'cancel-start-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Cancel Start Vehicle");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('alert-myvehicle', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Alert Vehicle' },
onstar2: { value: 'Onstar Config', type: 'onstar2' },
action: { required: false },
delay: { required: false, validate: RED.validators.regex(/^(|\d)+$/)},
duration: { required: false, validate: RED.validators.regex(/^(|\d)+$/)},
override: { required: false }
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'alert-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditprepare: function() {
$("#node-input-action").typedInput({
types: [
{
value: "action",
multiple: "true",
options: [
{ value: "Flash" },
{ value: "Honk" }
]
}
]
})
$("#node-input-override").typedInput({
types: [
{
value: "override",
multiple: "true",
options: [
{ value: "DoorOpen" },
{ value: "IgnitionOn" }
]
}
]
})
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Alert Vehicle");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('alert-myvehicle-lights', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Alert Vehicle Lights Only' },
onstar2: { value: 'Onstar Config', type: 'onstar2' }
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'alert-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Alert Vehicle Lights Only");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('alert-myvehicle-horn', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Alert Vehicle Horn Only' },
onstar2: { value: 'Onstar Config', type: 'onstar2' }
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'alert-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Alert Vehicle Horn Only");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('cancel-alert-myvehicle', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Cancel Alert Vehicle' },
onstar2: { value: 'Onstar Config', type: 'onstar2' }
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'cancel-alert-vehicle';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Cancel Alert Vehicle");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('locate-vehicle', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Get Vehicle Location' },
onstar2: { value: 'Onstar Config', type: 'onstar2' }
},
inputs: 1,
outputs: 2,
outputLabels: ["Location Information","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'location';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Get Vehicle Location");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('mycharge-override', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Override Charge State' },
onstar2: { value: 'Onstar Config', type: 'onstar2' },
mode: { value: '', required: false }
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'charge-override';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditprepare: function() {
$("#node-input-mode").typedInput({
types: [
{
value: "mode",
options: [
{ value: '', label: "-- Use Default or Select Option from List --"},
{ value: "CHARGE_NOW" },
{ value: "CANCEL_OVERRIDE" }
]
}
]
})
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Override Charge State");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('get-mycharge-profile', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Get Charging Profile' },
onstar2: { value: 'Onstar Config', type: 'onstar2' }
},
inputs: 1,
outputs: 2,
outputLabels: ["Get Charging Profile","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'get-charge-profile';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Get Charging Profile");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('set-mycharge-profile', {
category: 'onstar2',
color: '#7eb0ff',
defaults: {
name: { value: 'Set Charging Profile' },
onstar2: { value: 'Onstar Config', type: 'onstar2' },
chargemode: { value: '', required: false },
ratetype: { value: '', required: false }
},
inputs: 1,
outputs: 2,
outputLabels: ["Command Status","result.response.data"],
icon: 'onstar.svg',
label: function () {
//return this.name || 'set-charge-profile';
var configCarName = RED.nodes.node(this.onstar2);
return configCarName.label()+" "+this.name;
},
oneditprepare: function() {
$("#node-input-chargemode").typedInput({
types: [
{
value: "chargemode",
options: [
{ value: '', label: "-- Use Default or Select Option from List --"},
{ value: "DEFAULT_IMMEDIATE" },
{ value: "IMMEDIATE" },
{ value: "DEPARTURE_BASED" },
{ value: "RATE_BASED" },
{ value: "PHEV_AFTER_MIDNIGHT" }
]
}
]
})
$("#node-input-ratetype").typedInput({
types: [
{
value: "ratetype",
options: [
{ value: '', label: "-- Use Default or Select Option from List --"},
{ value: "OFFPEAK" },
{ value: "MIDPEAK" },
{ value: "PEAK" }
]
}
]
})
},
oneditsave: function() {
var editNodeName = $("#node-input-name").val();
if (editNodeName == '') {
$("#node-input-name").val("Set Charging Profile");
}
$("#node-input-name").val();
},
});
</script>
<script type="text/javascript">
RED.nodes.registerType('onstar2', {
category: 'config',
defaults: {
carname: { required: true },
username: { required: true },
password: { required: true },
totp: { required: true},
pin: { required: true, validate: RED.validators.number() },
vin: { required: true },
deviceid: { required: true },
tokenlocation: { value: '', required: false },
checkrequeststatus: { value: true, required: true },
requestpollingtimeoutseconds: { value: 90, required: true, validate: RED.validators.number() },
requestpollingintervalseconds: { value: 6, required: true, validate: RED.validators.number() }
},
label: function () {
return this.carname;
},
oneditprepare: function() {
var editNodeValRequestPollingTimeoutSeconds = $("#node-config-input-requestpollingtimeoutseconds").val();
var editNodeValRequestPollingIntervalSeconds = $("#node-config-input-requestpollingintervalseconds").val();
$("#node-config-input-checkrequeststatus").typedInput({
type:"bool"
});
if (editNodeValRequestPollingTimeoutSeconds == '') {
$("#node-config-input-requestpollingtimeoutseconds").val(90);
}
$("#node-config-input-requestpollingtimeoutseconds").val();
if (editNodeValRequestPollingIntervalSeconds == '') {
$("#node-config-input-requestpollingintervalseconds").val(6);
}
$("#node-config-input-requestpollingintervalseconds").val();
},
oneditsave: function() {
var editNodeValRequestPollingTimeoutSeconds = $("#node-config-input-requestpollingtimeoutseconds").val();
var editNodeValRequestPollingIntervalSeconds = $("#node-config-input-requestpollingintervalseconds").val();
if (editNodeValRequestPollingTimeoutSeconds == '') {
$("#node-config-input-requestpollingtimeoutseconds").val(90);
}
$("#node-config-input-requestpollingtimeoutseconds").val();
if (editNodeValRequestPollingIntervalSeconds == '') {
$("#node-config-input-requestpollingintervalseconds").val(6);
}
$("#node-config-input-requestpollingintervalseconds").val();
},
});
</script>
<script type="text/html" data-template-name="get-account-vehicles">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="get-account-vehicles">
<p>Get list of vehicles in your account and requests supported by the vehicles in your account.</p>
</script>
<script type="text/html" data-template-name="get-diagnostics">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-diagnostics"><i class="icon-bookmark"></i> Diagnostic Items to Query</label>
<input type="text" id="node-input-diagnostics" />
</div>
</script>
<script type="text/html" data-help-name="get-diagnostics">
<p>Get diagnostic information for the vehicle. Diagnostics parameter is optional, but if not set in the config dialog, defaults to ALL known diagnostics or the value sent to the input via "msg.payload.diagnosticItem".</p>
</script>
<script type="text/html" data-template-name="lock-myvehicle">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-delay"><i class="icon-bookmark"></i> Delay (Minutes)</label>
<input type="text" id="node-input-delay" />
</div>
</script>
<script type="text/html" data-help-name="lock-myvehicle">
<p>Lock vehicle doors. Delay parameter is in minutes and is optional, but if not set in the config dialog, defaults to 0 (immediate/no delay) or the value sent to the input via "msg.payload.delay".</p>
</script>
<script type="text/html" data-template-name="unlock-myvehicle">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-delay"><i class="icon-bookmark"></i> Delay (Minutes)</label>
<input type="text" id="node-input-delay" />
</div>
</script>
<script type="text/html" data-help-name="unlock-myvehicle">
<p>Unlock vehicle doors. Delay parameter is in minutes and is optional, but if not set in the config dialog, defaults to 0 (immediate/no delay) or the value sent to the input via "msg.payload.delay".</p>
</script>
<script type="text/html" data-template-name="lock-mytrunk">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-delay"><i class="icon-bookmark"></i> Delay (Minutes)</label>
<input type="text" id="node-input-delay" />
</div>
</script>
<script type="text/html" data-help-name="lock-mytrunk">
<p>Lock vehicle trunk. Locks the trunk but doesn't automatically close it. Delay parameter is in minutes and is optional, but if not set in the config dialog, defaults to 0 (immediate/no delay) or the value sent to the input via "msg.payload.delay".</p>
</script>
<script type="text/html" data-template-name="unlock-mytrunk">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-delay"><i class="icon-bookmark"></i> Delay (Minutes)</label>
<input type="text" id="node-input-delay" />
</div>
</script>
<script type="text/html" data-help-name="unlock-mytrunk">
<p>Unlock vehicle trunk. Unlocks the trunk but doesn't automatically open it. All doors remain locked. Delay parameter is in minutes and is optional, but if not set in the config dialog, defaults to 0 (immediate/no delay) or the value sent to the input via "msg.payload.delay".</p>
</script>
<script type="text/html" data-template-name="start-myvehicle">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="start-myvehicle">
<p>Start the vehicle remotely.</p>
</script>
<script type="text/html" data-template-name="cancel-start-myvehicle">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="cancel-start-myvehicle">
<p>Stop the vehicle if it was started remotely.</p>
</script>
<script type="text/html" data-template-name="alert-myvehicle">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-action"><i class="icon-bookmark"></i> Action</label>
<input type="text" id="node-input-action" />
</div>
<div class="form-row">
<label for="node-input-delay"><i class="icon-bookmark"></i> Delay (Minutes)</label>
<input type="text" id="node-input-delay" />
</div>
<div class="form-row">
<label for="node-input-duration"><i class="icon-bookmark"></i> Duration (Minutes)</label>
<input type="text" id="node-input-duration" />
</div>
<div class="form-row">
<label for="node-input-override"><i class="icon-bookmark"></i> Override</label>
<input type="text" id="node-input-override" />
</div>
</script>
<script type="text/html" data-help-name="alert-myvehicle">
<p>Turn on vehicle alert with customizable options.
<br>
<br>• <b>Action</b> parameter is optional, but if not set in the config dialog, defaults to ["Flash", "Honk"] (OnStarJS Defaults) or the value sent to the input via "msg.payload.action".
<br>• <b>Delay</b> parameter is in minutes and is optional, but if not set in the config dialog, defaults to 0 (immediate/no delay - OnStarJS Default) or the value sent to the input via "msg.payload.delay".
<br>• <b>Duration</b> parameter is in minutes and is optional, but if not set in the config dialog, defaults to 1 minute (OnStarJS Default) or the value sent to the input via "msg.payload.duration".
<br>• <b>Override</b> parameter is optional, but if not set in the config dialog, defaults to ["DoorOpen", "IgnitionOn"] (OnStarJS Defaults) or the value sent to the input via "msg.payload.override".
<br><br>
<b>NOTE: </b>This new functionality since v2.1.0 makes the "alert-myvehicle-horn" and "alert-myvehicle-lights" nodes redundant, but still keeping them in for backwards compatibility.
</p>
</script>
<script type="text/html" data-template-name="alert-myvehicle-lights">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="alert-myvehicle-lights">
<p>Turn on vehicle alert (lights only).</p>
</script>
<script type="text/html" data-template-name="alert-myvehicle-horn">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="alert-myvehicle-horn">
<p>Turn on vehicle alert (horn only).</p>
</script>
<script type="text/html" data-template-name="cancel-alert-myvehicle">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="cancel-alert-myvehicle">
<p>Stop the vehicle alert.</p>
</script>
<script type="text/html" data-template-name="locate-vehicle">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="locate-vehicle">
<p>Get vehicle location information.</p>
</script>
<script type="text/html" data-template-name="mycharge-override">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-mode"><i class="icon-tag"></i> Mode</label>
<input type="text" id="node-input-mode" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="mycharge-override">
<p>Override charging state.
<br>• <b>Mode</b> parameter is optional, but if not set in the config dialog, defaults to "CHARGE_NOW" (OnStarJS Default) or the value sent to the input via "msg.payload.mode".
</p>
</script>
<script type="text/html" data-template-name="set-mycharge-profile">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-chargemode"><i class="icon-tag"></i> Charge Mode</label>
<input type="text" id="node-input-chargemode" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-ratetype"><i class="icon-tag"></i> Rate Type</label>
<input type="text" id="node-input-ratetype" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="set-mycharge-profile">
<p>Set the charging profile.
<br>• <b>Charge Mode</b> parameter is optional, but if not set in the config dialog, defaults to "IMMEDIATE" (OnStarJS Default) or the value sent to the input via "msg.payload.chargeMode".
<br>• <b>Rate Type</b> parameter is optional, but if not set in the config dialog, defaults to "MIDPEAK" (OnStarJS Default) or the value sent to the input via "msg.payload.rateType".
</p>
</script>
<script type="text/html" data-template-name="get-mycharge-profile">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-onstar2"><i class="icon-tag"></i> Config</label>
<input type="text" id="node-input-onstar2" placeholder="Name" />
</div>
</script>
<script type="text/html" data-help-name="get-mycharge-profile">
<p>Get the charging profile.</p>
</script>
<script type="text/html" data-template-name="onstar2">
<div class="form-row">
<label for="node-config-input-name"><i class="icon-bookmark"></i> Name</label>
<input type="text" id="node-config-input-name" value="OnStar" />
</div>
<div class="form-row">
<label for="node-config-input-carname"><i class="icon-bookmark"></i> Car Name</label>
<input type="text" id="node-config-input-carname" />
</div>
<div class="form-row">
<label for="node-config-input-username"><i class="icon-bookmark"></i> Username</label>
<input type="text" id="node-config-input-username" />
</div>
<div class="form-row">
<label for="node-config-input-password"><i class="icon-bookmark"></i> Password</label>
<input type="password" id="node-config-input-password" />
</div>
<div class="form-row">
<label for="node-config-input-totp"><i class="icon-bookmark"></i> TOTP</label>
<input type="password" id="node-config-input-totp" />
</div>
<div class="form-row">
<label for="node-config-input-pin"><i class="icon-bookmark"></i> PIN</label>
<input type="password" id="node-config-input-pin" />
</div>
<div class="form-row">
<label for="node-config-input-vin"><i class="icon-bookmark"></i> VIN</label>
<input type="text" id="node-config-input-vin" />
</div>
<div class="form-row">
<label for="node-config-input-deviceid"><i class="icon-bookmark"></i> Device ID (any valid V4 UUID)</label>
<input type="text" id="node-config-input-deviceid" />
</div>
<div class="form-row">
<label for="node-config-input-tokenlocation"><i class="icon-bookmark"></i> Token Location (Optional)</label>
<input type="text" id="node-config-input-tokenlocation" placeholder="Path to store token files" />
</div>
<div class="form-row">
<label for="node-config-input-checkrequeststatus"><i class="icon-bookmark"></i> Set checkRequestStatus Value for OnStarJS</label>
<input type="text" id="node-config-input-checkrequeststatus" />
</div>
<div class="form-row">
<label for="node-config-input-requestpollingtimeoutseconds"><i class="icon-bookmark"></i> Set requestPollingTimeoutSeconds Value for OnStarJS</label>
<input type="text" id="node-config-input-requestpollingtimeoutseconds" />
</div>
<div class="form-row">
<label for="node-config-input-requestpollingintervalseconds"><i class="icon-bookmark"></i> Set requestPollingIntervalSeconds Value for OnStarJS</label>
<input type="text" id="node-config-input-requestpollingintervalseconds" />
</div>
</script>