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
#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


Messages In This Thread
RE: Smart Metering - SE PowerTag and Smartlinks SI D - by domotiqa - 27.06.2018, 09:33

Forum Jump: