pymysensors specific forum?
-
Hello,
There is any specific forum to talk about pymysensors?
I have some doubts that I would like to clarify before proposing some changes on it.
For example: Is it possible to send internal messages to the gateway? like sending an I_VERSION request. I only saw the option to send regular messages to sensors with set_child_vale.
Thanks,
Alfredo.
-
There's no specific forum for pymysensors that I know. Home Assistant uses pymysensors, so maybe that's the closest?
Regarding sending an internal message: Create a Message instance and use the copy method to set the types and child, internal, I_VERSION, 255 etc. You can look at other places in the code for how that is done, eg:
https://github.com/theolind/pymysensors/blob/master/mysensors/mysensors.py#L83-L85Then you want to encode the message and add it to the Gateway queue, for subsequent sending to gateway. There's the Gateway.fill_queue method for this. But you actually have to add a function with optional arguments/keyword arguments, where the return value of the function is the encoded message, to the queue. So you can add a reference to the encode method of the Message instance. See for example:
https://github.com/theolind/pymysensors/blob/master/mysensors/mysensors.py#L325