Open Boeng01 opened 2 years ago
I've added PR fixing this. New firmware added layers, now it is possible to add sensors to return progress in layer number too. I didn't look at it but may get to it later.
Thanks for the response. Anything i can do to support?Am 01.04.2023 01:09 schrieb Darek Margas @.***>: I've added PR fixing this. New firmware added layers, now it is possible to add sensors to return progress in layer number too. I didn't look at it but may get to it later.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Thanks for the response. Anything i can do to support?
Not really, just wait until is merged into or use my fork till then.
Hey @Boeng01, unfortunately Adventurer 3 is the only printer I have on hand so it's really hard to debug it. If it's related to what @darek-margas wrote about (the printer returning info about layers) then the potential fix looks relatively straightforward; otherwise it'll be much harder.
I just pushed a new version of the integration 1.0.3, which adds some debug messages to logs. Can you update and also enable logging by setting this in your configuration.yaml
:
logger:
default: warn
logs:
custom_components.flashforge_adventurer_3: debug
and then paste the relevant logs here? For progress specifically we're interested in the ~M27
command.
Hey @Boeng01, unfortunately Adventurer 3 is the only printer I have on hand so it's really hard to debug it. If it's related to what @darek-margas wrote about (the printer returning info about layers) then the potential fix looks relatively straightforward; otherwise it'll be much harder.
It certainly works on my v4. I have no idea if this is v4 specific or just newer firmware added it. Regex fixed problem.
I just pushed a new version of the integration 1.0.3, which adds some debug messages to logs. Can you update and also enable logging by setting this in your
configuration.yaml
:logger: default: warn logs: custom_components.flashforge_adventurer_3: debug
and then paste the relevant logs here? For progress specifically we're interested in the
~M27
command.
Sorry for the delayed answer. I will test this as soon as i got time for it. Could be after the weekend. Thanks for looking into this :)
Guys, I did it by traffic capture hence my PR which works on my v4
Hey @Boeng01 @darek-margas, I just pushed the version 1.0.4 — can you try updating and telling me if the progress is reported now?
Will start a print job this morning and see what happens. Will give an answer soon.
Started a print and observed what happens. Unfortunately i get no progress indication on the entity. Looking at the debug-log there seems to happen something on Command M27 - here is a snip of the log:
2023-04-13 10:10:55.384 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M27 Received.\r\nSD printing byte 14/1000\r\nok\r\n' 2023-04-13 10:11:55.373 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M27" to the printer 2023-04-13 10:11:55.379 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M27 Received.\r\nSD printing byte 15/1000\r\nok\r\n' 2023-04-13 10:12:55.375 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M27" to the printer
It seems that the Progress is reported there, since M27 started at 0 and went up since start.
I updated the integration via HACS - do i have to reconfigure or re-add it on the devices tab? - edit: tried that, but the result is the same.
Started a print and observed what happens. Unfortunately i get no progress indication on the entity. Looking at the debug-log there seems to happen something on Command M27 - here is a snip of the log:
2023-04-13 10:10:55.384 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M27 Received.\r\nSD printing byte 14/1000\r\nok\r\n' 2023-04-13 10:11:55.373 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M27" to the printer 2023-04-13 10:11:55.379 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M27 Received.\r\nSD printing byte 15/1000\r\nok\r\n' 2023-04-13 10:12:55.375 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M27" to the printer
It seems that the Progress is reported there, since M27 started at 0 and went up since start.
I updated the integration via HACS - do i have to reconfigure or re-add it on the devices tab? - edit: tried that, but the result is the same.
Did you upgrade printer firmware to latest? Is it normal v4 or lite or something?
It's the latest Firmware i get, since the printer isn't able to update automatically any more after a defect motherboard change. The latest firmware on the website is older than the one on my printer, so i think it's the latest available for this model. Like i mentioned before it's an Guider 2S, not an Adventurer.
Like i mentioned before it's an Guider 2S, not an Adventurer.
OK, this makes sense. So it seems my Adventurer 4 sends progress in percents followed by layers, while yours sends progress in promiles and no layers. It seems it has to be back to printer choice and conditional regex or maybe multiple regex matching and selecting non-empty return.
Like i mentioned before it's an Guider 2S, not an Adventurer.
OK, this makes sense. So it seems my Adventurer 4 sends progress in percents followed by layers, while yours sends progress in promiles and no layers. It seems it has to be back to printer choice and conditional regex or maybe multiple regex matching and selecting non-empty return.
Not exactly sure if i know what you're talking about, but i'm sure you're right ;) anyway, can i do anything further to help getting this information for my printer usable in HA?
Hey @Boeng01, sorry for the delay. Quick question, when the message containing SD printing byte 15/1000
showed in the logs, do you remember if the print job progress as reported by the printer was 15% or 1.5%? Curious if those are really promiles or just a typo in the message 🤔
Hey @Boeng01, sorry for the delay. Quick question, when the message containing
SD printing byte 15/1000
showed in the logs, do you remember if the print job progress as reported by the printer was 15% or 1.5%? Curious if those are really promiles or just a typo in the message 🤔
No worries, finally it's not that i can't use the printer in this state. Thanks for looking into it further. I'm not sure, tbh, and have to check again with the next print. Right now i would say it was 15%, but to be sure i will check.
Thanks
I was wrong, it's promille:
2023-04-26 07:37:36.524 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M601 S1" to the printer 2023-04-26 07:37:36.532 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M601 Received.\r\nControl Success V2.1.\r\nok\r\n' 2023-04-26 07:37:36.533 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M27" to the printer 2023-04-26 07:37:36.540 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M27 Received.\r\nSD printing byte 741/1000\r\nok\r\n' 2023-04-26 07:37:36.540 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M105" to the printer 2023-04-26 07:37:36.547 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M105 Received.\r\nT0:210 /210 B:50/50\r\nok\r\n' 2023-04-26 07:37:36.548 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.sensor] Finished fetching My sensor data in 0.047 seconds (success: True) 2023-04-26 07:38:36.508 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M601 S1" to the printer 2023-04-26 07:38:36.521 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M601 Received.\r\nControl Success V2.1.\r\nok\r\n' 2023-04-26 07:38:36.521 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M27" to the printer 2023-04-26 07:38:36.537 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M27 Received.\r\nSD printing byte 742/1000\r\nok\r\n' 2023-04-26 07:38:36.537 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Sent "~M105" to the printer 2023-04-26 07:38:36.546 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.protocol] Response from the printer: b'CMD M105 Received.\r\nT0:210 /210 B:50/50\r\nok\r\n' 2023-04-26 07:38:36.547 DEBUG (MainThread) [custom_components.flashforge_adventurer_3.sensor] Finished fetching My sensor data in 0.059 seconds (success: True)
I was wrong, it's promille:
That was my guess in my previous comment.
I see, thanks @Boeng01! I just pushed a small update (commit 1c6e36066abebd22599d8bc698141c11fa91fb8e), can you try installing the master version (as opposed to 1.0.4) and tell me whether the progress is there? Cheers 🙂
Looks good to me :) Thank you very much!
Maybe you should rename the integration at one point, since it's working on mor than 'adventurer 3' machines now?
Maybe you should rename the integration at one point, since it's working on mor than 'adventurer 3' machines now?
Thanks! I thought about it at one point and decided to make this integration specific to Adventurer 3 only, as that's the printer I have so I can ensure it's always supported. If I made it target all Flashforge printers then maintaining it would require much bigger effort from me 🙂
Oh, i understand. Thanks for replying. That makes sense. So it stays with this name and just works for my printer - i'm absoluteley fine with that :) Great work, thanks a lot.
First of all thanks a lot for this integration. I'm using it with a FlashForge Guider 2S and can confirm that it works nearly flawlessly with this Model.
Only thing i mentioned is that the progress state isn't recognized - so it's always 0% Every other state - status of the printer, temperature, camera etc. is recognized perfectly. Is there anything i can do to get the progress recognition working? Would be happy to share any helpful things since i'm not able to code myself.
Thanks