codmpm / node-red-contrib-loxone

Connect the Loxone Miniserver to node-red via the Websocket API
MIT License
74 stars 24 forks source link

Unable to create valid message for "Control Out" #13

Closed boxsterman closed 5 years ago

boxsterman commented 6 years ago

I'm integrating my enocean sensors with Loxone using node red and this cool library but I'm unable to create a valid message that leads to setting my virtual input in the miniserver. Instead I'm using the webservice node which works just fine (url="jdev/sps/io/VI2/" with "append msg.payload" - a number from the previous node).

I would be very glad if an example for such a message would be available ... and I would volunteer for updating the documentation accordingly ;)

codmpm commented 6 years ago

Hey @boxsterman, thank you!

Strange - virtual inputs should be feedable with the control-out node. For example, the battery state of the connected homematic keymatic is a visualized virtual input: https://allgeek.de/2017/10/05/node-red-in-verbindung-mit-loxone/ To display text a virtual text input which must be fed via the webservice node is needed.

Sadly some modules can not be used with the control-out node as they don't expose a state to send to. These have to be switched with the webservice node, e.g. the up/down switch. See the third example in the readme: https://github.com/codmpm/node-red-contrib-loxone/blob/master/README.md The webservice node itself send it's data through the existing websocket, so no extra connections are made. I thin this is a compromise we can live with?

Please feel free to fork the repo and add an EXAMPLES.md file. I will glady accept pull requests and I would be very happy if someone helps out with the documentation. Also feel free to correct maybe misleading things in the readme.

andrasg commented 5 years ago

I wasn't able to control my simple switch building block in Loxone unless I changed msg.payload to either on or off. This way I am able to control the switch.

I still haven't figured out how to send some data to the Loxone text input...

codmpm commented 5 years ago

As mentioned you can't use a control-out node for this, it must be filled with a webservice-node. You need a virtual input which connects to a "virtual status" - see https://www.loxforum.com/forum/faqs-tutorials-howto-s/86293-entwicklung-node-red-contrib-loxone-für-node-red?p=93773#post93773 (german)