SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
Hi,
1. When we try modifying a string EBO value via REST APIs and the new value is alpha-numeric (i.e.: "hello"), the value that is written to the EBO is null ("") instead of "hello".
In the SmartConnector log we can see this line:
Debug,RestServe,admin,Values,UpdateValue,C836B7E024DE4ABA9A27FD351A63C4D7,Request,{"Id":"01%2FServer 1%2FMyValues%2FString1","NewValue":null},
If we write a numeric value such as "111111", then the value is written to the EBO as expected.
Debug,RestServe,admin,Values,UpdateValue,C3C8E312A6564746B98AFA10BE4AC63D,Request,{"Id":"01%2FServer 1%2FMyValues%2FString1","NewValue":"111111"},
2. We have a similar problem with Time Stamp EBO values. When the new value we try write is "12/7/2021 2:00:00 PM",
the value is not written to the EBO and the SmartConnector log file shows that the new value is "07". See below.
Debug,RestServe,admin,Values,UpdateValue,E3426514679043659671937880F7EB79,Request,{"Id":"01%2FServer 1%2FMyValues%2FTime Stamp Value1","NewValue":"07"},
Any idea what is causing this problem?
Thank you.
Mike
Link copied. Please paste this link to share this article on your social media post.
Hi Mike,
For a string to be parsed correctly, it needs to be in quotation marks, e.g.
"hello world".
This is because strings need to be encased for them to be valid JSON. A number does not.
Regarding the Timestamp, I would use the format Smartconnector uses, like this example from the subscription endpoint on Swagger:
"ExpiresOn": "2021-07-13T05:11:46.148Z"
Working with dates is a pain.
Hope this helps,
Armend
Link copied. Please paste this link to share this article on your social media post.
Hi,
I did the same using the Swagger and the results are the same. If I try to assign the string value "999999" or "111111" it works fine, but if I try an alphanumeric string such as "Hello world", the value becomes "". See the attached file with a screen capture of the Swagger.
I appreciate your answer.
Mike
Link copied. Please paste this link to share this article on your social media post.
Hi Mike,
For a string to be parsed correctly, it needs to be in quotation marks, e.g.
"hello world".
This is because strings need to be encased for them to be valid JSON. A number does not.
Regarding the Timestamp, I would use the format Smartconnector uses, like this example from the subscription endpoint on Swagger:
"ExpiresOn": "2021-07-13T05:11:46.148Z"
Working with dates is a pain.
Hope this helps,
Armend
Link copied. Please paste this link to share this article on your social media post.
Hi Armend,
Thank you for your answer. In the Swagger it works nice!
Mike
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.