vekexasia / comfoairq-mqtt

Comfoair Q 350 <-> MQTT integration in Node.JS
20 stars 5 forks source link

Commented code and temperature == 0 #10

Open xavan83 opened 9 months ago

xavan83 commented 9 months ago

Hello, I am using an usbtin adapter through my windows laptop. I am able to configure and start you program. However I add to uncomment your commented code: port.open(function (err) { if (err) { return console.log('Error opening port: ', err.message); } console.log('Serial Port open!'); port.write(canMessage.initMessage(), (err) => console.log('initError?', err)); // Because there's no callback to write, write errors will be emitted on the port: port.write('S2\r', (err) => console.log('w', err)); port.write('O\r', (err) => console.log('ww', err)); }); And also add a console.log on the parser function: parser.on('data', (line) => { const strLine =${line}.trim().split('\x07').join(''); console.log(strLine);

After that I started receive data on mqtt. Everything seems fine except for the temperature data. I receive 0 as value: I dont' know if this can help but I am a device with Celsius temperature image