Author Topic: Custom plugin needed  (Read 489 times)

Offline pnm

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Custom plugin needed
« on: September 08, 2017, 07:55:47 am »
I'm wanting a custom plugin developing, for which I'm happy to pay.  It's going to be along the lines of EventWatcher but without any user interface and having specific functionality.

It needs to work on a UI7 Edge.

If anyone is interested, please get in touch.
« Last Edit: September 08, 2017, 07:58:40 am by pnm »

Offline akbooer

  • Master Member
  • *******
  • Posts: 5131
  • Karma: +221/-67
  • "Less is more"
Re: Custom plugin needed
« Reply #1 on: September 08, 2017, 08:18:54 am »
Can you give us a clue as to the expected functionality?
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline pnm

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Custom plugin needed
« Reply #2 on: September 08, 2017, 09:00:05 am »
You probably have all the code already, I just couldn't get eventwatcher working as I needed!


Everything is going to a syslog type server, either a commercial one or one I'll write.

At Vera startup send the serial number, vera name, device and sensor id's and names

Then just regularly send the serial number, device id and value for events in a format and schedule to be agreed.

e.g  For a Philio 3 in 1 multisensor
   Motion - Real Time
   Lux, Temperature - every 5 mins
   Battery - every 1 hour

also send mem, cpu, led state etc. every hour

and do this for every device attached, so if a device gets added it gets automatically included.

I don't need a user interface, I just need the data off the Vera as CSV/XML/JSON etc. so I can parse it.

I was hoping to just be able to set the AlternateEventServer id to point to my code, which worked for the motion sensor, but everything else must be child sensors so I never got any values back.





« Last Edit: September 08, 2017, 09:10:27 am by pnm »

Offline akbooer

  • Master Member
  • *******
  • Posts: 5131
  • Karma: +221/-67
  • "Less is more"
Re: Custom plugin needed
« Reply #3 on: September 08, 2017, 09:17:45 am »
No, this is going to be very, very difficult... (I charge by the hour)  ;)
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Master Member
  • *******
  • Posts: 5131
  • Karma: +221/-67
  • "Less is more"
Re: Custom plugin needed
« Reply #4 on: September 08, 2017, 09:22:53 am »
Actually, for a suitable donation here...

https://www.justgiving.com/fundraising/datayours

...and without unreasonable requirements or further obligation, I would gladly produce an open source version of what you want.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9572
  • Karma: +729/-136
    • RTS Services Plugins
Re: Custom plugin needed
« Reply #5 on: September 08, 2017, 09:27:27 am »
If you want ALL data  changes ... then just write as a standard user interface app that polls for all data.
The format is json (or xml)     
See:

http://wiki.micasaverde.com/index.php/UI_Notes

Offline akbooer

  • Master Member
  • *******
  • Posts: 5131
  • Karma: +221/-67
  • "Less is more"
Re: Custom plugin needed
« Reply #6 on: September 08, 2017, 09:33:00 am »
I imagine it's more subtle than that.  EventWatcher makes a choice as to what the important veriables are... there's an awful lot of dross that you really wouldn't need!
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline pnm

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Custom plugin needed
« Reply #7 on: September 08, 2017, 01:18:39 pm »
Happy to make a donation, how much do you suggest?

Offline akbooer

  • Master Member
  • *******
  • Posts: 5131
  • Karma: +221/-67
  • "Less is more"
Re: Custom plugin needed
« Reply #8 on: September 09, 2017, 02:26:33 am »
Happy to make a donation, how much do you suggest?

Whatever you think it's worth.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Master Member
  • *******
  • Posts: 5131
  • Karma: +221/-67
  • "Less is more"
Re: Custom plugin needed
« Reply #9 on: September 11, 2017, 06:47:03 am »
Test version (for running in AltUI Lua Test window) which:
  • prints initial device configuration
  • sets up a few service/variable watches

At the moment, the callback code simply writes a log entry for the watched variable.  You'll need to see the log file to find this (AltUI > Misc > OS Command > Tail Logs.)

3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline pnm

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Custom plugin needed
« Reply #10 on: September 12, 2017, 04:35:09 am »
I'm getting this in the log:

01   09/12/17 9:33:44.770   GetLuaInterface can't find device type: -1/0x9f7b98 str: (null) <0x75ac3520>

though I can't say it wasn't there before...
« Last Edit: September 12, 2017, 05:15:05 am by pnm »

Offline akbooer

  • Master Member
  • *******
  • Posts: 5131
  • Karma: +221/-67
  • "Less is more"
Re: Custom plugin needed
« Reply #11 on: September 12, 2017, 05:31:48 am »
You could do a restart and not run the test to see if it still happens.

Do you get entries in the log for switch state changes?
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline pnm

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Custom plugin needed
« Reply #12 on: September 12, 2017, 08:21:21 am »
I got several of these:

09/12/17 13:20:35.128   luup_log:0: dev: 6, srv: urn:micasaverde-com:serviceId:SecuritySensor1, var: Tripped = 1 <0x772c3520>

Offline akbooer

  • Master Member
  • *******
  • Posts: 5131
  • Karma: +221/-67
  • "Less is more"
Re: Custom plugin needed
« Reply #13 on: September 12, 2017, 01:29:08 pm »
Yup, that's good.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Master Member
  • *******
  • Posts: 5131
  • Karma: +221/-67
  • "Less is more"
Re: Custom plugin needed
« Reply #14 on: September 19, 2017, 07:21:46 am »
OK, here's a version which sends events to a server.
I'm assuming this is run under UI7, since it now depends on the dkjson.lua module being present.

You'll need to change a couple of lines of code:

Code: [Select]
36:   url   = "http://172.16.42.151:3480/cgi/test.lua",     -- ** URL for HTTP POST request **

52:   local schema = e.http   -- ** CHANGE this to HTTPS for secure server **

If possible, I'd suggest testing first with HTTP, rather than HTTPS.

The message is either plain text or encoded JSON - we can fix the format later as needed.

You should see entries in the local log for every message sent which details the response from the HTTP request.

I've not yet implemented schedules.

3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.