-
Pimatic & Node 8.0
This post is deleted! -
I don´t know they are there automaticly. When I copy and paste your
nano Dockerfile.pimaticnode
they are there.Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Jul 11 19:17:11 2017 pi@raspberrypi:~ $ docker run -t -i -p 80:80 joshendriks/raspberry-pi3-pimatic root@c8d71f97adb0:/# root@c8d71f97adb0:/# nano Dockerfile.pimaticnode
-
@shgmongo could you post the file you are executing?
It doesnt make sense it wants to nano since nano is a text editor…
Edit; hm looks like an external file…
Did you create any code? If so, post it please
-
Which code or file do you mean? The one I start pimatic?
I have my own confg file for pimatic. But I can save it but i cannot build a docker.root@c8d71f97adb0:/# pimatic.js coffee-cache: compiling coffee-script file "startup.coffee"...Done 19:53:55.716 2017-07-11 Tuesday 19:54:04.732 [pimatic] Starting pimatic version 0.9.39 19:54:07.815 [pimatic, ppm] 2.15.12 19:54:07.921 [pimatic] Loading plugin: "pimatic-cron" (0.8.8) 19:54:08.601 [pimatic] Loading plugin: "pimatic-mobile-frontend" (0.9.11) 19:54:09.672 [pimatic-cron] the time is: Tue Jul 11 2017 19:54:09 GMT+0000 (UTC) 19:54:10.223 [pimatic-mobile-frontend] packing static assets 19:54:10.898 [pimatic-mobile-frontend] packing static assets finished 19:54:10.911 [pimatic-mobile-frontend] rendering html 19:54:19.801 [pimatic-mobile-frontend] rendering html finished 19:54:19.872 [pimatic] Listening for HTTP-request on port 80...
-
@shgmongo i think @Jos-Hendriks can help you out.
I wanted to see why the nano command is issued… I dont know docker, but i do think that it shouldnt nano…
-
nano is used to create the file “Dockerfile.pimaticnode” en edit it. You should run this on the host (e.g. directly on your pi), not from within the docker container.
Every now and then I blog about pimatic at http://www.hendriks.software/tag/pimatic
-
Back on-topic: I think we have to plan for an upgrade to node js version 8. As of April 2018 maintenance on 4.x ends: https://github.com/nodejs/LTS#lts-schedule1
Every now and then I blog about pimatic at http://www.hendriks.software/tag/pimatic
-
Maybe that would help with my issue.
Its boring that i could Not run Pimatic and Magie Mirror on one pi. -
I have installed pimatic via docker with your image. Everything is working fine.
But the cron-timezone (UTC) on docker is different to the timezone on the hub (CEST).
How can I fix it?Sebastian
-
@shgmongo Try to run the container with option “-e TZ=Europe/Berlin”. If this does not help special action may be required to build the docker image including timezone maps and to setup the timezone as part of the entrypoint run script. For example:
Docker build
RUN apt-get update && apt-get install -y tzdata
Docker entrypoint script
# check if TZ is set, set to UTC otherwise, then execute: sudo dpkg-reconfigure -f noninteractive tzdata
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Using the base image I always create a docker image that includes all plugins I use. Recently I have added something to fix the timezone in there:
RUN ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
I prefer the solution above however…
Here is my complete dockerfile, for reference
FROM joshendriks/raspberry-pi2-pimatic:4 RUN ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime # Install pimatic modules RUN cd /home/pimatic-app && npm install --unsafe-perm mysql pimatic-homeduino pimatic-mqtt@0.9.6 pimatic-ds18b20 pimatic-node-red pimatic-smartmeter-gas pimatic-tplink-smartplug RUN cd /home/pimatic-app && npm install node-red-node-pushbullet RUN cd /home/pimatic-app && npm install node-red-node-smooth RUN cd /home/pimatic-app && npm install node-red-contrib-stoptimer RUN cd /home/pimatic-app && npm install node-red-contrib-http-request RUN cd /home/pimatic-app && npm install node-red-contrib-influxdb RUN cd /home/pimatic-app && npm install node-red-node-ping COPY config.master.json /home/pimatic-app/config.json # Run pimatic once so that all coffeescripts are built and npm packages are downloaded and built ## Make sure that pimatic will exit when startup is completed RUN cp /home/pimatic-app/node_modules/pimatic/startup.coffee /home/pimatic-app/node_modules/pimatic/startup.backup RUN sed -i "s/initComplete = true/framework.destroy().then( -> exit(0) )/g" /home/pimatic-app/node_modules/pimatic/startup.coffee ## Run pimatic RUN cd / && pimatic.js ## Restore startup.coffee and remove it from compiled cache RUN rm /home/pimatic-app/node_modules/pimatic/startup.coffee \ && mv /home/pimatic-app/node_modules/pimatic/startup.backup /home/pimatic-app/node_modules/pimatic/startup.coffee \ && rm /home/pimatic-app/node_modules/pimatic/.js/startup.* # Run pimatic.js at start of the container ENTRYPOINT ["pimatic.js"] EXPOSE 80 8000
Every now and then I blog about pimatic at http://www.hendriks.software/tag/pimatic
-
@mwittig
I tried your solution, but it doesn´t work. I don´t know why. Maybe it is my fault.@Jos-Hendriks
I will try your solution the next days. Thanks to you for your docker image. Pimatic works on my pi as a docker. I have now my own image, where everything is fine until the time zone. -
Are there any plans to migrate pimatic to node js 6.11 LTE or even version 8?
-
well, we need to do something … yes!
but what the best solution will be is still to be discussed.
maybe @mwittig or @sweetpi is able to tell morepimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
Any news guys?
-
@dk00000 said in Pimatic & Node 8.0:
Any news guys?
No. Everyone is very busy these days. I am shooting for Xmas holidays
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@jos-hendriks said in Pimatic & Node 8.0:
Back on-topic: I think we have to plan for an upgrade to node js version 8. As of April 2018 maintenance on 4.x ends: https://github.com/nodejs/LTS#lts-schedule1
Is this critical?
hope that my pimatic works well also after april 2018 🙂 -
@dk00000 said in Pimatic & Node 8.0:
Is this critical?
hope that my pimatic works well also after april 2018Yes. Certainly your stuff will also work after April 2018, however, using unsupported software is a risk.
The dependency on 4.x already is blocking issue as some libraries used for plugins have dropped 4.x support."It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@mwittig did a short test with node v6 and v8 today. I found some glitches, had to update some dependencies but overall it doesn’t look too bad. Could you explain, what the biggest problems are?
BTW: if anyone wants to try: https://github.com/michbeck100/pimatic/tree/node_v8
I didn’t do any bigger testing, so be prepared that not everything will be working. Just make sure to do a clean install of pimatic.
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
@michbeck100 I just noticed you upgraded coffeescript to 2.2.1.
I am surprised you were able to compile the code because for example this:
class ErrorDevice extends Device constructor: (@config, @error) -> @name = @config.name @id = @config.id super()
Should throw a coffee compile error because you can’t use this/@ on derived classes without first calling super()