Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To: Have CQC know (and announce) the fuel remaining in your car
#1
WooHoo, got it working, now when I turn my car off it fires off a task that tells CQC how much gas I have left! I stored that in a variables driver field, I can do whatever I want, for me that'll be to include that on a TTS wakeup. (Along with weather)

Step 1) Throw away the iPhone, get an Android
Step 2) Get Tasker
Step 3) Get an OBD2 device. I have a PLX Kiwi 3 as its ultra low power and can be left plugged in. These are <$100. Pair it via BlueTooth.
Step 4) Buy Torque Pro ($5ish). Set up to reference the OBD2 device.

Make sure the above works manually. THEN:

Step 5) Follow all the steps here: http://forum.joaoapps.com/index.php?thre....21/page-2 .

TL;Dr: Torque creates a logfile, that guide walks you through how to get Tasker to read it, and split into the various bits. I'm currently only looking at one sensor value (fuel remaining) but it would be pretty simple to do multiple (trip length, various speed indicators, etc)

Step 6) Get it into CQC via the method of your choice. I personally struggle with the http monitor driver, so I have a CML macro where I can send the following command.

BigDaddy.DynDNS.Org:12231/CMLBin/User/NFC?Cmd=FUEL93.8

And whatever I put in Cmd gets put into a variables driver field

Step 7) Chop out the first 4 characters, put the rest into another variables drive field.

Step 8) Whatever you want to do with that field.

And, since I can fire off different tasks based on which BlueTooth device I disconnected from, I can get a 2nd OBD2 for the other car and CQC would be able to tell. Well, assuming i'm ever permitted to drive that other car.
------------------------------------
Devices I can't stand and wish I could replace: SmartThings, Hue, Concerto, VRUSB
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#2
well, one thing I learned is that both Nissan's OBD implementation, plus the fuel gauge, are nowhere near as accurate as I thought. I drove 50 miles (300 mile range), fuel OBD claimed 98.4% remaining. I looked at the fuel gauge, sure enough it was at Full.

But for my purposes of "do I need get gas before going to work", this should still be good enough. I just need directional information.
------------------------------------
Devices I can't stand and wish I could replace: SmartThings, Hue, Concerto, VRUSB
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#3
Wow. very nice!
--Kill all the serial ports--
Reply
#4
IVB Wrote:well, one thing I learned is that both Nissan's OBD implementation, plus the fuel gauge, are nowhere near as accurate as I thought. I drove 50 miles (300 mile range), fuel OBD claimed 98.4% remaining. I looked at the fuel gauge, sure enough it was at Full.

But for my purposes of "do I need get gas before going to work", this should still be good enough. I just need directional information.

Man i'm getting dizzy from the volatility. I'm having CQC email me every time I turn the car off and it gets a reading so I can see how this is performing.

Fuel was at 84% last night.

At 7:54am after driving 2 miles to the dr office it was 83%.

At 8:16am after driving 1 mile to the coffee shop (post doc) it was 92%.

At 8:58am after driving 25 miles to work it was 74%.

The last reading is directionally accurate, the 2nd one is obviously the outlier and should be discarded. The issue is that my "last reading of the day" which is whats announced in the morning could be an outlier, I should probably assume I need to get gas as soon as its in the ballpark of 45%. 30% is when the low fuel indicator comes on, and I drive somewhere around 10% of tank one way to work.
------------------------------------
Devices I can't stand and wish I could replace: SmartThings, Hue, Concerto, VRUSB
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#5
I've never used the logic server but this sounds like something it might be able to resolve. Running average or something?
--Kill all the serial ports--
Reply
#6
what do we care about, though? do you want to try and graph it over time, or do you really want to know when to fill up?

i have my car send an IFTTT trigger when range falls below 75 miles. IFTTT then sends me an SMS (worthless since i drive the car 99.9%) and hits CQC via the Maker channel and writes into the variables driver. the variable field then gets reset every day at noon. it works.

:-D
do the needful ...
Hue | Sonos | Harmony | Elk M1G
Reply
#7
oh sure i totally agree, but my point is that initial testing shows that I can't be so precise that I can wait until I have 1.5 days of gas. I need to get an alert at 45%, thats a little over 2 days of gas. That way I don't have to be super stressed. Assuming the 45% wasn't an outlier where i really have more.
------------------------------------
Devices I can't stand and wish I could replace: SmartThings, Hue, Concerto, VRUSB
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#8
ah, makes sense. but i guess even if the 45% was an outlier, the worst case scenario is you fill up the tank anyways. Smile
do the needful ...
Hue | Sonos | Harmony | Elk M1G
Reply
#9
yep, hence the 45%. I was going to alert at 30%, but in case A)thats an outlier, and B)its too high and the # is really 20%, I wouldn't be able to make the roundtrip.

The gas station is behind my house, so its not like this is a big burden. And I do mean BEHIND, as in, the minimart building is the width of our backyard. (houses here are sideways, 40' wide lots but 100' deep).

What I would really love is for the system to text the wife saying "You just drove IVBs car and left it in the driveway with no gas. Wouldn't it be fun to go get gas now? Lets go, i'm buying!" She has an iPhone, no tasker, so thats not possible. Um, yeah, thats the reason i'm not coding that.
------------------------------------
Devices I can't stand and wish I could replace: SmartThings, Hue, Concerto, VRUSB
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#10
Here you go, the bar has now been raised...

Hacker Turns On His Car With Amazon Echo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)