NEWS
SPS Verbindung LOGO string or boolean
-
Hello, my communication with the Siemens LOGO! via the S7 adapter generally works, but I’m getting the following error in the ioBroker log:
State value to set for "s7.1.DBs.DB1._2_1" has to be type "string" but received type "boolean"
Now I’d like to understand how to interpret this message:
Is the error coming from the LOGO! side (meaning the LOGO! is sending a boolean, but the adapter expects a string)?
Or is Node-RED sending a boolean, while the adapter expects a string?In Node-RED I’m sending the value in quotation marks, so it should be a string.
case "auto": msg.topic = "s7.1.DBs.DB1._2_1"; msg.payload = "true"; return msg; -
Hi,
you need to check the state
s7.1.DBs.DB1._2_1for it's type. So click on the pencil next to the state in the object tree (the pencil only appears with enabled expert mode!). There you can find under "object data" (Objektdaten in German, idk the exact translation) the type in the json. So if there is written "string" then ioBroker is expecting a string, but the API may deliver a boolean, which is then just entered into this field OR vice versa (type = boolean, API sends string). Hope this helps :)