Author Topic: Implementation file for devices  (Read 351 times)

Offline halo

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Implementation file for devices
« on: January 15, 2018, 05:04:21 pm »
Hi,

Is it possible to add implementation file for a sensor created using RFXtrx?

In my case : I would like to introduce for Rain Sensor (TFA) , additional variables which can count the daily rain or counting a rain per 1 minutes ( this one is needed for irrigation control).

I have done one implementation file as attached but it cause a failure of whole RFX433 device.

How can I achieve my target, not by creating a separate scene.....

Thanks for suggestions.

Offline tinman

  • Full Member
  • ***
  • Posts: 130
  • Karma: +5/-0
Re: Implementation file for devices
« Reply #1 on: January 16, 2018, 04:31:04 pm »
I've never tried to do what you are doing but in your implementation file don't you need to pass the device number to deszcz function?

Offline halo

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Re: Implementation file for devices
« Reply #2 on: January 17, 2018, 05:37:28 am »
OK, I have included it into main lua file for RFX device, not the sensor as part of luup.call_timer in startup function.
It works OK.