We have moved at community.getvera.com

Author Topic: New plugin for reading the gas and electricity usage from a Dutch Smart meter  (Read 103865 times)

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Hi, I am aware of that but.
You can upload png files too by the luup upload... i was just wondering where they are stored
Hi Twannie,
You cannot upload images via the LUUP upload. Images you will have to use WinSCP or something like that for. The upload function puts all files in one location only (/etc/cmh-lu if I remember correctly without checking) and compresses them. Upload is only intended for the xml, json, js and lua files.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
Hi Rene

I accidentally uploaded an png file which was accepted and in the list..
I also noticed other png and aother files in the luup list.
When I click on download I can download them
Maybe this is different in UI7?

groetjes

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Hi Twannie,

The upload function will indeed accept any file type. It just won't do anything with them. They are just wasting space really. It is the same for all UI version as far as I know.

Cheers Rene
« Last Edit: February 25, 2015, 09:03:29 am by reneboer »
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
Thanks Rene

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
I did some testing and I know now how the positioning works (what Rene means), also on page 2 (details page)
I will fix that too and upload the corrected file (with proper positioning code)

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
Check  :D

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Well done. :)
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
Thanks
Rene, can you use a round function or something like that in a json file? (For the gas)

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Hi Twannie,

The json is a static definition of how a plug in will display variables, labels, buttons etc. You can handle more complex pages in JavaScript. The learning curve is quite steep also because you are almost blind to what is happening with the code you write. If you want to manipulate a value you best do that in the LUA code.

A good starting point is this post http://forum.micasaverde.com/index.php/topic,17300.msg133938.html#msg133938 as it has many links to useful pages.

Two tools I recommend; LuaTest and InfoViewer. Search the forum on the details.

Also in my own experience I am starting to be less worried that something looks nice on the Vera UI, but more important that I can see when I need in the Apps so I can do my day to day operating from those apps. The UI I more and more just use to configure it all and then go back to the apps.

Cheers Rene.
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
Hi Renee

I see your point and I agree.. but, I also have my laptop before me almost all day long  ;)
I am just starting with the Vera. So slowly I will try to nove into functionality and data manipulation. I only have experience in programmin with VBA though so it will take some time.
For example I am trying to change variabeles on a z-wave device, also very new to me, but that is off topic.

Cheers and thanks

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
where can i  get infoviewer rene?

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
Could I put this in the startup luup?
local GasTotaal = luup.variable_get("urn:brutgrink-com:serviceId:dutchSmartMeter","Gas",372) (actually it should be a format of only whole numers)

and how can I get this in my json or am I thinking wrong here?

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Hi Twannie,

You can put that in but it would not show in any json to display. That can only be done via a plugin that populates the variables you want to see. On the wiki pages you find information how to do that. That, looking at many other plug ins and tons of free time will get you a working plug in  ;)

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
hahaha... thanks Rene, see if we can find that time  ;)

Offline Brighters

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +1/-0
Somehow UI7 does not see my serial cable.... Any clues? It used to work on UI5...

EDIT: Reboot did the trick :)

EDIT 2: Gasmeter remains 0. This used to work in UI5. Any suggestions?


LOG:

0   03/01/15 23:20:10.516   luup_log:78: MeterType: [ISk5\2MT382-1003] <0x2ec68680>
06   03/01/15 23:20:10.517   Device_Variable::m_szValue_set device: 78 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: MeterType was: ISk5\2MT382-1003 now: ISk5\2MT382-1003 #hooks: 1 upnp: 0 skip: 0 v:0xfea3b0/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.566   luup_log:78: Meter data (not processed): "0-0:96.1.1(5A424556303035313136323433303132)" <0x2ec68680>
50   03/01/15 23:20:10.597   luup_log:78: Power meter ImportRate1: 8365.654000 <0x2ec68680>
06   03/01/15 23:20:10.597   Device_Variable::m_szValue_set device: 86 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 8365.644 now: 8365.654 #hooks: 1 upnp: 0 skip: 0 v:0xeebe40/NONE duplicate:0 <0x2ec68680>
50   03/01/15 23:20:10.617   luup_log:78: Power meter ImportRate2: 4652.342000 <0x2ec68680>
06   03/01/15 23:20:10.617   Device_Variable::m_szValue_set device: 85 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 4652.342 now: 4652.342 #hooks: 1 upnp: 0 skip: 0 v:0xeebe40/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.646   luup_log:78: Power meter ExportRate1: 188.542000 <0x2ec68680>
06   03/01/15 23:20:10.647   Device_Variable::m_szValue_set device: 87 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 188.542 now: 188.542 #hooks: 1 upnp: 0 skip: 0 v:0xeebe40/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.676   luup_log:78: Power meter ExportRate2: 475.965000 <0x2ec68680>
06   03/01/15 23:20:10.677   Device_Variable::m_szValue_set device: 88 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 475.965 now: 475.965 #hooks: 1 upnp: 0 skip: 0 v:0xeebe40/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.696   luup_log:78: Currently active tariff: [0001] <0x2ec68680>
06   03/01/15 23:20:10.697   Device_Variable::m_szValue_set device: 78 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ActiveTariff was: 1 now: 1 #hooks: 1 upnp: 0 skip: 0 v:0xfea468/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.716   luup_log:78: CurrentWattsImport: [0003.55] <0x2ec68680>
50   03/01/15 23:20:10.717   luup_log:78: CurrentActiveTariffImport: [1] <0x2ec68680>
06   03/01/15 23:20:10.717   Device_Variable::m_szValue_set device: 78 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 3550 now: 3550 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
06   03/01/15 23:20:10.718   Device_Variable::m_szValue_set device: 86 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 3550 now: 3550 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
06   03/01/15 23:20:10.718   Device_Variable::m_szValue_set device: 85 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.746   luup_log:78: CurrentWattsExport: [0000.00] <0x2ec68680>
50   03/01/15 23:20:10.747   luup_log:78: CurrentActiveTariffExport: [1] <0x2ec68680>
06   03/01/15 23:20:10.747   Device_Variable::m_szValue_set device: 87 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: -0 now: -0 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
06   03/01/15 23:20:10.748   Device_Variable::m_szValue_set device: 88 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.766   luup_log:78: Meter data (not processed): "0-0:17.0.0(0999.00*kW)" <0x2ec68680>
50   03/01/15 23:20:10.789   luup_log:78: Meter data (not processed): "0-0:96.3.10(1)" <0x2ec68680>
50   03/01/15 23:20:10.796   luup_log:78: Meter data (not processed): "0-0:96.13.1()" <0x2ec68680>
50   03/01/15 23:20:10.821   luup_log:78: Meter data (not processed): "0-0:96.13.0()" <0x2ec68680>
50   03/01/15 23:20:10.836   luup_log:78: Meter data (not processed): "0-1:24.1.0(3)" <0x2ec68680>
50   03/01/15 23:20:10.886   luup_log:78: Meter data (not processed): "0-1:96.1.0(3238303131303031323439303539333132)" <0x2ec68680>
50   03/01/15 23:20:10.936   luup_log:78: Meter data (not processed): "0-1:24.3.0(150301230000)(00)(60)(1)(0-1:24.2.1)(m3)" <0x2ec68680>
50   03/01/15 23:20:10.946   luup_log:78: Meter data (not processed): "(02351.200)" <0x2ec68680>
50   03/01/15 23:20:10.966   luup_log:78: Meter data (not processed): "0-1:24.4.0(1)" <0x2ec68680>
50   03/01/15 23:20:10.967   luup_log:78: Meter data (not processed): "!" <0x2ec68680>
« Last Edit: March 01, 2015, 05:21:50 pm by Brighters »
http://shop.brighters.nl De slimste domotica shop van Nederland!