Thanks, Vince, for all this extra work! I'm still having problems but feel
we are close since you got it to work by injecting my data.
I wasn't sure how to feed your flow but here is what I have:
[image: 2021-11-29.png]f
The debug messages (from right hand area of screen) are as follows:
11/29/2021, 3:15:52 PMnode: 7effad75.c88c64 * ******** [from the
CO2_from RAK7244]*
application/18/device/2cf7f12122500013/rx : msg.payload : Object
object
applicationID: "18"
applicationName: "CO2app"
deviceName: "CO2device"
devEUI: "2cf7f12122500013"
txInfo: object
frequency: 904700000
dr: 0
adr: true
fCnt: 251
fPort: 2
data: "AAcAZAA8ANvo"
object: object
11/29/2021, 3:16:03 PMnode: 7effad75.c88c64 ***** [also from the
CO2_from RAK7244; not sure why another came (?)]*
application/18/device/2cf7f12122500013/rx : msg.payload : Object
object
applicationID: "18"
applicationName: "CO2app"
deviceName: "CO2device"
devEUI: "2cf7f12122500013"
txInfo: object
adr: true
fCnt: 252
fPort: 2
data: "AQQQwDkGAIBO"
object: object
11/29/2021, 3:16:03 PMnode: 71dff607.6d0c88 *****[from the
CO2_Value_PPM output--this looks correct]*
msg.payload : Object
{ CO2_Value_PPM: 408 }
11/29/2021, 3:16:03 PMnode: 2056fe20.5f0b7a *****[from the json
output--it stops after this]*
msg : error
"TypeError: Cannot read property 'messages' of undefined"
I wasn't sure what the "topic" should be which you had listed in
publish_to_mqtt so I changed *mytopic* to
*application/18/device/2cf7f12122500013/rx*
Is this correct or should it be CO2_Value_PPM?
Should I remove my function as it seems to cause a conflict with yours? I
was using this in my other setup
with emoncms and it seems to be working there but may not be the correct
form to feed your process.
Please take your time on this, there is no big rush for me. Many thanks!
Bob
On Monday, November 29, 2021 at 2:25:49 PM UTC-5 vince wrote:
> I took a few minutes to relearn node-red a bit and got it to work by
> injecting your starting json and emitting mqtt to a mosquitto broker on the
> same node. Works fine here.
>
> I've attached the flows and details for the various nodes as images and
> the whole thing as a json you can try yourself. The key seems to be
> setting "format JSON string" in the json node.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/24ce1084-07d9-42d1-bb2e-3a81304a6300n%40googlegroups.com.