Coder Social home page Coder Social logo

comfoairq-mqtt's Introduction

Hi there yo

Linkedin Badge Gmail Badge StackOverflow Badge

I'm Andrea, a backend developer with a solid foundation in TypeScript and Node.js, specializing in creating efficient, scalable solutions. My approach to problem-solving is extremely rational, allowing me to navigate complex challenges with clarity and precision. My technical expertise and methodical thinking enable me to deliver high-quality results in every project I undertake. Passionate about coding and continuous improvement, I thrive on turning intricate problems into seamlessly functioning backend systems.

comfoairq-mqtt's People

Contributors

vekexasia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

comfoairq-mqtt's Issues

general settings

I am a beginner and need help. which IP and user names do I have to enter in the .env file?

Need some help please

Hi,

I really could use some help with this part:
_Provided you've the necessary hardware, you need to create the .env file based on the .env-sample file with the proper environment variables.

Prerequisites:

node.js > 10
pm2 installed (npm i pm2 -g)
Steps:

clone this repository
run npm i or yarn
use pm2 start pm2.config.js
If you want to enable this project to run at startup then issue pm2 startup_

I have no clue what i'm supposed to do with this in home assistant.

Thanks in advance for some help!

Commented code and temperature == 0

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

Wrong temperature transformation

Just for information. Transformation for temperatures in Celcius for negative values is wrong.
Negative values use following nomenclature:

b'\xDF\xFF'

instead for positive:

b'\xDF\x00'

so using default transformation for negative values give value: 6550,3 C, which is wrong. It is correct for positive values as the first byte is '\x00' in that case, and does not have any influence on whole value.

I changed int16 temperature transformation to:

const int16 = (v1, v2) => v1 - v2;

Another change in this case should be *_air_humidity which cannot be negative and values are uint16.

After these changes all values are correctly parsed:

image

Unable to switch to automatic mode after manual

I can change the device speed with command "ventilation_level"
This command changes the device to manual and set the speed to 2.

When I send the command "auto" or "set_mode" to auto the device stays in manual mode.
Here is the generated message:
Topic name:auto
T1F010051485150801
received reply
T1F030051485150801
received reply

unable to write ComfoAir

Hi,
At the beginning big thanks for your soft!
I would like to ask you for help. For the first time I installed it all was OK. Someday I realized that I cannot send any message to recuperator.
I receive all data correctly. See example:

Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/ah_actual', ... (4 bytes))
6.37
Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/exhaust_fan_speed', ... (4 bytes))
2239
Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/next_fan_change', ... (5 bytes))
11459
Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/supply_fan_flow', ... (3 bytes))
126

However I want to send anything like:

Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/commands/ventilation_level_3', ... (1 bytes)) 0

Nothing happens. I was suspecting some HW errors but with:
/djwlindenaar/zcan
I can send messages to my AerisNEXT, but with your soft looks like there is no communication when I try to send anything, at least it is not understandable.
When I click to send MQTT message on PM2 I receive following log:

0|comfoair_mqttbridge | canID addr: 1f054051
0|comfoair_mqttbridge | T1F05405180084150101000000
0|comfoair_mqttbridge | T1F054051781000100000003
0|comfoair_mqttbridge | received reply
0|comfoair_mqttbridge | received reply line: <Buffer 5a>
0|comfoair_mqttbridge | received reply
0|comfoair_mqttbridge | received reply line: <Buffer 5a>
0|comfoair_mqttbridge | canID addr: 1f074051
0|comfoair_mqttbridge | T1F07405180084150101000000
0|comfoair_mqttbridge | T1F074051781000100000003
0|comfoair_mqttbridge | received reply
0|comfoair_mqttbridge | received reply line: <Buffer 5a>
0|comfoair_mqttbridge | received reply
0|comfoair_mqttbridge | received reply line: <Buffer 5a>

but nothing changes, no boost, no ventilation level change. Would you mind helping me what else should i check or test?
This is console at the moment I clicked Boost 60 mode:
image

Below there is /zcan log setting boost 60:

~/djwlindenaar/zcan$ ./slcan_boost_60
Received: can_id=144061, can_dlc=4, data=b'\xe6(\x00\x00'
Received: can_id=1e8061, can_dlc=2, data=b'U\x04'
Received: can_id=4c4061, can_dlc=2, data=b'\x0f\x00'
Received: can_id=1d4061, can_dlc=1, data=b';'
Received: can_id=1e4061, can_dlc=2, data=b'\xd3\x08'
Received: can_id=10000021, can_dlc=0, data=b''
0X0021
1F015851#0084150106000000
1F015851#8100100E000000
Reply: 0X1F001461

support for RS485 CAN hat

I see that currently only USBtin is supported. Would it be possible to also support the RS485 CAN hat for the raspberry pi, made by waveshare: https://www.waveshare.com/rs485-can-hat.htm

I have this device on a pi zero w. It's visible as a can0 network interface:

$ ifconfig can0
can0: flags=193<UP,RUNNING,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 2382522 bytes 3877541 (3.6 MiB)
RX errors 1 dropped 221 overruns 0 frame 1
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

and I'm able to see the can traffic:

$ candump can0
can0 004C4041 [2] 24 00
can0 001E4041 [2] 8F 05
can0 00354041 [2] 06 04
can0 10000002 [0]
can0 00804042 [2] 0C 00
can0 10000001 [0]
can0 001DC041 [2] C5 00
can0 001E8041 [2] 4A 05
can0 004C8041 [2] 25 00
can0 001E4041 [2] 8E 05

No read-write usb-can

In log I see the stream received from machine.
With mqtt.publish I send comfoair/commands/ventilation_level_3 , I see it in log, but machine doesn't change.
I may be wrong something, anyway I turn to https://github.com/gytisgreitai/zehnder-can-mqtt, in python, and it works fine and autotomatically populate configuration to homeassistant via mqtt.

Any chance to use this with RPi 0 + CAN HAT

Hi, is there any way to use this project with a very neat setup as below:
Raspberry Pi Zero + RS485 / CAN HAT for Rapsberry (uses MCP2515 and SN65HVD230 CAN module)?

That would be great to package it as a very nice looking solution (no soldering, no wires, etc.).

External setpoint

Hello,

is there a change to write the "External setpoint"?"

grafik

thank you :)

Init USB-CAN

Ciao @vekexasia , in questo issue: marco-hoyer/zcan#1 (comment)
hai scritto:

Apparently i had commented out from my code the S2\r and 0\r code. So the usbtin never initialized itself....

vedo in index.ts e dist/index.js che queste righe sono ancora commentate.
In VS Code mi da errore in index.ts:96 "r();" , pare che manchi un void...
Quindi tsc non compila.

Da Home Assistant / Sviluppo lancio con mqtt.publish i comandi, e nel console log di pm2 start pm2.config.js vedo
che la porta è aperta e i messaggi lanciati con mqtt.publish si tramutano in steam dati per la porta seriale. Ma il led sulla ComfoAir lampeggia veloce e nel suo display non cambia nulla.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.