Author Topic: openLuup: Data Historian  (Read 2220 times)

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6180
  • Karma: +276/-69
  • "Less is more"
Re: Data Historian
« Reply #15 on: July 13, 2018, 03:01:57 pm »
Please see attachments - hope it's what you are looking for.

Nearly all of what I needed... I was also wanting the variables of the VeraBridge plugins themselves (three, in this case, then.)  In particular, they should all have variables Offset, and PK_AccessCode.  I also need their device names (but may find them in the logs. haven't looked yet. I have now: the Vera with the nil issue is 'VBOld Forge')

Thanks for all the help.

« Last Edit: July 13, 2018, 06:08:00 pm by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline powisquare

  • Full Member
  • ***
  • Posts: 132
  • Karma: +1/-0
Re: Data Historian
« Reply #16 on: July 14, 2018, 05:18:42 am »
Morning - please find VB variables attached

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6180
  • Karma: +276/-69
  • "Less is more"
Re: Data Historian
« Reply #17 on: July 14, 2018, 05:27:51 am »
Well, there's your problem.  PK_AccessPoint for the errant machine is nil.

I've never seen this, and, frankly, don't know how that machine can possibly work with the MiOS accounts.  What did you do to it?
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline powisquare

  • Full Member
  • ***
  • Posts: 132
  • Karma: +1/-0
Re: Data Historian
« Reply #18 on: July 14, 2018, 05:51:32 am »
I have no idea? Has been running for over three years but I'm no expert in these things. Anything I should/could do?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6180
  • Karma: +276/-69
  • "Less is more"
Re: Data Historian
« Reply #19 on: July 14, 2018, 06:14:41 am »
I have no idea? Has been running for over three years but I'm no expert in these things. Anything I should/could do?

I think this is a relatively recent happening, and wonder (could be wrong, though) if you have inadvertently managed to delete this attribute?  Perhaps doing something in Lua Test?

Anyway, I can tell you that this seems like a Vera 3 / VeraLite class of machine.  In fact, I can dig out from the logs that its PK_AccessCode should be 30107174.

As a sanity check, can you first look at the results of these three requests in a browser:

Code: [Select]
http://192.168.1.170/port_3480/data_request?id=variableget&Variable=PK_AccessPoint
http://192.168.1.171/port_3480/data_request?id=variableget&Variable=PK_AccessPoint
http://192.168.1.172/port_3480/data_request?id=variableget&Variable=PK_AccessPoint

you should get:

Code: [Select]
30107174
30108355
45105824

...but I'm wondering is the first one gives nil or an error?  If so, we can try and fix this.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline powisquare

  • Full Member
  • ***
  • Posts: 132
  • Karma: +1/-0
Re: Data Historian
« Reply #20 on: July 14, 2018, 06:46:07 am »
Thanks for your patience : ) yes those requests returned the codes you provided and there was no nil error.

Have not been into Lua Test but I did fiddle with the openLuup setup a few days ago by updating openLuup to the latest dev release and updating the VeraBridge plugin. Only other thing I can recall was inserting luup.attr_set ("openLuup.Historian.Directory","history/") into Lua Startup.

Should I reinsert 30107174 into PK_AccessCode?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6180
  • Karma: +276/-69
  • "Less is more"
Re: Data Historian
« Reply #21 on: July 14, 2018, 06:53:56 am »
Thanks for your patience : )

No, thanks for yours!

Quote
Should I reinsert 30107174 into PK_AccessCode?

Well, it obviously is there in the system, which is good.  It's not there in that particular VeraBridge, which is bad.  My recollection is that this should be set every Luup reload.  You've probably done this already, but can you do that again and check the value of PK_AccessPoint amongst your 'VBOld Forge' device variables.

I don't have high hopes for that, since I'm sure you've have reloaded several times.  Just setting it to the correct value is worth trying, but I do beleive that it will get overwritten on the next reload.  That would be thing #2 to try, anyway.

I'll look at the code but, honestly, it's working in all my machines and in two of yours, so there is SOMETHING odd going on somewhere.  I have a hunch, but it will need a special bit of diagnostic code to try out. 

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

Offline powisquare

  • Full Member
  • ***
  • Posts: 132
  • Karma: +1/-0
Re: Data Historian
« Reply #22 on: July 14, 2018, 07:06:41 am »
Upon Reload Luup Engine the variable did not return. After inserting variable and 2 x reloads the variable has persisted! However, I checked on the other two verabridges and VBLodgeMaster has a nil value.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6180
  • Karma: +276/-69
  • "Less is more"
Re: Data Historian
« Reply #23 on: July 14, 2018, 07:09:13 am »
 :(
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline powisquare

  • Full Member
  • ***
  • Posts: 132
  • Karma: +1/-0
Re: Data Historian
« Reply #24 on: July 14, 2018, 07:12:13 am »
lol

Offline powisquare

  • Full Member
  • ***
  • Posts: 132
  • Karma: +1/-0
Re: Data Historian
« Reply #25 on: July 14, 2018, 07:15:31 am »
Herding cats.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6180
  • Karma: +276/-69
  • "Less is more"
Re: Data Historian
« Reply #26 on: July 14, 2018, 07:35:51 am »
Yep.  I'm thinking, following up my hunch.  The problem is clearly mine.

Is there anything special about the network they're on?  I'm thinking this is a timing problem.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6180
  • Karma: +276/-69
  • "Less is more"
Re: Data Historian
« Reply #27 on: July 14, 2018, 09:02:20 am »
I checked on the other two verabridges and VBLodgeMaster has a nil value.

...so this, clearly, is nothing to do with the historian, but all to do with VeraBridge.  Very odd, because, again, I have never seen this before.  Can I have the first part of the main log file again, showing the bridges starting up?
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6180
  • Karma: +276/-69
  • "Less is more"
Re: Data Historian
« Reply #28 on: July 14, 2018, 09:11:39 am »
SOLVED... (I hope.)

Your log shows that you are running a version of VeraBridge (2018.03.02) which does not match the openLuup version that you have.

My guess is that there is a copy of this old L_VeraBridge.lua file in cmh-ludl/ which should simply be deleted (then restart twice.)

Is this, in fact the case?
« Last Edit: July 14, 2018, 09:17:04 am by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline powisquare

  • Full Member
  • ***
  • Posts: 132
  • Karma: +1/-0
Re: Data Historian
« Reply #29 on: July 14, 2018, 09:29:24 am »
Found the file in the openLuup dir. Ok to delete this?

From earlier ..

I have a Ubiquity setup. The Old Forge and Cottages connect to the network via wifi/access points. The Lodge is wired but reaches the main network via wireless bridge.

Pinging 192.168.1.170 (Old Forge box) twice reply is 1112ms, 1ms, 4ms, 2ms | 3ms, 2ms, 2ms, 2ms. 192.168.1.171 (Cottages) 112ms, 2ms, 1ms, 2ms | 1ms, 5ms, 1ms, 2ms. 192.168.1.172 (Lodge) 4ms, 3ms, 2ms, 3ms | 2ms, 6ms, 3ms, 6ms

This is from my laptop which is connected wirelessly. From the openLuup box (wired to a switch) they are all under 3ms. (Not sure if any of that is useful!)

I did panic in that the unifi controller was down and only got it working after a firmware upgrade but not certain this would affect the network.