Read the statement by Michael Teeuw here.
Starting from an existing module?
-
I saw in this post a couple of people recommend starting with an existing module when attempting to create your own module.
I have a JSON command that returns information I was to display on my Magic Mirror.
The only two variables I want to specify in the config are the device IDs to pass to the JSON command and the amount of time (in minutes?) I would like to refresh this data.
What would be a good module to start with for these requirements?
-
@sifuhall what is the ‘json command’ written in? python?
see my PythonPrint module
https://github.com/sdetweil/MMM-PythonPrintwhich launches a python script, captures it’s print/stdout content, and sends it to the front end to process
it can launch python scripts that output repeatedly over time, or it can launch a one time script on some timed cycle
-
Thanks for the reply.
The JSON command works from a browser.
This is the command
http://192.168.1.9/JSON?request=getstatus&ref=260,175,233260,175,233 would be the IDs I would like to pass
-
@sifuhall you should be able to do that right in the browser side with built in fetch()
-
@sdetweil Thank you
-
@sifuhall my SampleModule has all the parts. u won’t need the helper if fetch works