Hi kosta,
with this expression change the type from number to string. Can i change my scope.coffee file to the decimal places for m³, or are information over the number format in another files stored?
-
PulseCounter - GasMeter
Pimatic, my hobby.
-
hi @Jens
you can change the scope file, but the frontend files are processed with grunt.following commands should help you:
cd /path-to-pimatic/ sudo npm install -g grunt-cli cd node_modules/pimatic-mobile-frontend cp app/scope.coffee scope.coffee sed -r "s=if @unit in ['kW', 'kWh']=if @unit in ['kW', 'kWh'\ , \'m³\']=" scope.coffee > app/scope.coffee wget https://raw.githubusercontent.com/pimatic/pimatic-mobile-frontend/251f2fc27b2d2acb300305c34cb82bfa65dfa459/Gruntfile.coffee npm install grunt
restart pimatic
-
Hi,
thank you for your work, but i haven’t a effect in the gui.pi@PI3matic:~ $ sudo service pimatic stop pi@PI3matic:~ $ cd pimatic-app pi@PI3matic:~/pimatic-app $ cd node_modules/pimatic-mobile-frontend pi@PI3matic:~/pimatic-app/node_modules/pimatic-mobile-frontend $ cp app/scope.coffee scope.coffee pi@PI3matic:~/pimatic-app/node_modules/pimatic-mobile-frontend $ sed -r "s=if @unit in ['kW', 'kWh']=if @unit in ['kW', 'kW h'\ , \'m³\']=" scope.coffee > app/scope.coffee pi@PI3matic:~/pimatic-app/node_modules/pimatic-mobile-frontend $ wget https://raw.githubusercontent.com/pimatic/pimatic-mob ile-frontend/251f2fc27b2d2acb300305c34cb82bfa65dfa459/Gruntfile.coffee --2018-01-19 13:14:39-- https://raw.githubusercontent.com/pimatic/pimatic-mobile-frontend/251f2fc27b2d2acb300305c34cb82bfa 65dfa459/Gruntfile.coffee Auflösen des Hostnamens »raw.githubusercontent.com (raw.githubusercontent.com)« … 151.101.0.133, 151.101.64.133, 151.101.12 8.133, ... Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443 … verbunden. HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK Länge: 1218 (1,2K) [text/plain] Wird in »»Gruntfile.coffee.1«« gespeichert. Gruntfile.coffee.1 100%[===================================================>] 1,19K --.-KB/s in 0s 2018-01-19 13:14:48 (12,7 MB/s) - »»Gruntfile.coffee.1«« gespeichert [1218/1218] pi@PI3matic:~/pimatic-app/node_modules/pimatic-mobile-frontend $ npm install npm WARN peerDependencies The peer dependency pimatic included from pimatic-mobile-frontend will no npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. pi@PI3matic:~/pimatic-app/node_modules/pimatic-mobile-frontend $ grunt Running "coffee:default" (coffee) task >> 28 files created. Running "uglify:coffee" (uglify) task >> 28 files created 344.76 kB → 169.69 kB Running "uglify:js" (uglify) task >> 37 files created 2.64 MB → 1.3 MB Done. pi@PI3matic:~/pimatic-app/node_modules/pimatic-mobile-frontend $ sudo service pimatic start
My Variable Device in the gui. I work with Watt and make a sticker on the monitor with m³!
Thanks for your time and a nice weekend.Pimatic, my hobby.
-
you must clear the browser cache
-
I have clear the cache in firefox and in chrome.
Pimatic, my hobby.
-
PS. I work with a PI3 and stretch.
Pimatic, my hobby.
-
for me it works for variable and shell sensors.
you can check if inapp/scope.coffee line: 179 : is like this:=> if @unit in ['kW', 'kWh' , 'm³']
and this should has a new timestamp (generated from grunt)
app/scope.min.js
But a sticker on the monitor is also a nice solution
-
Hi,
i make the sticker !
I test this workaround on a fresh pimatic installation with a default config.json and haven’t the unit m³ on line 179 in the scope.coffee file. The timestamp of the file is new.By.
Pimatic, my hobby.
-
Then the sed change not worked.
Change the line itself toif @unit in ['kW', 'kWh' , 'm³']
And run grunt once again.
The scope-min.js file should be new. -
I edit my scope.coffee with the editor of WinSCP… and in nano is my m³ in m□ to read. Change and it is OK.
Thanks!Pimatic, my hobby.
-
This post is deleted!