What is ID 0x154? I see data FF,FF,E1,FF,FF,1B,98,25.
I have a hunch we need 5x full power on our heater elements so use FF as values. Might be worth a try.
What is ID 0x154? I see data FF,FF,E1,FF,FF,1B,98,25.
Damn, the same for me. Now i found that 0x154 has something to do with immobilizer .Bigpie wrote: ↑Fri Nov 05, 2021 8:58 pm Duno, will have a play tomorrow. I've found someone with a 2016 willing to log but got to post him and arduino and mcp2515 on perf board
**EDIT**
Tested your hunch with 0x154 -> FF FF FF FF FF 1B 98 25 and no cigar
Should have a log from a 2016 with the heater running next weekend.
Got something to please you. I've not had chance to play it back to the heater yet, but 0x398 is in there.arber333 wrote: ↑Mon Nov 08, 2021 9:12 amDamn, the same for me. Now i found that 0x154 has something to do with immobilizer .Bigpie wrote: ↑Fri Nov 05, 2021 8:58 pm Duno, will have a play tomorrow. I've found someone with a 2016 willing to log but got to post him and arduino and mcp2515 on perf board
**EDIT**
Tested your hunch with 0x154 -> FF FF FF FF FF 1B 98 25 and no cigar
Should have a log from a 2016 with the heater running next weekend.
I hope you get that log...
Code: Select all
03 50 A2 4D 00 00 00 00
I see byte 0 is 0x03 would this mean status?Bigpie wrote: ↑Wed Nov 10, 2021 9:36 am byte 2 seems to control power/temperature but not sure how yet. Working on a DBC file: https://github.com/jamiejones85/DBC-fil ... Heater.dbc
So it works? We would just need to command start and we can use heater reporting to stop CAN telegram. I will try to wire something here.
ThanksBigpie wrote: ↑Wed Nov 10, 2021 4:55 pm https://github.com/jamiejones85/OutlanderHeaterControl can control it, it's hardcoded for 50 degrees and heating on for now, it overshoots the desired temperature but it works.
Code: Select all
if(Heatertemp > 70) { // if temp is higher than 70deg
outframe.data.bytes[2]=0x00; // when 70deg power goes to 0A
}
else if(Heatertemp > 65) { // if temp is higher than 65deg
outframe.data.bytes[2]=0x32; // seems to be current command (dec/10)
}
else {
outframe.data.bytes[2]=0xA2;
}
Code: Select all
void loop()
{
CAN_FRAME incoming;
if (Can0.available() > 0) {
Can0.read(incoming);
if(incoming.id==0x398){
Htemp=incoming.data.bytes[3] ;
Heatertemp=Htemp-40;
}
if (digitalRead(Enable_pin) == HIGH) { // if Enable_pin senses ignition
if(millis()-lastime > myVars.transmitime) //Nominally set for 120ms - do stuff on 120 ms non-interrupt clock
{
lastime=millis(); //Zero our timer
sendCANframeD();
printstatus();
}
digitalWrite(DCDC_active,HIGH); // turn on DCDC_active relay
}
else {
digitalWrite(DCDC_active,LOW); // turn off DCDC_active relay
pwm.stop( 6 );
}
......................
void sendCANframeD() { // Heater
outframe.id = 0x188; // 0x188 03 50 A2 40 00 00 00 00
outframe.length = 8; // Data payload 8 bytes
outframe.extended = 0; // Extended addresses - 0=11-bit 1=29bit
outframe.rtr=1; //No request
if(digitalRead(Heater_pin) == LOW) { // if heater pin is ON
outframe.data.bytes[0]=0x03; // when 55deg power goes to 0A
}
else {
outframe.data.bytes[0]=0x00;
}
outframe.data.bytes[1]=0x50; // 50 works
if(Heatertemp > 55) { // if temp is higher than 55deg
outframe.data.bytes[2]=0x00; // when 55deg power goes to 0A
}
else if(Heatertemp > 50) { // if temp is higher than 50deg
outframe.data.bytes[2]=0x32; // seems to be current command (dec/10)
}
else {
outframe.data.bytes[2]=0xA2;
}
outframe.data.bytes[3]=0x40; // 40 works
outframe.data.bytes[4]=0x00; //
outframe.data.bytes[5]=0x00; //
outframe.data.bytes[6]=0x00;
outframe.data.bytes[7]=0x00;
if(debug) {printFrame(&outframe,1);} //If the debug variable is set, show our transmitted frame
if(myVars.CANport==0) Can0.sendFrame(outframe); //Mail it
else Can1.sendFrame(outframe);
}
Code: Select all
//Declaration
CM_0x188_Control Obj_0x188_Control;
CM_0x398_Status Obj_0x398_Status;
//An small example
if (Obj_0x398_Status.HeaterStatus == ENU_Heater_Not_Heating)
{
Obj_0x188_Control.AmpRequest +=1;
}
//We need to feed it our 8Bytes to disassemble it..
//This is done offcourse in the callback method where we receive our canbus message etc..
Obj_0x398_Status.setBytes((uint8_t*)&data[0] ); //The idea is that this is the typical 32Bit array[2] in many applications..
//We can ask it to give back our 8Bytes constructed...
//This is done where we are sending our messages out.
uint8_t len = Obj_0x188_Control.getDataLen();
uint8_t* pdata = Obj_0x188_Control.getBytes(); // this is the internal adress of where our constructed data is so we can simply do:
objcan->Send(0x188,(uint32_t*)pdata , len);//send on CAN1