Closed gnagflow80 closed 3 years ago
changed from: $PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText to: $PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText
in: Send-MQTTValue.ps1
error message is gone, but still my mqtt server doesnt receive data from topics, but receives only $SYS data.
There is a constructor (function) called use-bmsmqttconfiguration, the brokerpath is set from joined paths, that might be one thing.
If you instance the module as you normally would (so you could get a bms parameter for example) What value is returned if you type "$BMSInstructionSet.Config.MQTT" at the powershell prompt?
Please remember that powershell returns objects, not strings. (even a string is actually an object). I would expect $BMSInstructionSet.Config.MQTT returns the object of type pscustomobject which was serialized from json, and includes the password text in it.
Isn't that the same command?
$PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText $PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText
changed from: $PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText to: $PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText
in: Send-MQTTValue.ps1
error message is gone, but still my mqtt server doesnt receive data from topics, but receives only $SYS data.
There is a constructor (function) called use-bmsmqttconfiguration, the brokerpath is set from joined paths, that might be one thing.
If you instance the module as you normally would (so you could get a bms parameter for example) What value is returned if you type "$BMSInstructionSet.Config.MQTT" at the powershell prompt?
Usually i can accces the MQTT servier by: Server: 192.168.1.50 or localhost Port: 1883 Username: bauer Password: bauer
So, I dont know if the $BMSInstructionSet.Config.MQTT has the right properties. But, honestly i think i dont understand those things right.
Isn't that the same command?
$PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText $PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText
changed from: $PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText to: $PWD = ConvertFrom-SecureString -SecureString $Password -AsPlainText in: Send-MQTTValue.ps1 error message is gone, but still my mqtt server doesnt receive data from topics, but receives only $SYS data.
sorry was a mistake:
There is a constructor (function) called use-bmsmqttconfiguration, the brokerpath is set from joined paths, that might be one thing.
If you instance the module as you normally would (so you could get a bms parameter for example) What value is returned if you type "$BMSInstructionSet.Config.MQTT" at the powershell prompt?
The BrokerPath looks good, isn't it:
maybe whats happening is you're not using the installer script? I updated some unfinished ends on it. Take a look at the relevant readme section here. (watch videos)
also I'd point out that once you have a service poller against the rec-bms, you need to be careful you're not issuing commands during the service poller. There's no lockout of resources (serial port, communication with bms hardware).
someday in the future I would like to change this to more of a typical service architecture, so the service module reads a command queue and returns the commands to the correct requester. This would eliminate device resource contention.
maybe whats happening is you're not using the installer script? I updated some unfinished ends on it. Take a look at the relevant readme section here. (watch videos)
Thank you a lot. It is working now! I did not install the REC-BMSMaanger within the right path. I followed your updated description and putted the module now into this path as you described: /opt/microsoft/powershell/7/....
MANY THANKS. Having the BMS Parameter within the MQTT opens up all kind of logging possibilities!!
Ok, closing this for now. Let me know what else happens, log bugs. You're officially the first person besides me to use this mqtt shipper. :)
Hi Aaron, a last thing a cant get to run is the Send-MQTTValue (by the way in your Readme it is only called Send-MQTT). I installed the MQTT Server and Clilent. But, if i run your script i get following message and i cant get any values in MQTT explorer.
This is my mqtt config file:
The defined password and user are the same as i use when applying your send-MQTTValue script. Any idea? thank you!