rsmeral / node-red-contrib-scd30

Node-RED integration for Sensirion SCD30, the CO2, temperature, and humidity sensor.
MIT License
1 stars 3 forks source link

SCd4x #1

Closed okesako closed 2 years ago

okesako commented 2 years ago

It's possible to use this node with the sensirion scd41 ?

It's in development a node-red-contrib-scd4x?

Thanks for your job.

rsmeral commented 2 years ago

I don't have a SCD41, so I can't test it. But after a brief look at the data sheet, it's not gonna work right away, because the address of the device and command addresses are different from SCD30. Shouldn't be too hard to add the support though. I think I'd keep it in this same package.

Would you be able to test a development version if I made the changes?

okesako commented 2 years ago

Of course. First, Thanks a lot to reply this message.

We are inside a zerocovid project at school and we have adquired 4 units to test de Co2 in differents classrooms. The address of the device is 0x62 and the Raspberry detect it correctly( with a python script published in Github) and read and show co2, temperature and humidity data in console mode.

I could share with you all the information that I can be obtained from the sensor.

Do you need my email or any other information to be in contact?.

Thanks again.

rsmeral commented 2 years ago

Hi @okesako,

I just published node-red-contrib-scd4x to NPM – I decided to go with a separate package in the end. I just tried to implement all commands as per the new specification (quite a few have changed compared to the SCD30), but didn't have any way to test this.

Would you be able to test whether it works? Can you test the node even before I publish it (see Testing a node module locally)?

Sorry this took a while.

okesako commented 2 years ago

response_container_BBPPID{font-family: initial; font-size:initial; color: initial;} Thanks a lot.Tomorrow morning I'll try it and send you the feedback.Thanks again for your job. Enviado por Bandeja de entrada de BlackBerry Hub+ para Android De: @.: 28 de noviembre de 2021 16:24Para: @. a: @.: @.; @.***: Re: [rsmeral/node-red-contrib-scd30] SCd4x (Issue #1)

Hi @okesako,

just published node-red-contrib-scd4x to NPM – I decided to go with a separate package in the end.

I just tried to implement all commands as per the new specification (quite a few have changed compared to the SCD30),

but didn't have any way to test this.

Would you be able to test whether it works? Can you test the node even before I publish it (see Testing a node module locally)?

Sorry this took a while.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.

Beharrezkoa da mezu hau inprimatzea? Babestu dezagun ingurumena | ¿Necesita imprimir este mensaje? Protejamos el medio ambiente | Do you need to print this message? Let's protect the environmentInformazioaren Gizarteko Zerbitzuei eta Merkataritza Elektronikoari buruzko uztailaren 11ko 34/2002  Legea eta Datuak Babesteko abenduaren 5eko 3/2018 Lege Organikoa betetzeko asmoz, jakinarazten dizugu zure helbide elektronikoa fitxategi batean dagoela, zurekin harremanetan jarri ahal izateko eta AEG Ikastetxearen informazioa zuri helarazteko helburuarekin. Sarbide-, zuzentze-, ezereztatze- eta oposizio-eskubidea gauzatzeko, jo ezazu helbide honetara: Heriz Pasealekua, 82 DonostiaEn cumplimiento de la Ley de Servicios de la Sociedad de la Información y del Comercio electrónico 34/2002 de 11 de julio y de la Ley Orgánica de Protección de Datos 3/2018 del 5 de diciembre, le informamos que su dirección de correo electrónico consta en un fichero cuya finalidad es la de mantener el contacto con Vd y remisión de información de AEG Ikastetxea. Puede ejercitar el derecho de acceso, rectificación, cancelación y oposición en la siguiente dirección: Heriz Pasealekua, 82 Donostia-San Sebastián.

okesako commented 2 years ago

Hi Ron. I've installed de package via npm (I think so) but I can't show it in the palette. This is an screen capture of the process [image: image.png]

[image: image.png]

What is wrong?

El dom, 28 nov 2021 a las 16:24, Ron Šmeral @.***>) escribió:

Hi @okesako https://github.com/okesako,

just published node-red-contrib-scd4x https://www.npmjs.com/package/node-red-contrib-scd4x to NPM – I decided to go with a separate package in the end. I just tried to implement all commands as per the new specification (quite a few have changed compared to the SCD30), but didn't have any way to test this.

Would you be able to test whether it works? Can you test the node even before I publish it (see Testing a node module locally https://nodered.org/docs/creating-nodes/packaging#testing-a-node-module-locally )?

Sorry this took a while.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rsmeral/node-red-contrib-scd30/issues/1#issuecomment-981103719, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWSZKHHPM3A4A57NTMHRSQ3UOJCSDANCNFSM5INW2JSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

-- https://www.facebook.com/AEGIKASTETXEA/ https://twitter.com/AEGIkastetxea https://www.instagram.com/aegikastetxea/ https://www.youtube.com/user/aegIkastetxea https://www.linkedin.com/company/aeg-ikastetxea

Beharrezkoa da mezu hau inprimatzea? Babestu dezagun ingurumena | ¿Necesita imprimir este mensaje? Protejamos el medio ambiente | Do you need to print this message? Let's protect the environment

Informazioaren Gizarteko Zerbitzuei eta Merkataritza Elektronikoari buruzko uztailaren 11ko 34/2002  Legea eta Datuak Babesteko abenduaren 5eko 3/2018 Lege Organikoa betetzeko asmoz, jakinarazten dizugu zure helbide elektronikoa fitxategi batean dagoela, zurekin harremanetan jarri ahal izateko eta AEG Ikastetxearen informazioa zuri helarazteko helburuarekin. Sarbide-, zuzentze-, ezereztatze- eta oposizio-eskubidea gauzatzeko, jo ezazu helbide honetara: Heriz Pasealekua, 82 Donostia

En cumplimiento de la Ley de Servicios de la Sociedad de la Información y del Comercio electrónico 34/2002 de 11 de julio y de la Ley Orgánica de Protección de Datos 3/2018 del 5 de diciembre, le informamos que su dirección de correo electrónico consta en un fichero cuya finalidad es la de mantener el contacto con Vd y remisión de información de AEG Ikastetxea. Puede ejercitar el derecho de acceso, rectificación, cancelación y oposición en la siguiente dirección: Heriz Pasealekua, 82 Donostia-San Sebastián.

rsmeral commented 2 years ago

I can't see the images you attached to your email. I think you'd have to attach them through GitHub.

Did you restart Node-RED after npm install?

okesako commented 2 years ago

Hi Ron. . I've reboot the raspberry (node-red it's installed in a raspi 4B). But the new node SCD4 not appear in the palette. I've attached two png images

El lun., 29 nov. 2021 11:31, Ron Šmeral @.***> escribió:

I can't see the images you attached to your email. I think you'd have to attach them through GitHub.

Did you restart Node-RED after npm install?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rsmeral/node-red-contrib-scd30/issues/1#issuecomment-981504848, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWSZKHFYGGWKQHFKDTFZSUTUONJBPANCNFSM5INW2JSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

-- https://www.facebook.com/AEGIKASTETXEA/ https://twitter.com/AEGIkastetxea https://www.instagram.com/aegikastetxea/ https://www.youtube.com/user/aegIkastetxea https://www.linkedin.com/company/aeg-ikastetxea

Beharrezkoa da mezu hau inprimatzea? Babestu dezagun ingurumena | ¿Necesita imprimir este mensaje? Protejamos el medio ambiente | Do you need to print this message? Let's protect the environment

Informazioaren Gizarteko Zerbitzuei eta Merkataritza Elektronikoari buruzko uztailaren 11ko 34/2002  Legea eta Datuak Babesteko abenduaren 5eko 3/2018 Lege Organikoa betetzeko asmoz, jakinarazten dizugu zure helbide elektronikoa fitxategi batean dagoela, zurekin harremanetan jarri ahal izateko eta AEG Ikastetxearen informazioa zuri helarazteko helburuarekin. Sarbide-, zuzentze-, ezereztatze- eta oposizio-eskubidea gauzatzeko, jo ezazu helbide honetara: Heriz Pasealekua, 82 Donostia

En cumplimiento de la Ley de Servicios de la Sociedad de la Información y del Comercio electrónico 34/2002 de 11 de julio y de la Ley Orgánica de Protección de Datos 3/2018 del 5 de diciembre, le informamos que su dirección de correo electrónico consta en un fichero cuya finalidad es la de mantener el contacto con Vd y remisión de información de AEG Ikastetxea. Puede ejercitar el derecho de acceso, rectificación, cancelación y oposición en la siguiente dirección: Heriz Pasealekua, 82 Donostia-San Sebastián.

okesako commented 2 years ago

Another image

El lun, 29 nov 2021 a las 11:31, Ron Šmeral @.***>) escribió:

I can't see the images you attached to your email. I think you'd have to attach them through GitHub.

Did you restart Node-RED after npm install?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rsmeral/node-red-contrib-scd30/issues/1#issuecomment-981504848, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWSZKHFYGGWKQHFKDTFZSUTUONJBPANCNFSM5INW2JSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

-- https://www.facebook.com/AEGIKASTETXEA/ https://twitter.com/AEGIkastetxea https://www.instagram.com/aegikastetxea/ https://www.youtube.com/user/aegIkastetxea https://www.linkedin.com/company/aeg-ikastetxea

Beharrezkoa da mezu hau inprimatzea? Babestu dezagun ingurumena | ¿Necesita imprimir este mensaje? Protejamos el medio ambiente | Do you need to print this message? Let's protect the environment

Informazioaren Gizarteko Zerbitzuei eta Merkataritza Elektronikoari buruzko uztailaren 11ko 34/2002  Legea eta Datuak Babesteko abenduaren 5eko 3/2018 Lege Organikoa betetzeko asmoz, jakinarazten dizugu zure helbide elektronikoa fitxategi batean dagoela, zurekin harremanetan jarri ahal izateko eta AEG Ikastetxearen informazioa zuri helarazteko helburuarekin. Sarbide-, zuzentze-, ezereztatze- eta oposizio-eskubidea gauzatzeko, jo ezazu helbide honetara: Heriz Pasealekua, 82 Donostia

En cumplimiento de la Ley de Servicios de la Sociedad de la Información y del Comercio electrónico 34/2002 de 11 de julio y de la Ley Orgánica de Protección de Datos 3/2018 del 5 de diciembre, le informamos que su dirección de correo electrónico consta en un fichero cuya finalidad es la de mantener el contacto con Vd y remisión de información de AEG Ikastetxea. Puede ejercitar el derecho de acceso, rectificación, cancelación y oposición en la siguiente dirección: Heriz Pasealekua, 82 Donostia-San Sebastián.

rsmeral commented 2 years ago

This is what I see: BAB4A051-188E-4F8C-BC64-E68260E1E00C

okesako commented 2 years ago

Did you received two new emails with attached png images?

El lun, 29 nov 2021 a las 12:02, Ron Šmeral @.***>) escribió:

This is what I see: [image: BAB4A051-188E-4F8C-BC64-E68260E1E00C] https://user-images.githubusercontent.com/1309590/143856601-0b9a7806-df9b-4ca1-9313-8cfa10a06813.jpeg

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rsmeral/node-red-contrib-scd30/issues/1#issuecomment-981526782, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWSZKHC2HW2WPDT5SBRZK4DUONMVDANCNFSM5INW2JSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

-- https://www.facebook.com/AEGIKASTETXEA/ https://twitter.com/AEGIkastetxea https://www.instagram.com/aegikastetxea/ https://www.youtube.com/user/aegIkastetxea https://www.linkedin.com/company/aeg-ikastetxea

Beharrezkoa da mezu hau inprimatzea? Babestu dezagun ingurumena | ¿Necesita imprimir este mensaje? Protejamos el medio ambiente | Do you need to print this message? Let's protect the environment

Informazioaren Gizarteko Zerbitzuei eta Merkataritza Elektronikoari buruzko uztailaren 11ko 34/2002  Legea eta Datuak Babesteko abenduaren 5eko 3/2018 Lege Organikoa betetzeko asmoz, jakinarazten dizugu zure helbide elektronikoa fitxategi batean dagoela, zurekin harremanetan jarri ahal izateko eta AEG Ikastetxearen informazioa zuri helarazteko helburuarekin. Sarbide-, zuzentze-, ezereztatze- eta oposizio-eskubidea gauzatzeko, jo ezazu helbide honetara: Heriz Pasealekua, 82 Donostia

En cumplimiento de la Ley de Servicios de la Sociedad de la Información y del Comercio electrónico 34/2002 de 11 de julio y de la Ley Orgánica de Protección de Datos 3/2018 del 5 de diciembre, le informamos que su dirección de correo electrónico consta en un fichero cuya finalidad es la de mantener el contacto con Vd y remisión de información de AEG Ikastetxea. Puede ejercitar el derecho de acceso, rectificación, cancelación y oposición en la siguiente dirección: Heriz Pasealekua, 82 Donostia-San Sebastián.

okesako commented 2 years ago

node-red1 node-red2 node-red3

okesako commented 2 years ago

I'm sorry. I didn't know that answers by email don't accept images.

okesako commented 2 years ago

I've reboot the raspberry two times, but nothing changed.

rsmeral commented 2 years ago

No worries, I see them now. I see you installed the package in your home directory (~), but for Node-RED to see it, it has to be installed in ~/.node-red

$ cd ~/.node-red
$ npm install node-red-contrib-scd4x
okesako commented 2 years ago

node-red4

okesako commented 2 years ago

I just do it, but the palette not show de scd4x node.

I try reboot the raspberry.

okesako commented 2 years ago

I've run previously "npm audit fix"

okesako commented 2 years ago

node-red5

okesako commented 2 years ago

I've disable SCD30 node but I can't see the new scd4x node

okesako commented 2 years ago

Great! I've remove the SCD30 node and now I see the new scd4x node in the palette.

Now the node show "error" but I think that now I can continue doing probes.

rsmeral commented 2 years ago

Nice! I'll fix the problem with type_already_registered – I think it's because I gave the node a non-unique ID.

Are you seeing any error messages in the Debug panel?

okesako commented 2 years ago

Hi Ron. I've uninstall and install again and thi is the error showed scd41_1 in Debug panel

okesako commented 2 years ago

This is the content of "true" injection node. It's Ok? scd41_2 scd41_3 scd41_4

okesako commented 2 years ago

It's necessary run a command similar to SCD30 to start reading mode? scd41_5

okesako commented 2 years ago

I've tried to install "scd30-cl"i and this is the error showed in the screen scd41_6

rsmeral commented 2 years ago

I've uninstall and install again and thi is the error showed ... EREMOTEIO: remote I/O error, read

It seems the SCD4x has the same requirement as the SCD30 – the I2C master (the Raspberry Pi) must support "clock stretching". However, the Raspberry Pi has a bug in its I2C implementation, causing errors with devices requiring clock stretching. See e.g. http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html

There are two ways to fix this:

  1. Decrease the baud rate of the I2C bus – this will decrease the likelihood of errors
  2. Use software I2C instead – you'll have to connect the SCD4x to different pins

This is the content of "true" injection node. It's Ok?

That's OK. The scd4x node ignores any input.

It's necessary run a command similar to SCD30 to start reading mode?

Most likely yes.

I could try to change the node-red-contrib-scd4x Node-RED integration so that it automatically starts the periodic measurement, or put in a button which would let you start/stop it...

I've tried to install "scd30-cli" and this is the error showed in the screen

The scd30-cli won't work for the SCD4x – I'll try to update it later too (probably create a new package again).

okesako commented 2 years ago

Thanks a lot Ron.

Tomorrow morning I'll change the I2C bus (bus 3, GPIO23,24) as you are indicated and try again.

okesako commented 2 years ago

Hi Ron.

I've made the changes to enable I2c Bus 3 and connect the sensirion on pins 23/24 but the sensor is not detected node-red6

Im trying to discover what's wrong. node-red7

rsmeral commented 2 years ago

I understood from that article that the pins are 16 and 18 (which map in software to GPIO23 and GPIO24). Do you have VDD and GND connected properly?

Screenshot 2021-11-30 at 12 12 38
okesako commented 2 years ago

Hi Ron.

I've checked the wire connections (Vc, Gnd, SDA, SCL) and are OK. When I connect the sensor again to I2C bus 1, the Raspberry recognize It (show id hex62) but if I reconnect the sensoragain to I2c bus 3 theer is not answer in #i2cdetect -y 3

Connected to I2c bus 1 node-red can't recognize the sensor

I'm sorry

rsmeral commented 2 years ago

I'm sorry it's still not working! I've found a thread where someone is trying to solve almost exactly the same problem: https://forums.raspberrypi.com/viewtopic.php?t=224310

Also, you could still try to reduce the baud rate on the i2c bus 1 as suggested here: https://github.com/fivdi/i2c-bus/issues/36#issuecomment-332285312

A few more alternative approaches:

okesako commented 2 years ago

Thank so much Ron.

The sensor it's connected to a Raspberry 4 and the baud raute it's default configured to 10000.

I'll try to configure the rpi-i2c-timings parameters over the raspi 4 and send you again the results.

rsmeral commented 2 years ago

Hi @okesako, did you have any luck getting the sensor to work?

I'm gonna close this issue, since there's now the rsmeral/node-red-contrib-scd4x.

But let me know if there's still something I can fix or help with.