Closed Cres09 closed 1 month ago
In the db flow, could you try clicking the box next to this "Force Init" node?
This should force the DB to be created. Otherwise, the table "should" be created if not exists anytime a print triggers. In the DB flow, can you tell me what it shows below this node when you start a new print? Maybe check this before clicking the force-init node actually.
If it doesn't show anything, or if it does but you're not sure, can you also check these blue nodes that say "60s"
Does it have a green box saying "Success" below them? It could be the HomeAssistant server connection via these nodes is not setup or is having some issue running, thus the prints table never initializes as it doesn't get triggered that a print started properly there. Make sure the server credentials in it are setup (and if you're using nodered as a HAOS addon, tick that box saying yes), and that in HA you have the "nodered companion" integration too.
If the other nodes seems to show like "Print Started" just fine as a print is actively going on, and the 60s node shows green success and all that, then could you double click on this node here
And verify that the "Server" field/dropdown is the same as selected as the one in the "Get Printing Time", "Get Printing Amount", "Insert Update (Mat Cost) and "Insert Update (Place)" nodes if you double click them?
so, to your questions:
Ah okay so if the start/end node doesn't have the status under it, but everything else seems fine, I think I know what the issue is.
Can you double check what you set for "HA Printer Device Name" in the advanced flow? Note that this is different from what you set in the basic flow for "Printer Name".
You can view the current value in the Advanced Flow group -> "Set Flow Properties" node. Can you confirm that this is correct? It should be essentially <model>_<printer_name>
, where
that waws the issue, althought it looked okay. I deleted everything and make it fresh. now works great. Thank your vey much for your help.
I set up the advanced setup but i can't get it to create and update the prints table. I keep getting the folowing error:
"12/5/2024, 16:04:25node: Get Printing Time msg : string[39] "error: relation "prints" does not exist" 12/5/2024, 16:04:25node: Get Printing Amount msg : string[39] "error: relation "prints" does not exist" 12/5/2024, 16:05:48node: Insert Update (Mat Cost) msg : string[39] "error: relation "prints" does not exist" 12/5/2024, 16:05:48node: Insert Update (Plate) msg : string[39] "error: relation "prints" does not exist"
I tried to create myself the table in the db and then there are no error, but nothing gets uploaded. The energy_readings tables only worked on uploading the data once.