Webux Lab

By Studio Webux

Configure events and push notifications with cncjs

TG
Tommy Gingras Studio Webux 2021-10-12

Configure events with CNCJS

In this article I’ll quickly show how to configure 2 events to send push notifications to my Iphone.

Requirements

Steps

In cncjs webui you can navigate to

Create a new application in pushover

How to retrieve your user key ? Simply connect to your account in the web browser and you should get it there.

How to create an app ? On the same page at the bottom, you can click on create an Application/API Token or this URL : https://pushover.net/apps/build

How to use different sounds ? The existing sounds are availbale here : https://pushover.net/api#sounds There is also a new feature to upload custom sounds !

You can also change the message priority ! The documentation is available here : https://pushover.net/api#priority

First event

I want to know when the job is done,

Select the G-code: Stop event with the system as the trigger. The command is this one:

curl -s \
  --form-string "token=REPLACE_TOKEN" \
  --form-string "user=REPLACE_USER" \
  --form-string "message=CNC Job Done" \
  --form-string "priority=1" \
  --form-string "sound=bike" \
  --form-string "url=http://192.168.2.43:8000/" \
  https://api.pushover.net/1/messages.json

Second event

I want to get notified if the cnc is paused

Select the G-code: Stop event with the system as the trigger. The command is this one:

curl -s \
  --form-string "token=REPLACE_TOKEN" \
  --form-string "user=REPLACE_USER" \
  --form-string "message=CNC Job paused" \
  --form-string "priority=1" \
  --form-string "sound=falling" \
  --form-string "url=http://192.168.2.43:8000/" \
  https://api.pushover.net/1/messages.json


Search