I should not be good enought !
I try this on script to change the units and multiplier
doesn't work for me !
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
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 also try to edit the DB in backup file current.db and backup.db
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 !
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
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT