<html><head></head><body><div>Hey Michael,</div><div><br></div><div>thanks!</div><div><br></div><div>The "7" was not clear to me ...</div><div><br></div><div>I will give it all a try and will post the results.</div><div><br></div><div>Greetinx</div><div><br></div><div>Chris</div><div><br></div><div><br></div><div>Am Montag, den 28.12.2020, 11:15 +0100 schrieb Michael Balzer:</div><blockquote type="cite"><pre>Chris,
TL;DR: simply add the command to execute after the "7," intro, e.g.
"7,climatecontrol on".
The SendCommand API was built around the V2 message protocol, so you
need to send commands as MP commands, see
<a href="https://docs.openvehicles.com/en/latest/protocol_v2/commands.html">https://docs.openvehicles.com/en/latest/protocol_v2/commands.html</a> for a
list. MP command code 7 passes standard text (former SMS) commands to
the shell, that's what the Wiki example shows (for V2 command "STAT?").
You can get the command response by listening to the CommandResult
intent and reading the "cmd_data" extra. Be aware all command result
will be sent as intents, so you need to check if a result matches your
command (could possibly be improved if needed).
Regards,
Michael
Am 28.12.20 um 10:34 schrieb Chris van der Meijden:
<blockquote type="cite">
I'm writing a little Android app with Cordova to do something similar
as Tesla's "Romance mode". The app will turn climate control on or off
and will show a burning log fire while the car is heating.
As cordova uses HTML and Javascript you can see an online preview here:
<a href="http://www.arachnon.de/fire/test.html">http://www.arachnon.de/fire/test.html</a>
When you click or tap on the fireplace the countdown for turning
"climatecontrol" on ticks down for 17 seconds. After that the fire
starts "moving" and on webkit browsers you will hear a tickling sound.
When you click or tap again the tickling will stop and you will get a
static image again. You will also get a red bar for 10 seconds, turning
"climatecontrol" off and blocking any new commands for those 10
seconds.
When you click or tap on the yellow bar you will be able to store your
OVMS credentials (vehicle ID and password). Cave: this is done in plain
text with window.localstorage so the password will be plain readable
from the local storage within the browser on your device.
The credentials are needed to communicate with the Android OVMS app, as
I am planning to use the "SendCommand Broadcast Intent data"
functionality of the OVMS app. I should be able to do that via this
cordova plugin:
<a href="https://github.com/cordova-misc/cordova-webintent">https://github.com/cordova-misc/cordova-webintent</a>
I read the OVMS "SendCommand Broadcast Intent data" documentation here:
<a href="https://github.com/openvehicles/Open-Vehicle-Android/wiki/SendCommand-B">https://github.com/openvehicles/Open-Vehicle-Android/wiki/SendCommand-B</a>
roadcast-Intent-data
but it is not clear to me, how I can initiate the "climatecontrol on"
shell command over the broadcast. So would like to ask for help on that
:-)
Once the app is up and running it should be usable for any vehicle with
OVMS climate control implemented.
Just a little gimmick. But fun :-))
Regards
Chris
_______________________________________________
OvmsDev mailing list
<a href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</blockquote>
</pre><pre>_______________________________________________
OvmsDev mailing list
<a href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre></blockquote></body></html>