Message was not properly evaulated on every DI
-
I finally bought myself a Unipi (Patron S207) and since I don't have any Windows machine, Mervis was not an option. So I installed the Node-Red image 20220427.0
Up until now, everything went smooth.
As I'm completely new to both Node-Red and Unipi, I added a ws node connected to a DI node and then attached a debug node to it to check what the DI node exactly would return when triggered.
When I now trigger the DI, I get the message7/5/2022 01:17:44 node: DI 1.1 msg : string[34] "Message was not properly evaulated"
and nothing else.
In Linux syslog, I see this message also appearing.May 06 23:29:45 S207-sn320 Node-RED[373]: 6 May 23:29:45 - [warn] [unipi-input:DI 1.1] Message was not properly evaulated
What is wrong here ? It looks to me that the websocket sends a message to the DI node that the DI node does not understand? Or the message json is invalid ?
I did update @unipitechnology/node-red-contrib-unipi-evok from v 0.0.2 to 0.0.4
And also didapt-get upgrade
on linux which upgradedunipi-firmware
from 5.58 to 5.60 and displayed a warning that I should upgrade the firmware using the commandsudo /opt/unipi/tools/fwspi --auto
.
If I do that however, it doesn't do anything:# sudo /opt/unipi/tools/fwspi --auto Board on /dev/unipispi firmware=5.58 hardware=1.1 (E-8Di8Ro) (spi 6MHz)
and nothing more.
What can I do to fix this Node-Red problem? And why is the firmware not updated with that command ? (could the Node-Red problem be fixed with the new firmware ?)
-
Seems that this was a newbee error. I had the example flow still active in the project, and used a second instance of the websocket in my own flow. But seemingly, those instances conflict with each other causing only parts of message to arrive.
If I have only one instance of the listening websocket in the project, everything seems to work smoothly.The firmware upgrade problem, however, remains. I have fw 5.58, the OS has upgraded the firmware package to 5.60 but I can't upgrade the actual firmware as the
fwspi --auto
command doesn't start the upgrade. -
Hi @robinr1,
I'm glad you managed to solve the problem (find the cause).
Regarding the FW update, I recommend reading this article.Currently, we have also released a new package unipi-firmware6, which already contains the so-called rescue firmware, which ensures that the subsequent upload of new FW is already much safer.
When updating to FW 6, follow the recommendations using the arguments P and U:
/opt/unipi/tools/fwspi -i {0,1,2} -P -U
Best regards,
Antonin, Unipi