CCS811 über Node Red ausgeben lassen

    • Best Answer

    Habe im Funktion Baustein jetzt alles was msg.payload war zu string.getMeasurement geändert,

    Ich glaube Du solltest Dich noch ein wenig in NodeRed einlesen :shy: Womit Du gerade kaempfst sind ziemliche NodeRed Basics ;)

    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds, 28.9.2003


    Hast Du die Woche schon Deine Raspberry gesichert =O Bei mir tut das raspiBackup automatisch ;)

  • framp Ja genau das hab ich danach dann auch eingegeben, geht leider immer noch nicht ^^ also im Dashboard wird nichts angezeigt.
    Könnte der Fehler bei der Dashboard node liegen? muss ich da vielleicht noch irgendetwas ändern?


    raspbastler , welchen Sensor würdest du denn nehmen wenn es ums messen der selben Sachen geht ?

  • also im Dashboard wird nichts angezeigt.

    Da ich keinen Sensor habe musste ich Fakedaten in Deinen Node reinschieben und mit dem wurden auch Daten angezeigt im Dashboard. Zum Test habe ich Deinen Flow genommen. D.h. eigentlich ist alles soweit OK. Anbei mein Fakeflow. Vielleicht hilft es Dir die Ursache zu finden.


    Code
    [{"id":"b6fe48fb.bda52","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"719435c4.f3221c","type":"function","z":"b6fe48fb.bda52","name":"Auslesen des GY-BME280 & CCS811","func":"msg.payload.temperature_C = Math.round(msg.payload.temperature_C*100) / 100;\nmsg.payload.humidity = Math.round(msg.payload.humidity*10) / 10;\nmsg.payload.pressure_hPa = Math.round(msg.payload.pressure_hPa*10) / 10;\nmsg.payload.eCO2_ppm = Math.round(msg.payload.eCO2_ppm*10) / 10;\n\nreturn [\n    { payload: msg.payload.temperature_C },\n    { payload: msg.payload.humidity },\n    { payload: msg.payload.pressure_hPa },\n    { payload: msg.payload.eCo2_ppm }\n    ]","outputs":4,"noerr":0,"x":750,"y":460,"wires":[["784cb73d.0ff408","77fe1124.92e66","ca723bbd.e83668"],["269b99cb.b911f6","b3836122.c156c"],["31630e94.b6a7aa","ac0ad3a7.ef51a"],["49179bef.5a457c","89844e4d.95a43"]]},{"id":"784cb73d.0ff408","type":"ui_gauge","z":"b6fe48fb.bda52","name":"Temperatur","group":"7f3e941e.433eac","order":1,"width":0,"height":0,"gtype":"donut","title":"Temperatur","label":"°C","format":"{{value}}","min":"18","max":"30","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1110,"y":320,"wires":[]},{"id":"269b99cb.b911f6","type":"ui_gauge","z":"b6fe48fb.bda52","name":"Luftfeuchtigkeit","group":"f5f8edc9.893628","order":1,"width":0,"height":0,"gtype":"donut","title":"Luftfeuchtigkeit","label":"%","format":"{{value}}","min":"30","max":"75","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1120,"y":400,"wires":[]},{"id":"49179bef.5a457c","type":"ui_gauge","z":"b6fe48fb.bda52","name":"CO2 Konzentration ","group":"832af645.9e0b18","order":1,"width":0,"height":0,"gtype":"donut","title":"CO2 Konzentration","label":"%","format":"{{value}}","min":0,"max":"15","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1130,"y":560,"wires":[]},{"id":"31630e94.b6a7aa","type":"ui_gauge","z":"b6fe48fb.bda52","name":"Luftdruck","group":"b105c6a3.475f3","order":1,"width":0,"height":0,"gtype":"donut","title":"Luftdruck","label":"hPa","format":"{{value}}","min":"900","max":"1100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1100,"y":480,"wires":[]},{"id":"77fe1124.92e66","type":"ui_chart","z":"b6fe48fb.bda52","name":"","group":"7f3e941e.433eac","order":2,"width":8,"height":"8","label":"Temperatur_chart","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"10","ymax":"35","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":true,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#db2929","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"x":1130,"y":360,"wires":[[]]},{"id":"b3836122.c156c","type":"ui_chart","z":"b6fe48fb.bda52","name":"Luftfeuchtigkeit_Chart","group":"f5f8edc9.893628","order":2,"width":"8","height":"8","label":"Luftfeuchtigkeit_Chart","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"30","ymax":"75","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":true,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"x":1140,"y":440,"wires":[[]]},{"id":"ac0ad3a7.ef51a","type":"ui_chart","z":"b6fe48fb.bda52","name":"Luftdruck_Chart","group":"b105c6a3.475f3","order":2,"width":"8","height":"8","label":"Luftdruck_Chart","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"900","ymax":"1100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":true,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"x":1120,"y":520,"wires":[[]]},{"id":"89844e4d.95a43","type":"ui_chart","z":"b6fe48fb.bda52","name":"CO2_Konzentration_Chart","group":"832af645.9e0b18","order":2,"width":"8","height":"8","label":"CO2_Konzentration_Chart","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"20","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":true,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"x":1160,"y":600,"wires":[[]]},{"id":"8587fecd.075108","type":"inject","z":"b6fe48fb.bda52","name":"","topic":"","payload":"{\"temperature_C\":10,\"humidity\":20,\"pressure_hPa\":30,\"eCo2_ppm\":40}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":490,"y":360,"wires":[["719435c4.f3221c","393dbb29.ae7e0c"]]},{"id":"ca723bbd.e83668","type":"debug","z":"b6fe48fb.bda52","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":940,"y":240,"wires":[]},{"id":"393dbb29.ae7e0c","type":"debug","z":"b6fe48fb.bda52","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":200,"wires":[]},{"id":"7f3e941e.433eac","type":"ui_group","name":"Temperatur","tab":"cf3eb6d0.b5de88","order":1,"disp":true,"width":8,"collapse":false},{"id":"f5f8edc9.893628","type":"ui_group","name":"Luftfeuchtigkeit","tab":"cf3eb6d0.b5de88","order":2,"disp":true,"width":8,"collapse":false},{"id":"832af645.9e0b18","type":"ui_group","name":"CO2 Konzentration","tab":"cf3eb6d0.b5de88","order":4,"disp":true,"width":8,"collapse":false},{"id":"b105c6a3.475f3","type":"ui_group","name":"Luftdruck","tab":"cf3eb6d0.b5de88","order":3,"disp":true,"width":8,"collapse":false},{"id":"cf3eb6d0.b5de88","type":"ui_tab","name":"Messdaten","icon":"dashboard","disabled":false,"hidden":false}]

    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds, 28.9.2003


    Hast Du die Woche schon Deine Raspberry gesichert =O Bei mir tut das raspiBackup automatisch ;)

  • Hab den Fehler gefunden:

    msg.payload.eCO2 = Math.round(msg.payload.eCO2*10) / 10;

    In der Zeile darf nur "eCO2" stehen und nicht "eCO2_ppm", dann geht das alles.

    danke dir auf jeden Fall für deine ganze Hilfe !

    Hast mir sehr geholfen. :)

  • In der Zeile darf nur "eCO2" stehen und nicht "eCO2_ppm", dann geht das alles.

    Verstehe ich jetzt nicht ganz - aber ich bin jetzt zu faul noch mal in den Flow reinzusehen :no_sad: Wenn es denn jetzt funktioniert ist es doch gut :)

    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds, 28.9.2003


    Hast Du die Woche schon Deine Raspberry gesichert =O Bei mir tut das raspiBackup automatisch ;)

  • CO2 Ampeln sind gerade sehr in Mode. Ist nur bloed wenn sie gruen statt rot anzeigen :wallbash:

    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds, 28.9.2003


    Hast Du die Woche schon Deine Raspberry gesichert =O Bei mir tut das raspiBackup automatisch ;)