Go to advanced search

by Eternyt
Fri Aug 03, 2018 10:16 am
Forum: Other programming languages
Topic: Variable as 0 when returned NodeJS
Replies: 9
Views: 1900

Re: Variable as 0 when returned NodeJS

Ok!

Many thanks!
by Eternyt
Thu Aug 02, 2018 2:15 pm
Forum: Other programming languages
Topic: Variable as 0 when returned NodeJS
Replies: 9
Views: 1900

Re: Variable as 0 when returned NodeJS

Many thanks for all the response! Ended up with a very similar code: var express = require('express'); var http = require('http'); var https = require('https'); var fs = require('fs'); var bodyParser = require("body-parser"); var sqlite3 = require('sqlite3').verbose(); var db = new sqlite3.Database(...
by Eternyt
Thu Aug 02, 2018 12:40 pm
Forum: Other programming languages
Topic: Variable as 0 when returned NodeJS
Replies: 9
Views: 1900

Re: Variable as 0 when returned NodeJS

Tried the code and I started to understand the logic.
But NodeJS is throwing the error that "res" in getHum() is not defined and I have no idea on how to make it global :(
by Eternyt
Thu Aug 02, 2018 9:20 am
Forum: Other programming languages
Topic: Variable as 0 when returned NodeJS
Replies: 9
Views: 1900

Re: Variable as 0 when returned NodeJS

Thank you! I thought it was that the problem.
Now, whats the best way rewrite it and made it actually work?

Thanks again!
by Eternyt
Wed Aug 01, 2018 9:41 am
Forum: Other programming languages
Topic: Variable as 0 when returned NodeJS
Replies: 9
Views: 1900

Variable as 0 when returned NodeJS

Hi, I have this function at the bottom of my code outside every other function: function getTemp() { db.get("SELECT temperature FROM valuex ORDER BY dateID DESC LIMIT 1", function(err, row) { console.log("Database response " + row.temperature); return row.temperature; }); } And I need to retrieve th...
by Eternyt
Sun Jul 29, 2018 4:15 pm
Forum: Networking and servers
Topic: Webhook from dialogflow to raspberry
Replies: 1
Views: 1077

Webhook from dialogflow to raspberry

Hi, I'm building a small integration to my google home mini (like an Amazon skill) and after training DialogFlow(old API.AI) now I'm struggling with the fulfilment part. After I collect the data I need to send that data to my RasPi3 that is currently running as a web server (Apache2 - PHP7 combo), p...
by Eternyt
Tue Jun 05, 2018 4:38 pm
Forum: General discussion
Topic: Make a custom "skill" on google home mini
Replies: 1
Views: 310

Make a custom "skill" on google home mini

Hi, It's a while now that my raspberryPi 3 collect data temperature and store that on an SQLite3 database. so I can view that on the go using a webpage. Now I want to put my project a step further. I recently received a google home mini, and my intent is to make a custom action where I ask my assist...
by Eternyt
Wed Apr 25, 2018 5:11 pm
Forum: General discussion
Topic: Octopi remote acces with a separate server already running on the same network
Replies: 2
Views: 241

Octopi remote acces with a separate server already running on the same network

Hi, I'm trying to figure out how to access my octopi remotely without luck. I think the problem is that I have already a port forwarding on port 80 443 and 22 to another raspberry that is running as an Apache2 web server so the default port 80 is already used. I tried to change the default port to s...
by Eternyt
Sun Apr 22, 2018 10:20 am
Forum: General discussion
Topic: noip.com Dynamic Update Client sometimes stop working
Replies: 4
Views: 1167

Re: noip.com Dynamic Update Client sometimes stop working

For downloading and installing the package I used this guide: https://www.noip.com/support/knowledgeb ... pberry-pi/
The client runs just a service, the one that updates every 5 minutes my IP address.

Thanks!
by Eternyt
Sat Apr 21, 2018 1:00 pm
Forum: General discussion
Topic: noip.com Dynamic Update Client sometimes stop working
Replies: 4
Views: 1167

Re: noip.com Dynamic Update Client sometimes stop working

- Yes, noip2 Version Linux-2.1.9
- Because the link does not work anymore. Then I check in the noip site the last update of my link and also using

Code: Select all

 sudo noip2 -S 
- Generally, my ISP change my public IP address every day, sometimes twice a day.

Thanks!
by Eternyt
Fri Apr 20, 2018 5:54 pm
Forum: General discussion
Topic: noip.com Dynamic Update Client sometimes stop working
Replies: 4
Views: 1167

noip.com Dynamic Update Client sometimes stop working

Hi all, Today is the second time in this week that the noip Dynamic Update Client stop working on my Raspberry Pi 3. I'm not so expert and, apart from resetting the Updater as new every time, I don't know what to do. Any suggestion on how to fix permanently this problem? Sorry for the very few infor...
by Eternyt
Tue Mar 06, 2018 7:15 pm
Forum: General discussion
Topic: Make the public router ip address static
Replies: 8
Views: 896

Re: Make the public router ip address static

If your Pi is providing the DNS how can you make a DNS query from it if you don't know what IP address it has at the time?
Ok, I'm an idiot.
by Eternyt
Tue Mar 06, 2018 5:46 pm
Forum: General discussion
Topic: Make the public router ip address static
Replies: 8
Views: 896

Re: Make the public router ip address static

Ok, I just tried.
Now, I see that is possible to create a raspberry DNS server. Can my raspberry became also a DNS service that works just for itself or must be two different devices?
by Eternyt
Tue Mar 06, 2018 5:30 pm
Forum: General discussion
Topic: Make the public router ip address static
Replies: 8
Views: 896

Make the public router ip address static

Hi, In order to connect to my raspberry remotely, I have to know my router public IP address, which forwards my request to my raspberry. The problem is that the IP address is changing daily and it's a bit stressful to reset all the days the new IP address to all the services that are using my raspbe...
by Eternyt
Mon Feb 26, 2018 10:28 pm
Forum: General discussion
Topic: connect php script to local SQLite
Replies: 6
Views: 521

Re: connect php script to local SQLite

Ok, I just changed documentation page to match my real database and guess... problem solved! With SQLite, I have to insert the location as expected.
Thanks!
by Eternyt
Mon Feb 26, 2018 9:55 pm
Forum: General discussion
Topic: connect php script to local SQLite
Replies: 6
Views: 521

Re: connect php script to local mySQL

Ah sorry, I see now my typing error. I'm using SQLite3 not mySQL. Sorry againg.
by Eternyt
Mon Feb 26, 2018 9:36 pm
Forum: General discussion
Topic: connect php script to local SQLite
Replies: 6
Views: 521

Re: connect php script to local mySQL

I've created a database typing "sqlite3 test.db" and then the commands (inside the sqlite3 command line) for creating and populating the tables.
by Eternyt
Mon Feb 26, 2018 7:53 pm
Forum: General discussion
Topic: connect php script to local SQLite
Replies: 6
Views: 521

connect php script to local SQLite

I see from all the documentation that I have to put "localhost", "user", "password", "database" in the new mysqli request. The fact is that the SQLite database file is already in my raspberry pi, just in another directory (not in Apache web directory but in my $user directory). I tried many combinat...
by Eternyt
Sun Feb 18, 2018 11:03 am
Forum: General discussion
Topic: Access SQLite data from javascript
Replies: 6
Views: 4364

Re: Access SQLite data from javascript

Thanks for the response, the fact is that I have already an Apache server up and running because of nextCloud, so adding a new server I thought it will not be a great idea. I know that I can redirect from Apache to node.js, but I'm not an expert and I prefer to keep things as simple as possible. I h...
by Eternyt
Sun Feb 11, 2018 1:01 pm
Forum: General discussion
Topic: Access SQLite data from javascript
Replies: 6
Views: 4364

Re: Access SQLite data from javascript

I know that I can easily do that with node.js, I already made some research. The point is to do that in a pure javascript script called from the HTML file. The database is not on the server (I don't know how to put it in) but all the rest will be running on an Apache server on the same Raspberry.
by Eternyt
Sun Feb 11, 2018 11:26 am
Forum: General discussion
Topic: Access SQLite data from javascript
Replies: 6
Views: 4364

Access SQLite data from javascript

The question is simple: I want to display data (that are stored in an SQLite3 database) in an HTML page. For doing that, I need that my js script is able to access this data. What's the best way to access this data and import it in js?
Thanks!
by Eternyt
Wed Feb 07, 2018 5:54 pm
Forum: General discussion
Topic: Python script with cron not working
Replies: 5
Views: 3613

Re: Python script with cron not working

Thanks! Fix it, now works fine.
by Eternyt
Wed Feb 07, 2018 4:38 pm
Forum: General discussion
Topic: Python script with cron not working
Replies: 5
Views: 3613

Re: Python script with cron not working

Thanks for the suggestion, I've already imagined that there is some better method out there for the "every 5 minute" than mine. And thanks for the log suggestion, I probably spot the error. In my script I open a sqlite3 database in the same directory of the script, so I do not specify the entire pat...
by Eternyt
Wed Feb 07, 2018 4:14 pm
Forum: General discussion
Topic: Python script with cron not working
Replies: 5
Views: 3613

Python script with cron not working

Hi, I already use cron to run a PHP script every 15 minutes, and all works fine. Today I decided to add a python script to my crontab, but no matter what I do, it simply does not work. I also tried with a hello world python script to make sure that wasn't a problem with my script (that if I run norm...

Go to advanced search