Bli medlem i Norsk elbilforening og støtt driften av Elbilforum. Som medlem får du i tillegg startpakke, medlemsfordeler og gode tips om elbil og lading. Du blir med i et fellesskap som jobber for mindre utslipp fra veitrafikken. Medlemskap koster 510 kroner per år. elbil.no/medlemskap

Skrevet av Emne: OVMS for Think  (Lest 44089 ganger)

habazot

  • Jr. Member
  • **
  • Innlegg: 45
  • Plastic Fantastic
    • Vis profil
Sv: OVMS for Think
« Svar #45 på: Fredag 16. August 2013, klokken 17:57 »
Great! In my opinion the yellow one has the best angle and is most similar to the other images in the apps.
It might be possible to trick the color as well as the transparent background, I'll see if I can convince someone with Photoshop/Gimp skills...
Bergen
- Think City 2008 - 43000km

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #46 på: ſøndag 18. August 2013, klokken 00:32 »
Update:
I have a very good progress on the SW development. Currently v.1 is stable and forwards all possible parameter (at the time) to the app. I uses standard SMS-handeling, which limits the selection of parameter to display.

Next I have made a successful beta-test of vehicle_thinkcity.c v.2 (which of course is not uploaded to Github yet).
I have put in the internal SMS handling structure as the vehicle_twizy.c and managed to pull customized parameters from one of the self made commands.

This offers the possibility to interrogate the car with our own groups of SMS-commands. E.g. "WARN" if you want to pull warnings/alarms/flag status/etc.

The OVMS is a very cool gadget :)
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #47 på: ſøndag 18. August 2013, klokken 12:04 »
Still waiting for my hw, shipment got stuck, restocking, bla bla..
If your airbag lamp is always lit on your car, which means your RAC-unit is defect, I recommend you to remove it.
Then you have access to the GPS- and GSM-connectors, and the connector for can_h /can_l/+12V (and the wire which should be grounded if airbag (SRS) unit is OK.)
BauDemo is selling a nice unit, which check if SRS-system is OK and turns off the lamp. Plug and play :)
It's  some quirky job to remove the RAC, but I recommend it :)
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

habazot

  • Jr. Member
  • **
  • Innlegg: 45
  • Plastic Fantastic
    • Vis profil
Sv: OVMS for Think
« Svar #48 på: ſøndag 18. August 2013, klokken 23:42 »
Still waiting for my hw, shipment got stuck, restocking, bla bla..
If your airbag lamp is always lit on your car, which means your RAC-unit is defect, I recommend you to remove it.

It is actually not broke, yet :)
Considering to remove it anyway, because it is not used per se.?..
Or what is the status on the RAC unit, not much documentation around..
Btw, my OVMS hw is finally in the mail..

Then you have access to the GPS- and GSM-connectors, and the connector for can_h /can_l/+12V (and the wire which should be grounded if airbag (SRS) unit is OK.)

Exactly..
I replaced the stereo today and saw the GSM and GPS antenna cables, so it's there..
I might put the stereo replacement process in a separate thread..
Bergen
- Think City 2008 - 43000km

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #49 på: Mandag 19. August 2013, klokken 01:44 »
I have commited v2.0 of vehicle_thinkcity.c tonight.
SMS is migrated  from the standard handler to the vehicle-file. This makes it possible to create our own SMS-commands.
Currently two commands are available:
  STAT: prints Charge state,AC-voltage/current (during charging), SOC, batt temp, PCU temp, aux batt voltage, traction battery voltage and current.
 DEBUG: prints flags/variables like SOC, Charge Enable, Open Circuit Voltage Measurement, End of Charge, Doors1 (PCS connected) and Charge status.
  HELP: This command should return a list of available commands ("STAT, DEBUG, HELP"), but ironically it's not working... I have tried a lot, but had to skip it for now.

I'll guess my changes will be migrated to the master project within a day or two :)
Attached is my latest hex-file which I have tested OK (all except SMS "HELP").

@habazot:
Regards to the RAC. If it's working and your airbag lamp if functional, you should leave it. There is no support for the RAC and it's only purpose is relaying SRS OK signal to the instrument panel.
If possible, try to release the GSM and GPS-connectors from the RAC for OVMS-usage. You'll need some very long hands, a flexible spine, and lot of patients ;)
« Siste redigering: Mandag 19. August 2013, klokken 21:42 av hma »
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #50 på: Mandag 19. August 2013, klokken 21:50 »
v2.1 is committes. and can be downloaded here. It's been 'pull requested', and I'll guess Mark will merge the changes to the master within a day :)

Changes:
- SMS command "HELP" is fixed
- New Think parameters added
- SMS command "FAULT" is added, which displays some known "registered" errors (Failed Cells, Crash, ISO-error, etc). I hope someone with better programming skills can contribute here and make some kind of logic that counts active messages and display if active only...

Next up is integrating the Charge Alert SMS commands (SMS command CA).
« Siste redigering: Mandag 26. August 2013, klokken 23:42 av hma »
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #51 på: Mandag 26. August 2013, klokken 23:57 »
Latest version v2.2 is attached.
  - Motor, PCU and ambient temp is present in both SMS "stat" and app. Charger temp is available in SMS.
    (Those values are not preset or are stale when key is off)
  - SMS "fault" lists number of failed cells, active errors/notifications/flags/warnings and count them if present.

Lessons learned:
  - If attaching both Duinomite and Ovms to the can-bus, both units have to be powered on at the same time. If    Duinomite is of while Ovms is on, the Ovms wont read the can-bus
  - To allow transmitting on the can-bus (to retrieve motor- and PCU-temp or functions like door locks) one need to activate feature 15 by sending SMS "FEATURE 15 1" or setting feature 15 to "1" in the app.
  - Don't do complicated developement on the Ovms...

I will do some tests on the current version and commit to GitHub if stable.


I'm pretty happy with the way Ovms works by now, and I need a break to gain new motivation :)

Remaining work is:
  - SOC/Charge alert
  - Remote doorlock / Eberspächer/Webasto from SMS and/or app.
    (need hw modification on the Ovms or using Duinomite as a relay/gateway)
  - Uploading transparent Think-png's to the app.
« Siste redigering: Tirsdag 27. August 2013, klokken 21:34 av hma »
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #52 på: Tirsdag 27. August 2013, klokken 21:42 »
OVMS master is upgraded from 2.5.1 to 2.5.2, and I have merged and tested the Think City specific adaption.

All changes are committed to Github and will be available within a few days.

Attached is the hex-file which can be used to flash the module.
The screen shots shows the sms-interaction and the new parameters in the app.

« Siste redigering: Mandag 02. ſeptember 2013, klokken 19:02 av hma »
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

habazot

  • Jr. Member
  • **
  • Innlegg: 45
  • Plastic Fantastic
    • Vis profil
Sv: OVMS for Think
« Svar #53 på: Onsdag 28. August 2013, klokken 11:57 »
I finally got my OVMS hardware yesterday and installed it immediately.. :)
After a few initial programming and SMS issues I got it up and working, juhuu!!
I used the bundled antennas just to get started, but plan on stealing the RAC cables soon.

You have done a nice job, hma, thank you for all your hard efforts, much appreciated!
I will try to build my own hex files as soon as the latest edits are in place and see if there is anything I can contribute with. We should aim for "official" Think support in both the controller and the apps including the images. But it is a very usable product at this stage.

On a separate note I installed a OBDII bluetooth dongle and managed to dump some of the CAN traffic. With a bit of clever filtering we might be able to reverse-engineer some more data.
If anyone has more specs or any info/screendumps/whatever it would be appreciated, I currently only have ezmon.bas/OVMS and a screenshot of a partially decoded CAN dump. Send me a PM if you like. Any relevant info could save us bucketloads of time.. :)

I will also look into using the DIAG port on the device to communicate with a RaspberryPi or similar.
And also maybe just write an Android app running on a 5-10" tablet communicating with a bluetooth dongle to present whatever it can find on the CAN bus. Since one can get a cheap tablet with both GPRS, GPS, touch panel, ++ it could almost replace all of the above. Probably uses too much power, though, but could be a low threshold, non-intrusive solution to a lot of people.

Still looking for that 25th hour to do all of this stuff.. ;)
Bergen
- Think City 2008 - 43000km

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #54 på: Onsdag 28. August 2013, klokken 13:52 »
You have done a nice job, hma, thank you for all your hard efforts, much appreciated!
I will try to build my own hex files as soon as the latest edits are in place and see if there is anything I can contribute with. We should aim for "official" Think support in both the controller and the apps including the images.
Thanks! Good to hear you got it working :)

For my personal choice; what I currently have achieved with the Ovms, is the functionality I was looking for in the first place. Being able to poll the SOC and charge status from the palm of my hand, was my initial goal.

Reverse engineering the ECU-messages is difficult, and some times you just have to be lucky to find what you are looking for.
Think City have both CAN and K-line connected to their ECU's, hence the approach of pulling data is different.
Some CAN-messages are broadcasted, you can read them directly, but some data have to be requested, like the motor temperature.

I'm not yet sure if the door locks can be triggered by the CAN, because it's controlled by the GEM ECU (which is wired K-line only).

It would be nice if you managed to implement SOC alert (feature #9 Minimum SOC), to trigger a push notification/SMS if car_soc < minSOC.
Also charge alert if e.g. charging is interrupted due to certain criteria.
Charge alert is implemented in the vehicle_twizy.c and the SOC-alert is a standard feature.

Also, when I remember it, I have committed my work to the "v2_experimental" project. From build 2.5.2 the main project has been splitted to vehicle specific versions to reduce memory usage.

Think source code from master:
https://github.com/markwj/Open-Vehicle-Monitoring-System/blob/master/vehicle/OVMS.X/vehicle_thinkcity.c
« Siste redigering: Onsdag 28. August 2013, klokken 15:24 av hma »
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #55 på: Mandag 02. ſeptember 2013, klokken 19:08 »
Latest fw attached.
Bugfix to get feature GPS streaming working:
 - car_speed set (also added in the print of SMS "STAT")
 - car_doors1bits.CarON = 1 when tc_bit_dischgenbl is set (car is 'on' when discharge is allowed)

GPS streaming is activated either by SMS "FEATURE 9 1" or in the App -> Control -> Feature.
When activated car position is streamed to the app in realtime. When deactivated the map is updated every 1-2 minutes
« Siste redigering: ſøndag 22. ſeptember 2013, klokken 22:42 av hma »
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #56 på: Lørdag 07. ſeptember 2013, klokken 20:43 »
Final version! Had some time with Photo Shop and managed to manipulate the colors and make multi color duplicates from one image.
« Siste redigering: Lørdag 07. ſeptember 2013, klokken 21:28 av hma »
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

Lynet

  • Medlem i Elbilforeningen siden 2013
  • Gold Member
  • ******
  • Innlegg: 3136
    • Vis profil
Sv: OVMS for Think
« Svar #57 på: Lørdag 07. ſeptember 2013, klokken 22:50 »
Utrolig hva du greier HMA  :D mens jeg har kjørt Leaf 190km med 2,5 time ladepause halvveis i dag.
Trondheim:
Tesla X100D 2019 modell.

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #58 på: ſøndag 08. ſeptember 2013, klokken 12:20 »
Herlig, 190km på en dag med en liten ladepause er jo knallbra med Leafen :-)

Ellers, Think-bilder kommer ved neste oppgradering av appen, både på Android og iOS. :)
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)

hma

  • Gold Member
  • ******
  • Innlegg: 1571
    • Vis profil
Sv: OVMS for Think
« Svar #59 på: ſøndag 22. ſeptember 2013, klokken 22:41 »
Latest fw is attached. Feature control of central locks (require some additional hw). If you are interested in how, post here.
Still waiting for the next upgrade of the app with the new Think images.
 
« Siste redigering: Tirsdag 24. ſeptember 2013, klokken 00:46 av hma »
- Toyota Rav4 EV 2000 NiMH (06/2010), Hyundai Ioniq 5 P45 (08-2021)
   (tidl.: Think 2000 NiCd (06/2009-05/2012) - Think City 2010 Zebra (03/2012-10/2012) - Think City 2009 Zebra (05/2012-05/2014)  - Tesla Model S85 2014 (06/2014-09/2017) - Nissan Leaf 2018 LE 40kWh (04/2018-12/2018) - Tesla Model S75D (12/2018-06/2021) )
- Trondheim (Trøndelag Elbilforening 02/2012-04/2014)
- Ariens AMP 24 to-trinns snøfreser 48V litium 52,5Ahr (10/2012)