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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login