Look at this quick and dirty solution:
New Script SNStatusV2.py to test here:
There is some complicated thing about getting the Auth-Token.
If it does not work the first time with granting permission on the Touchscreen, just delete the file SMToken.txt and try again.
Would recommend to start the script in manual mode that you can see what happens. After this you can put it again in a cronjob.
Remember: Everytime the script connects, the Touchscreen will be locked.
And here the new template to match all the values:
# Snapmaker JSON Webhook
- trigger:
- platform: webhook
webhook_id: wh-snapmakera350
allowed_methods:
- POST
- PUT
local_only: true
sensor:
- name: "Snapmaker State"
state: "{{ trigger.json.snStatus }}"
- name: "Snapmaker IP"
state: "{{ trigger.json.snIP }}"
- name: "Nozzle Temp"
unit_of_measurement: "°C"
state: "{{ trigger.json.snNozzleTemp }}"
- name: "Nozzle Target Temp"
unit_of_measurement: "°C"
state: "{{ trigger.json.snNozzleTaTemp }}"
- name: "Heated Bed Temp"
unit_of_measurement: "°C"
state: "{{ trigger.json.snHeatedBedTemp }}"
- name: "Heated Bed Target Temp"
unit_of_measurement: "°C"
state: "{{ trigger.json.snHeatedBedTaTemp }}"
- name: "File Name"
state: "{{ trigger.json.snFileName }}"
- name: "Progress"
unit_of_measurement: "%"
state: "{{ trigger.json.snProgress }}"
- name: "Elapsed Time"
state: "{{ trigger.json.snElapsedTime }}"
- name: "Remaining Time"
state: "{{ trigger.json.snRemainingTime }}"
BTW: Stay kind with me, I am not a programmer ![]()
