This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Smart Metering - SE PowerTag and Smartlinks SI D
#1
This is essentially a post for Erwin Van der Zwart.

Helllo Erwin,

First of all (and I repeat myself but it cannot be said enough) : thank you for the great development work on the HomeLynk/LogicMachine product. I just love what you get out of this little wonder (reminds me of the C64-days : anything seemed possible)

Anyway, an hour ago, a Schneider representative told me about this PowerTag product combined with the Smartlink interface. It sure looks promising and easy to implement as an after-market solution for smart metering.

However, he could not answer my technical questions about logging and export capabilities but as I read through the specs, I noticed it uses the Modbus TC/IP protocol.

So, I was wondering, can this module be linked to a HomeLynk for 1) logging 2) Visualisation in the Trends logs 3) Action triggering to knx on treshold valiues to be defined in the HomeLynk?

Kind regards,
Hendrik
Reply
#2
Hi,

Yes the powertag can be integrated to HL/SL/LM just like any other modbus metering device, difference is that the smartlink SID or SIB will function like a IP to RTU gateway, 
only here is RTU in fact a Zigbee communication.

So basicly you read a modbus IP gateway, set a slave (150 to 220) and under this slave are these points:

Code:
{
 "product_code": "POWERTAG",
 "mapping": [
   {
     "bus_datatype": 14,
     "address": 2999,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "A",
     "name": "Current A",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3001,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "A",
     "name": "Current B",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3003,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "A",
     "name": "Current C",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3027,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage A-N",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3029,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage B-N",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3031,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage C-N",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3019,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage A-B",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3021,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage B-C",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3021,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage C-A",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3053,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "W",
     "name": "Active Power on Phase A",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3055,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "W",
     "name": "Active Power on Phase B",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3057,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "W",
     "name": "Active Power on Phase C",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3059,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "W",
     "name": "Active Power Total",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3083,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "name": "Power Factor",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3203,
     "value_nan": [
       32768,
       0,
       0,
       0
     ],
     "type": "register",
     "units": "Wh",
     "name": "Active Energy No reset",
     "datatype": "int64"
   },
   {
     "bus_datatype": 14,
     "address": 3255,
     "value_nan": [
       32768,
       0,
       0,
       0
     ],
     "type": "register",
     "units": "Wh",
     "name": "Active Energy Resettable",
     "datatype": "int64"
   },
   {
     "bus_datatype": 14,
     "address": 3259,
     "value_nan": [
       32768,
       0,
       0,
       0
     ],
     "type": "register",
     "units": "Wh",
     "name": "Active Energy Write Value",
     "datatype": "int64"
   },
   {
     "bus_datatype": 9,
     "address": 3299,
     "type": "register",
     "units": "",
     "name": "Multistatus",
     "datatype": "int32"
   }
 ],
 "manufacturer": "Schneider Electric",
 "name": "PowerTag all versions",
 "product_range": "PowerTag",
 "description": "Wireless Energy Sensor PowerTag for slave 150 to 219"
}

BR,

Erwin
Reply
#3
Thanks Erwin! Fast and accurate, as usual.

I'm ordering 20 powertags and we'll see if I can get them to work on the HL ;-)

Kind Regards,
Hendrik
Reply
#4
Hi,

Order also a Smartlink SI-D or SI-B or the powertags are useless (:

Here are the profiles: 
.json   PowerTag.json (Size: 4.15 KB / Downloads: 83)
.json   PowerTag in kW.json (Size: 4.42 KB / Downloads: 97)


BR,

Erwin
Reply
#5
Works like a charm :-)

Thanks again!

Hendrik
Reply
#6
Hi, I have a mistake on a SpaceLYnk.

4 Power Tags on the SI D and 4 iEM3555 : data are concentrated in the SpaceLYnk but I have gap on the trends for the current phase. See an example on the attached file. 

I have a problem for a lot of current phase from the Power Tags and from the iEM3555. The gap is not on the same hour.

I don't understand because for the Total Energy, it's ok all the data are seen on the trends.

Can you help me ?

Thanks !!

Clémentine

Attached Files Thumbnail(s)
   
Reply
#7
Hi,

What trend type do you use? I think this trend is set to 'Counter', and you probably need 'Absolute value'

BR,

Erwin
Reply
#8
(22.12.2017, 09:08)Erwin van der Zwart Wrote: Hi,

What trend type do you use? I think this trend is set to 'Counter', and you probably need 'Absolute value'

BR,

Erwin

Indeed, It's "Counter" that we use. I will change for one trend in "Absolute value" for the current phase.

Thanks a lot 
BR
Clémentine
Reply
#9
Thanks for sharing !

1/ Do you know if powertag like this use same Modbus register ?

https://www.schneider-electric.com/en/pr...a---3p%2Bn


2/ there is no Reactiv energy/and active reister in your JSON, are these information available ?

3/ is there a way to replace the json file for existing modbus element ? I try to change the file in the archive after a save but it keep the old value. Is it it stored in DB ? Can I change the code in the DB. Cause I have 100 counter to change !
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
Reply
#10
I try to change in DB table 'modbus_device' the profile from powertag to powertagkw (I add the profile before), without sucess ! I tried also to delete the record in the table 'modbus_mapping' thinking it will generated again with the new profil !
But doesn't work !
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
Reply
#11
(26.10.2017, 13:31)Erwin van der Zwart Wrote: Hi,

Yes the powertag can be integrated to HL/SL/LM just like any other modbus metering device, difference is that the smartlink SID or SIB will function like a IP to RTU gateway, 
only here is RTU in fact a Zigbee communication.

So basicly you read a modbus IP gateway, set a slave (150 to 220) and under this slave are these points:

Code:
{
 "product_code": "POWERTAG",
 "mapping": [
   {
     "bus_datatype": 14,
     "address": 2999,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "A",
     "name": "Current A",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3001,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "A",
     "name": "Current B",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3003,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "A",
     "name": "Current C",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3027,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage A-N",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3029,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage B-N",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3031,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage C-N",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3019,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage A-B",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3021,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage B-C",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3021,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "V",
     "name": "Voltage C-A",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3053,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "W",
     "name": "Active Power on Phase A",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3055,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "W",
     "name": "Active Power on Phase B",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3057,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "W",
     "name": "Active Power on Phase C",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3059,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "units": "W",
     "name": "Active Power Total",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3083,
     "value_nan": [
       65472,
       0
     ],
     "type": "register",
     "name": "Power Factor",
     "datatype": "float32"
   },
   {
     "bus_datatype": 14,
     "address": 3203,
     "value_nan": [
       32768,
       0,
       0,
       0
     ],
     "type": "register",
     "units": "Wh",
     "name": "Active Energy No reset",
     "datatype": "int64"
   },
   {
     "bus_datatype": 14,
     "address": 3255,
     "value_nan": [
       32768,
       0,
       0,
       0
     ],
     "type": "register",
     "units": "Wh",
     "name": "Active Energy Resettable",
     "datatype": "int64"
   },
   {
     "bus_datatype": 14,
     "address": 3259,
     "value_nan": [
       32768,
       0,
       0,
       0
     ],
     "type": "register",
     "units": "Wh",
     "name": "Active Energy Write Value",
     "datatype": "int64"
   },
   {
     "bus_datatype": 9,
     "address": 3299,
     "type": "register",
     "units": "",
     "name": "Multistatus",
     "datatype": "int32"
   }
 ],
 "manufacturer": "Schneider Electric",
 "name": "PowerTag all versions",
 "product_range": "PowerTag",
 "description": "Wireless Energy Sensor PowerTag for slave 150 to 219"
}

BR,

Erwin

Hi Erwin,

Regarding Zigbee communication, will it be possible to control powertag directly from LM, when Zigbee gateway from Embedded Systems is released?

Best Regard Even Sundgot
Reply
#12
Once modbus device is added it will use current profile data. Changing profile after that will not affect already created devices. There were some examples by Erwin on how to create bulk modbus devices from a script.
Reply
#13
Hi,

Correct, see: https://forum.logicmachine.net/showthrea...60#pid8560

For auto mapping of the created modbus devices see: https://forum.logicmachine.net/showthrea...30#pid5930

BR,

Erwin
Reply
#14
your the best guys !
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
Reply
#15
I should not be good enought !

I try this on script to change the units and multiplier



Code:
query = 'SELECT * FROM modbus_mapping WHERE "address" = 3203'
for _, mapping in ipairs(db:getall(query)) do
     db:update('value_multiplier', 0.001)
      db:update('units', 'kWh')
end

query = 'SELECT * FROM modbus_mapping WHERE "address" = 3059'
for _, mapping in ipairs(db:getall(query)) do
     db:update('value_multiplier', 0.001)
      db:update('units', 'kW')
end



doesn't work for me !

(27.06.2018, 09:33)domotiqa Wrote: I should not be good enought !

I try this on script to change the units and multiplier



Code:
query = 'SELECT * FROM modbus_mapping WHERE "address" = 3203'
for _, mapping in ipairs(db:getall(query)) do
     db:update('value_multiplier', 0.001)
      db:update('units', 'kWh')
end

query = 'SELECT * FROM modbus_mapping WHERE "address" = 3059'
for _, mapping in ipairs(db:getall(query)) do
     db:update('value_multiplier', 0.001)
      db:update('units', 'kW')
end



doesn't work for me !
I also try to edit the DB in backup file current.db and backup.db

changing the record (editing the units change from w to kw and value_multiplier from null to 0.001

try to reload the backup ! But device are all erase ! I edit with dbbrowser for sqlite
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
Reply
#16
Editing backup will not work unless you also update database checksum.
Correct syntax for db update queries:
Code:
db:update('modbus_mapping', {
  value_multiplier = 0.001,
  units = 'kWh',
}, { address = 3203 })
Reply
#17
(27.06.2018, 10:21)admin Wrote: Editing backup will not work unless you also update database checksum.
Correct syntax for db update queries:
Code:
db:update('modbus_mapping', {
 value_multiplier = 0.001,
 units = 'kWh',
}, { address = 3203 })

thanks
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
Reply
#18
json file for new SE 100 Powertag Gateway.

now includes;
additional alarms
monitoring for comms loss between powertag sensors and the gateway
LOT - Load operation timer (counter in seconds). 

new gateway does not restrict you to starting address of 150 for the powertags.  Now you can start at "1"  

Also includes new backup / restore feature for replacing faulty gateways.
Reply
#19
Hi,

There is indeed a new gateway but the system registers are not changed in this new gateway. This does not change any register in the powertag itself.

We have entered the most used registers in the profile and we could add a few more as they already excisted in the powertag device.

Here is the register list of both (system gateway and powertag) See page 66 for the system registers to be read on slave ID 255 and page 68 for the powertag registers to be read at slave ID ### depending on the selected powertag.

.pdf   DOCA0157EN-00.pdf (Size: 5.02 MB / Downloads: 44)


BR,

Erwin
Reply
#20
Hi all. Very interesting and helpfull thread.
I have now successfully addeded my powertags and PowerTag link (A9XMWD20) and have started to get the readings which seems to work fine.

2 QUESTIONS:

1) ACCUMULATED CONSUMPTION
----------------------------------------------------
What is the best way to accumulate/count the consumption per day / month?
--> SOLVED: counter; - Just had to send a "0" value to the "Active Energy Write Value" and NOT to the "Active Energy Resettable". Solved.
  a) By trending, b) by scripting or by c) using the built in counter in the PowerTag?


It seems like the C) built in resetable register in the powerTag is the more precise way to go as trends will be more incorrect?  I was looking at the  register "3255-Active Energy Resettable" which seems like a interesting way to go if we could reset it daily by midnight.

[s]--> SOLVED: How do we reset this value easily with a script? I tried to make the JSON register "writable:1", as with other modbus items, but I could not reset the value to 0. [/s]

--> What is the best way to accumulate monthly values for trends if I reset the counter at midnight daily? I guess there are not 2 counters built in to each powerTag?


2) Powertag 230v rated voltage issue?
----------------------------------------------------
A Schneider 3-phase PowerTag "A9MEM1543" which should be rated voltage 230v can not be changed to anything less than 380v. Anything less, like the correct 230v, Returns "the form contains error" message. Using "browser web interface" for seting up the powertag. The other "A9MEM1521" are OK and accept 230v. What am I doing wrong here?
Schneider Wiser (homeLynk), Power Tags, DALI, Multitouch Pro, Panasonic Heating pump, Flexit balansed ventilation, HUE integration, Lemus Speaker system. Tibber integration.
Reply


Forum Jump: