more G-Labs products

Author Topic: Sensor widget paramters reset  (Read 1093 times)

November 11, 2015, 06:20:16 PM
Read 1093 times

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Hi!

Is that possible to reset/clear the Sensor or other widget paramaters to default? I know, the module cleanup can, but I'd like to do it from program code.

November 11, 2015, 07:20:16 PM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
If you look at the sensor in configure / groups, you can edit or delete parameters. Select the dasshed box on the rigt side and it will show all parameters for that object.  You could also delete the value in the parameter from the modules.xml file, but you could get yourself in trouble if you break that xml file!

November 11, 2015, 07:43:40 PM
Reply #2

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
If you look at the sensor in configure / groups, you can edit or delete parameters. Select the dasshed box on the rigt side and it will show all parameters for that object.  You could also delete the value in the parameter from the modules.xml file, but you could get yourself in trouble if you break that xml file!

Thanks, I knew this method. In my case I'd like to delete from program code. Because, I'd like rewrite the PingMeAtHome extended program, that use Sensor widget instead of Status widget. So, the sensor name is the person name, which can set by program parameter. So the name like "bkenobi" :), the parameter is Status.bkenobi. But I change the name parameter to KaZe, the old parameter Parameter.bkenobi won't delete. So each parameter of change just to accrue parameters.
« Last Edit: November 11, 2015, 07:46:10 PM by KaZe »

November 11, 2015, 09:35:52 PM
Reply #3

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
You can follow the source code of groupe settings node to see which function is call to delete parameters.

November 11, 2015, 09:51:20 PM
Reply #4

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
If you look at the sensor in configure / groups, you can edit or delete parameters. Select the dasshed box on the rigt side and it will show all parameters for that object.  You could also delete the value in the parameter from the modules.xml file, but you could get yourself in trouble if you break that xml file!
Oh, so far I did not see, the dasshed box has a delete button. ::) That suitable for me now. Thx