Hello there to all of you!
I am happy to be part of the Victron community!
I am trying to setup a ESP32 with Espruino firmware and connect all to 100/30 Smart Victron Solar controller https://www.espruino.com/ESP32#serial-uart-example
I have connected the rx and tx to ESP32 on D4 and D15 they are Serial UART compatible.
I am reading the information as follow
Serial2.setup(19200, { tx: D4, rx: D15 }); Serial2.on('data', function(data) { const res = data.split("\r"); console.log("-------------"); console.log(data, res); });
What i got is different every time when the controller sends a message and it looks like this
PID 0xA056íë÷ûÊrÕCKJ V 12690 IÉ¿ÿoCS 0 MPPT 0 OR 0x¿¿ë+%ON H19 653 H20í½ÿÿk?1 H23 326 HSDS 1²íÿ [ "", "\nPID\t0xA056\xED\xEB\xF7\xFB\x9B\xCAr\xD5CKJ", "\nV\t12690", "\nI\xC9\xBF\xFFo\vCS\t0", "\nMPPT\t0", "\nOR\t0x\xBF\xBF\xEB+\x11%ON", "\nH19\t653", "\nH20\xED\xBD\xFF\xFFk?1", "\nH23\t326", "\nHSDS\t1\xB2\xED\xFF" ] ------------- PID 0xy¿½¿ï*%ÊrÕCKJ V 12690íë_W 0 CS 0 MPPT 0 OZýïk LOAD ON êoûoïJJ81 H23 326 HSD[ý [ "", "\nPID\t0xy\xBF\xBD\xBF\xEF*%\x82\x9A\xCAr\xD5CKJ", "\nV\t12690\xED\xEB_W\t0", "\nCS\t0", "\nMPPT\t0", "\nOZ\xFD\xEFk\nLOAD\tON", "\nH19\t653", "\xEAo\xFBo\xEFJ\x92J81", "\nH23\t326", "\nHSD[\xFD" ] -------------
Sometimes PID is missing also
------------- ï%0xA056 FW 156 [uÿï12690 I 0 VPV 82¼í}]%0 Êuÿ½= 6530001 H20 168 H21 ·¿½·7SjEM%12 Checksumíý [ "\x7F\xEF\x95\x11%0xA056", "\nFW\t156", "\n[u\xFF\xEF\x9512690", "\nI\t0", "\nVPV\t82\xBC\xED}]%0", "\nOR\t0x00000001", "\xCAu\xFF\xBD=\t653", "\nH20\t168", "\nH21\t\xB7\xBF\xBD\xB77SH\bjEM%12", "\nChecksum\xED\xFD" ]
Actual picture how see the data coming from the Controller....
Another thing i cannot understand is how to parse this data what am i missing ?
Thanks in advance!