FTP and MQTT password after update

HElo,

I now can connet via MQTT to my X1C. Thanks for Help. - GREAT !

I want to turn power off via SEHLLY Device when print is ready. wich parameter shows that printer can be turn off the power?

{
“print”: {
“ams”: {
“ams”: [
{
“humidity”: “4”,
“id”: “0”,
“temp”: “20.5”,
“tray”: [
{
“id”: “0”
},
{
“bed_temp”: “0”,
“bed_temp_type”: “0”,
“cali_idx”: -1,
“cols”: [
“16161FF”
],
“ctype”: 0,
“drying_temp”: “0”,
“drying_time”: “0”,
“id”: “1”,
“nozzle_temp_max”: “20”,
“nozzle_temp_min”: “190”,
“remain”: -1,
“tag_uid”: “000000000000000”,
“tray_color”: “1616FF”,
“tray_diameter”: “0.00”,
“tray_id_name”: “”,
“tray_info_idx”: “GFL5”,
“tray_sub_brands”: “”,
“tray_type”: “PLA”,
“tray_uuid”: “00000000000000000000000000000000”,
“tray_weight”: “0”,
“xcam_info”: “000000000000000000000000”
},
{
“bed_temp”: “0”,
“bed_temp_type”: “0”,
“cali_idx”: -1,
“cols”: [
“161616FF”
],
“ctype”: 0,
“drying_temp”: “0”,
“drying_time”: “0”,
“id”: “2”,
“nozzle_temp_max”: “240”,
“nozzle_temp_min”: “190”,
“remain”: -1,
“tag_uid”: “000000000000000”,
“tray_color”: “16166FF”,
“tray_diameter”: “0.00”,
“tray_id_name”: “”,
“tray_info_idx”: “GFL95”,
“tray_sub_brands”: “”,
“tray_type”: “PLA”,
“tray_uuid”: “000000000000000000000000000000”,
“tray_weight”: “0”,
“xcam_info”: “0000000000000000000000”
},
{
“bed_temp”: “45”,
“bed_temp_type”: “1”,
“cali_idx”: -1,
“cols”: [
“00AE4FF”
],
“ctype”: 0,
“drying_temp”: “55”,
“drying_time”: “8”,
“id”: “3”,
“nozzle_temp_max”: “230”,
“nozzle_temp_min”: “190”,
“remain”: 79,
“tag_uid”: “ADBD281000000”,
“tray_color”: “00AE2FF”,
“tray_diameter”: “1.75”,
“tray_id_name”: “00-G6”,
“tray_info_idx”: “GFA00”,
“tray_sub_brands”: “PLA Basic”,
“tray_type”: “PLA”,
“tray_uuid”: “77FDADEE154E3E9AFBCF8CB5F6”,
“tray_weight”: “1000”,
“xcam_info”: “8813813E803E039993F”
}
]
}
],
“ams_exist_bits”: “1”,
“insert_flag”: true,
“power_on_flag”: false,
“tray_exist_bits”: “e”,
“tray_is_bbl_bits”: “e”,
“tray_now”: “2”,
“tray_pre”: “2”,
“tray_read_done_bits”: “e”,
“tray_reading_bits”: “0”,
“tray_tar”: “2”,
“version”: 86
},
“ams_rfid_status”: 2,
“ams_status”: 768,
“aux_part_fan”: true,
“bed_target_temper”: 65.0,
“bed_temper”: 65.0,
“big_fan1_speed”: “6”,
“big_fan2_speed”: “10”,
“cali_version”: 0,
“chamber_temper”: 24.0,
“command”: “push_status”,
“cooling_fan_speed”: “0”,
“ctt”: 0,
“fail_reason”: “0”,
“fan_gear”: 11822080,
“filam_bak”: [
6
],
“force_upgrade”: false,
“gcode_file”: “/data/Metadata/plate_1.gcode”,
“gcode_file_prepare_percent”: “100”,
“gcode_start_time”: “1707377”,
“gcode_state”: “RUNNING”,
“heatbreak_fan_speed”: “14”,
“hms”: ,
“home_flag”: 640646,
“hw_switch_state”: 1,
“ipcam”: {
“ipcam_dev”: “1”,
“ipcam_record”: “disable”,
“mode_bits”: 2,
“resolution”: “1080p”,
“rtsp_url”: “rtsps://19.168.:322/streaming/live/1”,
“timelapse”: “disable”,
“tutk_server”: “enable”
},
“job_id”: “754559”,
“layer_num”: 0,
“lifecycle”: “product”,
“lights_report”: [
{
“mode”: “on”,
“node”: “chamber_light”
},
{
“mode”: “flashing”,
“node”: “work_light”
}
],
“maintain”: 3,
“mc_percent”: 20,
“mc_print_error_code”: “0”,
“mc_print_stage”: “2”,
“mc_print_sub_stage”: 0,
“mc_remaining_time”: 16,
“mess_production_state”: “active”,
“net”: {
“conf”: 16,
“info”: [
{
“ip”: 3183064,
“mask”: 16215
},
{
“ip”: 0,
“mask”: 0
}
]
},
“nozzle_diameter”: “0.4”,
“nozzle_target_temper”: 210.0,
“nozzle_temper”: 222.0,
“nozzle_type”: “hardened_steel”,
“online”: {
“ahb”: false,
“ext”: false,
“version”: 7
},
“print_error”: 0,
“print_gcode_action”: 2,
“print_real_action”: 0,
“print_type”: “cloud”,
“profile_id”: “56297”,
“project_id”: “57102”,
“queue_est”: 0,
“queue_number”: 0,
“queue_sts”: 0,
“queue_total”: 0,
“s_obj”: ,
“sdcard”: true,
“sequence_id”: “201”,
“spd_lvl”: 2,
“spd_mag”: 100,
“stg”: [
2,
14,
1,
8
],
“stg_cur”: 2,
“subtask_id”: “12428”,
“subtask_name”: “Ausleger_Single_V2”,
“task_id”: “1148227”,
“total_layer_num”: 125,
“upgrade_state”: {
“ahb_new_version_number”: “”,
“ams_new_version_number”: “”,
“consistency_request”: false,
“dis_state”: 0,
“err_code”: 0,
“ext_new_version_number”: “”,
“force_upgrade”: false,
“idx”: 7,
“message”: “”,
“module”: “null”,
“new_version_state”: 2,
“ota_new_version_number”: “”,
“progress”: “0”,
“sequenceid”: 0,
“sn”: “00M09A62”,
“status”: “IDLE”
},
“upload”: {
“file_size”: 0,
“finish_size”: 0,
“message”: “Good”,
“oss_url”: “”,
“progress”: 0,
“sequence_id”: “003”,
“speed”: 0,
“status”: “idle”,
“task_id”: “”,
“time_remaining”: 0,
“trouble_id”: “”
},
“vt_tray”: {
“bed_temp”: “0”,
“bed_temp_type”: “0”,
“cali_idx”: -1,
“cols”: [
“76D9F4FF”
],
“ctype”: 0,
“drying_temp”: “0”,
“drying_time”: “0”,
“id”: “254”,
“nozzle_temp_max”: “240”,
“nozzle_temp_min”: “190”,
“remain”: 0,
“tag_uid”: “000000000000000”,
“tray_color”: “769FFF”,
“tray_diameter”: “0.00”,
“tray_id_name”: “”,
“tray_info_idx”: “GFL9”,
“tray_sub_brands”: “”,
“tray_type”: “PLA”,
“tray_uuid”: “00000000000000000000000000000000”,
“tray_weight”: “0”,
“xcam_info”: “000000000000000000000000”
},
“wifi_signal”: “-65dBm”,
“xcam”: {
“allow_skip_parts”: false,
“buildplate_marker_detector”: true,
“first_layer_inspector”: true,
“halt_print_sensitivity”: “high”,
“print_halt”: true,
“printing_monitor”: true,
“spaghetti_detector”: true
},
“xcam_status”: “0”
}
}

I am pretty sure that there is no MQTT-based command to turn off the printer, you need to do that using hardware (i.e. physically flip the switch or the power socket). I could be wrong, but that’s what I believe is the case.

Sorry,
I just need to know how to find out via mqtt, that the pint job is done. Then I am able to send a MQTT Commend to an external power switch. I only want to know how shows the JSON Data that the print job ist finished. Thanks.

I’m just piggybacking on this thread but maybe some can help me here.

ok… I’m trying to connect to the FTP server via python … I can connect just fine using FileZilla and accepting the certificate. I’m trying to automate a cleanup that I schedule (copy timelapse videos off and then delete, clear out old models etc)… but I tried both with powershell and python to connect to the FTP server (telling it to connect on 990 and force implicit FTP over tls) but in both cases it just times out. I verify the port is open before even trying to connect. I have also said “auto accept any certificates from the server” but it doesn’t seem to be working … anyone want to help me figure this out? here is my code… I even added some error handles to see if I got anything back but it’s just a generic timeout.

import ftplib
import ssl
import socket

# Define FTP server details
ftp_server = '<p1s-ip>'
ftp_user = 'bblp'
ftp_password = '<p1s-accesscode>'

# Create an SSL context to accept any certificates
context = ssl.create_default_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE

try:
    # Check network connectivity
    print(f"Checking connectivity to {ftp_server}...")
    socket.create_connection((ftp_server, 990), timeout=10)
    print("Network connectivity check passed.")

    # Connect to the FTP server using implicit FTP over TLS with a timeout
    ftp = ftplib.FTP_TLS(context=context)
    print(f"Connecting to {ftp_server} on port 990...")
    ftp.connect(ftp_server, 990, timeout=20)  # Increase timeout to 20 seconds
    ftp.login(ftp_user, ftp_password)

    # Force the control connection to be encrypted
    ftp.prot_p()

    print("Connection established and secured with FTP over TLS")

    # Perform FTP operations here
    # Example: List directory contents
    ftp.retrlines('LIST')

    # Close the connection
    ftp.quit()

except ftplib.all_errors as e:
    print(f"FTP error: {e}")
except socket.timeout:
    print("Connection timed out")
except Exception as e:
    print(f"An error occurred: {e}")

I just times out … seems like it’s not getting the cert or something.