Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket Event #702

Closed
oscarquiroz94 opened this issue Sep 28, 2021 · 1 comment
Closed

Websocket Event #702

oscarquiroz94 opened this issue Sep 28, 2021 · 1 comment

Comments

@oscarquiroz94
Copy link

I want to send a Json when the Charge event button has been pressed. I have this configuration:

events

But I never see that register in serial output when I push the Charge button:

serial

What am I doing wrong ?

  • Artisan Version: 2.4.4
  • Artisan Build: (1fb3d34)
  • Platform: Windows
  • Connected devices or roasting machine: Device Test

websocketEvent.zip

Regards!

@MAKOMO
Copy link
Member

MAKOMO commented Sep 29, 2021

You are using an outdated version of Artisan.

Don't escape JSON if used in non-substituting actions. Try

send({"pushMessage":"startRoasting"})

Substituting actions are custom button event actions and custom slider event actions where the event value is substituted. Escaping JSON in other places fails (silently).

If successfully send, you should also see a corresponding entry in the serial log.

I tried to improve the WebSocket documentation on this point: https://artisan-scope.org/devices/websockets/

@MAKOMO MAKOMO closed this as completed Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants