Question on Mysensors Network with Protected Domoticz Device



  • Hello everyone,
    I have a Mysensors RFID Node running the RFID sketch on Arduino Pro Mini which sends the switch on/off command to Domoticz controller.
    It just works great if the device is not protected.
    I am wondering if I can send the on/off command to a protected device as well.

    Is there any way I send the message to controller to turn the protected device on or off?
    Can you please advise?

    Many thanks


  • Plugin Developer

    What do you mean with 'projected device'. In Domoticz' interface? Or do you mean encryption/signing?


  • Contest Winner

    If you mean signing and/or encryption, it is supported for all controllers as it is independent of the controller. However, some controllers (like domoticz) may have an ack timeout that fires before it is received when signing is used. Some year ago, domoticz made that timeout configurable so it should not be a problem anymore.



  • @alowhum PROTECTED device a Switch in Domoticz that only can operate if you use a right pass code.



  • @anticimex Perhaps I should explain more...

    As you guys know, in Domoticz you can protect a device and set the passcode in setting and use that for devices (Lights, Switches...) to operate if you only provide a correct passcode:
    0_1537421491898_1.png

    If you use Domoticz API to turn the light On or Off, and device is protected, you need to pass a extra parameter in your HTTP request and send the pass code to be able to operate that protected light or switch:
    Something like this:

    /json.htm?type=command&param=switchlight&idx=99&switchcmd=Off&passcode=YOUR_SWITCH_PASSWORD_AS_SET_IN_SETTINGS
    

    Now my question is: how we should send the message from Mysensors device/sensor to Domoticz controller to turn it On or Off if the switch/light is protected?


  • Contest Winner

    @sghazagh ok, that I do not know since the MySensors security is independent (and will remain so) from the controller(s).



  • @anticimex At the moment, I have a workaround and doing the logic through the LUA script.
    In LUA, I can send the request to the switch with passcode as I explained above.

    That works fine but that would be great if Mysensor can have an option to send the message directly to controller for particular IDX (like what it does now) plus an option to pass the passcode to controller for protected devices.

    Perhaps, if it's not in the features, that would be good to have it in future releases....


  • Contest Winner

    @sghazagh personally, I think it is a really bad idea to code controller specific logic into the MySensors library.
    If MySensors specific things are needed for a specific controller, the changes should be done in the MySensors plugin for that controller. So I think this is a question for the MySensors part of the domoticz forum.



  • ๐Ÿ˜ฎ silly me ๐Ÿ˜„
    It seems that it even doesn't care the device is protected or not! it just could change the status of the device even if it is protected...



  • @anticimex said in Question on Mysensors Network with Protected Domoticz Device:

    @sghazagh personally, I think it is a really bad idea to code controller specific logic into the MySensors library.
    If MySensors specific things are needed for a specific controller, the changes should be done in the MySensors plugin for that controller. So I think this is a question for the MySensors part of the domoticz forum.

    I agree there should not be controller depend stuff in the mysensors



  • @sghazagh said in Question on Mysensors Network with Protected Domoticz Device:

    ๐Ÿ˜ฎ silly me ๐Ÿ˜„
    It seems that it even doesn't care the device is protected or not! it just could change the status of the device even if it is protected...

    What do you mean, you have writte in your LUA script that you also provide the password?!?

    Light/Switch Protection

    If you want that an On/Off device be "protected", you can create a password that will be required by the system before executing commands, provided that you have ticked the "protected" box during the device editing phase.
    From here: https://www.domoticz.com/wiki/Application_Settings



  • @bjacobse Yes, you are absolutely right, and that password only is required when you trig the device inside controller.
    I mean, if you click the icon in controller for that device and device is protected, it asks for password.
    And if you also use HTTP API, you need to provide password as well.

    So if you want to trig the device from other Mysensor node (my case), it does not know about the protection and you can directly send the message to trig the device on or off.


Log in to reply
 

Suggested Topics

  • 4
  • 15
  • 17
  • 2
  • 9
  • 2

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts