I tried the example from the mcsMQTT PDF document but I get a compilation error:
Apr-23 13:09:21 Error Compiling script /usr/local/HomeSeer/scripts/MQTTTest.vb: 'inFunction' is not declared. It may be inaccessible due to its protection level.
Apr-23 13:09:21 Error Compiling script /usr/local/HomeSeer/scripts/MQTTTest.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
here is the example out of the PDF:
Sub Main(parm as object)
Dim iResult as integer
Dim sTopic as string = "easy01/cmd"
Dim sPayload as string= "oled,8,1,TestText"
Dim sQOS as string = "EXACTLY_ONCE"
Dim sRetain as string = "FALSE"
Dim sArray() as string = {sTopic,sPayload,sQOS,sRetain}
iResult = hs.Plug-inFunction("mcsMQTT","","SendMqttMessage",sArray)
if (iResult < 0) then
hs.Writelog("mcsMQTT","MQTT Message Failure for " & sTopic)
end if
end Sub
Apr-23 13:09:21 Error Compiling script /usr/local/HomeSeer/scripts/MQTTTest.vb: 'inFunction' is not declared. It may be inaccessible due to its protection level.
Apr-23 13:09:21 Error Compiling script /usr/local/HomeSeer/scripts/MQTTTest.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
here is the example out of the PDF:
Sub Main(parm as object)
Dim iResult as integer
Dim sTopic as string = "easy01/cmd"
Dim sPayload as string= "oled,8,1,TestText"
Dim sQOS as string = "EXACTLY_ONCE"
Dim sRetain as string = "FALSE"
Dim sArray() as string = {sTopic,sPayload,sQOS,sRetain}
iResult = hs.Plug-inFunction("mcsMQTT","","SendMqttMessage",sArray)
if (iResult < 0) then
hs.Writelog("mcsMQTT","MQTT Message Failure for " & sTopic)
end if
end Sub
Comment