Read the statement by Michael Teeuw here.
Ideas Needed
-
@MilkShake right, but now you gotta figure out how to execute it and u can’t do that from the browser, so now you need a node_helper and all that communication, and launching the ting in the background, etc,etc,etc)
-
@sdetweil I’m not following your point. I get it that I could do the GET from javascript instead of running a script, but the rest you might elaborate a bit more on :)
-
@MilkShake show me your script that is called when the action occurs
-
@sdetweil my whole point is, since the action happens on the google assistant I would need to do port forwards in my firewall to be able to call a LAN URL with a GET method. I guess it would be possible to catch the event locally on the mirror and then call the python script or do the GET method in some other manner, but I don’t know how to do that.
One option would be to just add a physical button to the raspberry pi and when pressed it runs the GET method. It just annoys me that you can make the assistant understand a command, but not utilize it locally on LAN.
-
@retroflex The mirror and the gate are on the same LAN. The assistant understands the “Open Gate” command and replies with “Ok, Opening the gate”, but if I were to use a Google Action to do the GET, it would come from the internet.
I don’t know how to catch the event locally on the mirror. If I did, I would just call the python script and the gate would open.
-
@MilkShake the actions run locally on the mirror, they are TRIGGERED from the module… not as callbacks I don’t think
(i haven’t done that myself, but it seemed logical before) the old recipe stuffyou just create a little script in maybe the new A2D but old assistant had it to to trigger events…
here is fiddling with the radio on the mirror
https://github.com/bugsounet/MMM-Assistant2Display/wiki/Radio_help
-
How I do URL calls in python is through urllib.request - import that library then:
urllib.request.urlopen("http://pi.hole:60001/remote?action=MONITORTOGGLE")Depends on how far outside you wanna go outside the MM ecosystem.
edit: reminds me, I gotta re-write that for the new config, pi-hole and the mirror being two different units now.
-
@BKeyport but u have to use a helper to launch the python code…
way overhead for a fetch or post -
@sdetweil True, if you’re staying in the MM ecosystem - in my case, I couldn’t get the modules I wanted to work the way I wanted, so I wrote up a python script to cover it, and it runs independently of MM
He wanted a python method, so I gave him options.
-
-
I went the way of dataplicity.io/wormhole, NGINX, IFTTT and MMM-NotificationTrigger. That way I should be able to use a webhook to execute the python script.
-
@Bugsounet Thanks Bugs! I will look into that when I have time for it.
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