node-red function

324 views
Skip to first unread message

Adrian Tabacaru

unread,
Jul 12, 2021, 3:04:03 PM7/12/21
to motioneye
Hello, I got started with motioneye and I love it.
I've seen it has a node-red implementation and I would like to know if someone is using it.
I would like to trigger some actions in node-red using the camera motion detection.
I'm not that good at coding and I am asking here for some guidance since I cannot find any documentation regarding this.
For example, what should I write in the "Parameter Name" on the nodered module?
Thank you!
Adrian

Screenshot 2021-07-12 220210.png

StarbaseSSD

unread,
Jul 12, 2021, 3:14:06 PM7/12/21
to motioneye
No idea, however, if you can get your nodered module script working, you could then call that script by using Settings, Motion Notification, and use Run A Command, Run An End Command, or Call A Webhook as appropriate.

Adrian Tabacaru

unread,
Jul 12, 2021, 4:57:49 PM7/12/21
to motioneye
I was trying to use automations and to send a webhook with no luck and probabbly it is not working because my home assistant runs through a secured duck dns protocol.
What are you sugesting? I have no clue in setting up the nodered module, my initial question was about how to set the parameter name inside nodered, and also what command to send from motion eye.
Can you advise please?
Thank you!

StarbaseSSD

unread,
Jul 12, 2021, 5:05:06 PM7/12/21
to motioneye
If you are using the system 'Home Assistant' then you are outside my purview of support.
I am not a nodered programmer, either.
What are you trying to accomplish?
Depending on what you are trying to do, there may be many ways to accomplish it.
For example, I have a script (autoclean.py) that cleans up files older than 'x' number of days.
I can have it run after each motion detection (Run End Command) or however often I want (crontab)
I have a script that plays an .MP3 file as a doorbell when it sees motion (Run A Command)

StarbaseSSD

unread,
Jul 12, 2021, 5:07:26 PM7/12/21
to motioneye
Here's a link to a nice tutorial oriented towards Home Assistant and has links to many more.

Adrian Tabacaru

unread,
Jul 12, 2021, 6:36:09 PM7/12/21
to motioneye
Thanks!
Can you paste the link please?

My goal is to turn on some lights in home assistant when motion is detected by motioneye.
First attempt was to call a webhook to http://my_local_IP:8123/api/webhook/motion_cam_motion
and this webhook should trigger a Home Assistant automation:
-  alias: testCamera
   id: dhfajksdhfajddfghdgfhdshfla
   trigger:
    - platform: webhook
      webhook_id: motion_cam_motion
   action:
    - service: light.turn_on
      target:
        entity_id: light.sonoff_1000dbc6a6
   mode: single

My Home Assistant runs under duckdns and is accessed via https://my_domain.duckdns.org and the webhooc call seems to be lost on its way.

Can you tell me more about the Run A Command in motion eye? is there a way to send it into home assistant?
Thanks!

StarbaseSSD

unread,
Jul 12, 2021, 6:49:45 PM7/12/21
to motioneye
Several links there to other tutorials / ideas.

I support motioneye & motionEyeOS. There are many issues with them and some other programs (like Home Assistant, Portainer, Proxmox, nginx, etc...) that I am not able to resolve. The more layers you use. the harder it is to sort them out.
MotionEye/motionEyeOS work well, can be used in docker, stand alone, in another OS like Ubuntu or other Linuxs, etc. As to adding in Node red, again I am not a programmer (visual or otherwise). I do well enough with python and bash/sh, but you'll need to discuss in depth with a node red user group.

Good luck...




Adrian Tabacaru

unread,
Jul 12, 2021, 6:54:38 PM7/12/21
to motioneye
Thank you so much for your time!
Cheers! Keep it safe&creative!
Adrian
Reply all
Reply to author
Forward
0 new messages