I didn't remove anything I just set the switch to use a local deployment. I checked and my Heroku instance is still there.
Recommend you login to Heroku and put the instance into Maintenance mode anyway. I found in my case the app in Hubitat had switched back to Heroku instead of local and I hadn't noticed as the Heroku server was still running. I had to reset and go through local setup again.
For those that want to do this it was pretty easy.(It did take me about 5 hours though.)
What I did.
-
installed raspberry OS on a memeory card using the Rasperry OS imager
-
enabled VNC so I could use the VNC viewer. Had to temporarily connect a monitor, keyboard and mouse to my RPI.
-
installed NodeJS and npm I used the instructions on this page
-
then pasted the lines listed above by User2305.
-
redeployed the server locally.
Seems to be working. Good luck
For reference on #2 you can setup RPI completely headless without needing monitor/keyboard if you enable ssh on the sd card after burning the rpi image.
I don't know if it was coincidence or the actual solution, but after I did:
sudo pm2 restart index.js
it managed to authenticate on the first try.
That’d be trivial to dockerize. Wasn’t there another component, like a web socket server or is that in that node,js app?
I realize that this may belong in another thread (if the moderators feel so, please do not hesitate to move this) but it is related to questions I have regarding getting Echo Speaks V4 to be hosted locally. I have absolutely no experience nor knowledge utilizing a RPi, docker containers etc, but am confident that I can just follow the guides to figure it out. I understand that running a RPi sucks up considerably less energy than even a mini pc. However, I also read (don’t know how valid this is in this use case though) that the limited read/write cycles of a microSD card typically used with an RPi may limit its lifetime.
Couple of questions:
- what is a relatively “robust” RPi model that can easily serve as a local host for Echo Speaks (e.g., Model 3 or 4, Ram needed, cooling needs, etc) with some overhead room so it is not overly “stressed”?
- am I better off using an external larger drive to the RPi for longevity when hosting rather than using an microSD card?
- how long for MTBF can I expect if the RPi selected in question 1 above if it is used principally to just get Echo Speaks to continue working without Heroku?
- am I better off just using a cheap PC running say Windows10 (assuming it can serve as a container) as a NAS? Will this be more reliable?
Sorry for all the noob questions but I’d like to learn how to best approach this. Given the situation with Echo Speaks and Heroku, I have decided to consider the Heroku policy change as just an “opportunity” to learn something new while getting into a new project, LOL. Thanks for any guidance.
echo speaks server takes almost no cpu time. The docker file however is 1GB. No doubt it takes memory but probably not a matching 1GB. I would not run it on a pi zero w although there would be plenty of cycles just not enough memory, IMO. Pi3 or more would be fine - If you can find one and you probably can't. Since echo speaks server barely does anything with disk I/O after startup, an SD card should last for a few years and probably many more. I put a SSD on my pi4's but that ups the price since you'll eventually want a case to hold both of them. It is not a really a set and forget thing. Pay the money to heroku if you want set and forget. Damn near any pc or mac that boots and runs 24X7 can run docker containers.
I picked up a 2 core celeron/4G/128GB mini PC for $160 and installed Mint on it. Cheaper than a pi4 these days. Plenty of space.
Ain't that the sad truth. I look forward to when they can get the supply chain back in shape and those are back sub-$80.
Thanks for all the info @ccoupe! I really appreciate it! I guess we were fortunate and should be grateful that we got a number of years out of heroku at N/C. Like I said, looking at this as part of a “hobby”, I am trying to keep a positive mindset on this as an opportunity to learn something new. Thanks again for your insight and contributions to this thread.
Better off just getting a docker compatible NAS.
What Dockerfile?
The Dockerfile in the correct repo. Branch docker-enablement of https://github.com/TonyFleisher/echo-speaks-server.git . I have that code running w/o docker. I thought I had it working with Docker but every time portainer gets a sniff of it , it seem not to work.
Interesting, I'll take a look. I have taken a stab at it before I saw your post and it looked like this:
FROM node:18-alpine
RUN apk add git
ENV npm_config_loglevel=silent
WORKDIR /app
RUN npm install https://github.com/tonesto7/echo-speaks-server
EXPOSE 8091
WORKDIR /app/node_modules/echo-speaks-server
CMD node index.js
It might be missing a few things that I'll tinker with but by using node:18-alpine (or node:16-alpine or node-16-slim), it'll be quite a bit smaller, I am sure.
Let me know in PM what you come up with. This is probably the wrong place for Docker troubleshooting. We should probably create a github issue for that.
I ordered my Pi3 b+ back in 2019 from amazon, it cost $38.30. They still have them in stock but it's $180.00 now
Similar with the Coral USB for image processing. Emphasizes how great a deal the C7 is!
If we get a docker image I have a linux system ready and willing
Likewise, my OMV server is already running half a dozen docker images.
Better off just getting a docker compatible NAS.
Would this mean that your dirty IoT stuff is on the same LAN as your NAS .. ? If so, I feel this is a no-no