Read the statement by Michael Teeuw here.
Add data from another Pi
-
If you use Apache and PHP you could create a php script which delivers JSON (or XML) data based on the query and is called by the other raspberry. I would avoid saving data into a text file on the Apache PI and having the MM² PI opening this text file. That could cause trouble when the file is in use (data is currently being written into the file).
-
@yawns said in Add data from another Pi:
…you could create a php script which delivers JSON (or XML) data…
Beyond my capabilities, I’ll keep looking though. Thank you.
-
Okay, one step back …
Your data is stored in your mysql database, right? How is this data stored there? Did you program a script? Or are you using a script/system from the internet? Maybe there already is some kind of a backend you could use? -
@yawns said in Add data from another Pi:
Okay, one step back …
Your data is stored in your mysql database, right?Yes, correct
@yawns said in Add data from another Pi:
How is this data stored there? Did you program a script?
It’s a couple of temperature sensors which are written to the MySQL DB via a .py script.
-
serving it up via Apache/MySQL/PHP.
I can help modify the scrip that servers up the data for viewing and instead of returning HTML it could easily return JSON. That would be step one. To help I would need to see your php files and know what url you are using to access the PHP page. either PM them to me, or point me at a repo.
Step two would be writing a MM module that gets the JSON and displays it right. I may be able help here too.
-
-
Have emailed you with some instructions, but check:
[card:izanbard/MMM-MyTemps]
for the full source -
Thanks for all your work on this, it’s working great!