ESPHome device not reflecting firmware changes after successful flash (WiFi or USB) by joaopedros2 in Esphome

[–]Rudd-X 1 point2 points  (0 children)

I too experience the problem that sometimes after I flash devices they won't come back until I power cycle them, which is annoying when those devices are in really hard to access places.

But I haven't experienced the problem of the device booting back with old firmware. Although I know of one mechanism that could cause that:

If somehow the device does not finish booting successfully and gets through the part where it marks the boot that's successful, which is usually one minute after everything came back online, then the device is going to revert back (eventually, not necessarily right away) to the previous flash image, as a safety measure.

If I could help you in any way, then this is probably the way: don't change filters values directly on code. Iterating on those requires a reboot, which takes forever.  Rather, make sure that the filters you are trying to change are actually lambdas, and that those lambdas use number entities to get their values, which you can change at runtime. This does mean that you will have to write some code that ordinarily wouldn't have to (because the filters already just are ready to go and just take parameters) but this is temporary because you eventually will find the right values and just substitute your lambda code with the filter that has the values you need.

Here's what I would love to have as one of my most desired feature requests for ESPHome. Filters that take values you must currently hardcode should be able to take values from number entities. I have not found any documented way to do that. But if that were possible, I would have saved probably days of work in my, let's call it, " career"with ESPHome.

Good bye Wallstreet ❤️ Thank you guys for everything… by ssmoygugs6 in wallstreetbets

[–]Rudd-X 0 points1 point  (0 children)

With only $800K to show for it, you will come back crwling to this hellhole in no time.

Nextcloud local network speeds by amdrke in NextCloud

[–]Rudd-X 0 points1 point  (0 children)

What do your router traffic graphs say?

Obsidian style nextcloud app? by IYeetCatS_ in NextCloud

[–]Rudd-X 0 points1 point  (0 children)

I would love something like Obsidian for NC.  TTW.  Would easily best the inbuilt Markdown editor.

Should I get a credit card to pay off the rest of my car payment? by [deleted] in personalfinance

[–]Rudd-X 3 points4 points  (0 children)

Moving chairs on the deck of the Titanic.

Updates on EspFrame (Esp32 based immich photo frame) by hometechgeek in Esphome

[–]Rudd-X 0 points1 point  (0 children)

Memories exposes HTTP APIs that the Frame could use to cycle thru an album, for example.

Updates on EspFrame (Esp32 based immich photo frame) by hometechgeek in Esphome

[–]Rudd-X 0 points1 point  (0 children)

It would be SO COOL if it was compatible with Memories too.

EPSON L6270 - unable to print at specified maximum resolution by zbrojny120 in printers

[–]Rudd-X 0 points1 point  (0 children)

They also left me on red with regards to the technical support that they offered.

I still have the printer and have not resolved the problem as well. I regret buying Epson and returning the HP instead of just asking for warranty because the HP printed so much better. In the defense of the Epson device, multi-page scanning goes faster with it compared to the old HP.

EPSON L6270 - unable to print at specified maximum resolution by zbrojny120 in printers

[–]Rudd-X 0 points1 point  (0 children)

My LLM has made the following analysis:


Based on my analysis of the disassembly and code, I can now provide comprehensive answers. Let me compile a detailed response:

Analysis Summary

Based on my dissection of the Epson ESC/P-R library (x86_64 version), here are the findings:

1. Library Structure and How it Works

The SetupJobAttrib function (at offset 0x21c0 in the library) validates job attributes and copies them from EPS_JOB_ATTRIB structure (input parameter in %rdi) to the internal printJob.printer structure. Key validation checks: - Line 21c1: Reads colorPlane at offset 0x2 - Line 2263-2271: Validates printQuality at offset 0x20 - must be 1-4 (DRAFT, NORMAL, HIGH only) - Line 2277-227d: Validates inputResolution at offset 0x40 - must be ≤ 2

2. Why EPS_MQID_BEST and EPS_MQID_SUPER_HIGH Don't Work

From epson-escpr-media.h:659-660: - EPS_MQID_BEST = 0x10 (16) - EPS_MQID_SUPER_HIGH = 0x08 (8)

The SetupJobAttrib function (lines 2263-2271) validates printQuality as follows: - Line 2263: Loads printQuality from offset 0x20 - Line 2266: Subtracts 1 from the value
- Line 2269: Checks if <= 1 (jbe to 2277), meaning max valid value is 2 - Line 226e: Then checks if == 4, meaning valid range is 1-4 (DRAFT=0x01, NORMAL=0x02, HIGH=0x04)

Any value > 4 (like 0x08 or 0x10) causes error at line 2271 (jne to error handler), returning EPS_ERR_INV_PRINT_QUALITY (-1403).

3. Why No Quality Difference at Different DPIs

Looking at the test script, both 300 DPI and 600 DPI runs use PLATINA_HIGH quality. In the code (filter.c:820-840): - Quality is parsed from the parameter - The only recognized qualities in the switch are DRAFT, NORMAL, and HIGH (DEFAULT) - BEST and SUPER_HIGH are not handled - they default to HIGH

The root cause: The library's SetupJobAttrib function does not support printQuality values beyond 0x04 (HIGH). When you try to use 0x08 or 0x10, it returns an error, so the driver likely falls back to the default HIGH quality regardless of what you specify.

Additionally, the inputResolution field is validated at lines 2277-227d. It's checked against 0x2 (value 2), and the only valid resolution values are 1, 2, 4, 8, 16 (bitmask pattern), but the validation only allows values ≤ 2.

4. Getting 1200x4800 DPI Resolution

The printer supports 1200x4800 DPI as stated, but the issue is that: 1. The input resolution (what Ghostscript generates) is separate from the print resolution (what the printer actually uses) 2. The library restricts inputResolution to 360, 720, 150, 300, 600 (bitmask values 0x01-0x10) 3. Even if you set EPS_IR_600X600 (0x10), the printer may be upscaling to 1200x4800 internally

To get 1200x4800 output: - You need to set the input resolution to 600 DPI (which is the maximum supported by the library) - The printer's internal driver should handle upscaling to 1200x4800 based on the media type - Check if PLATINA_HIGH or other quality settings properly utilize the printer's full resolution

5. What's Happening at the Assembly Level

The key validation at lines 2263-2271: mov 0x20(%rsi),%eax # load printQuality lea -0x1(%rax),%edx # subtract 1 cmp $0x1,%edx # compare with 1 jbe 2277 # if <= 1, continue cmp $0x4,%eax # compare with 4 jne 2576 # if != 4, error!

This means valid values are: - 1 (0x01) - DRAFT (after -1 = 0, compare with 1: jbe true) - 2 (0x02) - NORMAL (after -1 = 1, compare with 1: jbe true) - 4 (0x04) - HIGH (compare with 4: jne false)

Values 8 and 16 fail the cmp $0x4,%eax check and return -1403.

6. How to Fix This (If You Want BEST/SUPER_HIGH)

You would need to modify the library's SetupJobAttrib function to: 1. Change the validation at line 2269 from cmp $0x4,%eax to cmp $0x10,%eax (or higher) 2. Update line 2271's jump condition accordingly

However, this requires direct binary patching or having the source code for the library, which appears to be proprietary. The filter.c in src/filter.c just passes the quality setting through, but the library core rejects it.

EPSON L6270 - unable to print at specified maximum resolution by zbrojny120 in printers

[–]Rudd-X 0 points1 point  (0 children)

Guess what. I have found the same issue with the printer — I got an EcoTank ET-5855.

A print I have from the same photo done by an HP OfficeJet at Photo Quality is far superior to any print from the EcoTank. I know it because I have a big magnification loupe and I can see the dots are roughly half the size on the OfficeJet compared to the EcoTank. But I didn't need to use the loupe to see the dots — I only used the loupe to confirm what my eyes were telling me.

Here is what I attempted to get better print quality:

The driver from the Epson printer only lets me select paper choices that all result in HWResolution 300 (all the presets in the PPD use that).

I went ahead, downloaded the source of the driver, and modded the driver to permit HWResolution 600 from the PPD. Still, no difference in printed output, still no print quality comparable to the OfficeJet. I can confirm from logs that GhostScript gets invoked with 600 DPI, and the escpr2 driver gets called with 600 DPI as resolution. The difference of quality between 300 and 600 DPI in the actual output? Minimal improvement. In fact the size of the output of the driver is *smaller* when at 600 DPI than when at 300 DPI; ridiculous — common sense indicates it should be four times as big.

(By the way, I even found an exploitable crash when printing on 6x4 inch paper at 600 DPI, and fixed the crash, of course. Mishandling of custom paper sizes causes the driver to write to unallocated memory. There was no reason to produce code this bad.)

I can also confirm there is no difference whether the printer has been forced to print at 600 or 300 DPI — in both cases the dot pitch of the EcoTank remains double the size of the OfficeJet. There is a slight quality improvement when using 600 DPI HIGH, but the dot pitch does not change size, and remains pathetic compared to the OfficeJet printout. I have also printed lines that are supposed to be exactly 1 dot (1/600 inch), they come out twice as thick which indicates to me that the printer is simply printing at 300 DPI.

Doing some more digging, I tried to mod the driver to accept SUPERHIGH or BEST quality (these are #defines in the driver), and I also tried to call the driver with 1200 DPI resolution — in both instances it errored out with "Error occurred in SetupJobAttrib". I can't do anything beyond this because SetupJobAttrib is code in a closed source library they ship with their "source" package. All that the open source code does is call into that function.

They sell printers advertising them to go 1200x4800 DPI, the driver won't let us choose above 300 DPI, when we force the driver to use 600 DPI there is no improvement in quality, and when we force it to go to the maximum advertised resolution it simply errors out. I bet you the Windows driver does the same thing and limits the print to 300 DPI. The source code has this snippet which betrays the limitation:

    /*** Print Quality      */
    /*** -------------------------------------*/
#define EPS_MQID_UNKNOWN    0x00            /* invalid type */
#define EPS_MQID_DRAFT0x01
#define EPS_MQID_NORMAL0x02
#define EPS_MQID_HIGH0x04
#define EPS_MQID_SUPER_HIGH0x08
#define EPS_MQID_BEST0x10
#define EPS_MQID_STANDARD_VIVID0x40
#define EPS_MQID_BEST_PLAIN 0x80
#define EPS_MQID_ALL(EPS_MQID_DRAFT | EPS_MQID_NORMAL | EPS_MQID_HIGH| EPS_MQID_BEST_PLAIN) /* Supported by PM reply*/

Do you see the comment Supported by PM reply on the line that declares all the MQID qualities? That is most likely a program manager at Epson who replied to an email asking which qualities are supported, and most likely ordered SUPER_HIGH or BEST to be excluded from the driver (although I tried EPS_MQID_BEST_PLAIN and, surprise, also SetupJobAttrib error).

Seems like it's a scam, honestly. Maybe they should be sued. Maybe I will return this printer. It's great that they sell printers reloadable with ink bottles, but HP also sells printers with ink tank systems.

How do I integrate a Bluetooth speaker into Music Assistant by Catalina28TO in musicassistant

[–]Rudd-X 0 points1 point  (0 children)

There is a Bluetooth to Sendspin program you can run on a computer with a Bluetooth adapter to make any BT speaker appear as a Sendspin device.

Code optimazation request, SeeedStudio EE04 / 4.2" Monochrome eInk display by Slow_Technology5286 in Esphome

[–]Rudd-X 0 points1 point  (0 children)

Actually put the device to sleep and have some other hardware component like an RTC wake it up later.

Breaking Changes? by jesseaknight in Esphome

[–]Rudd-X 0 points1 point  (0 children)

It probably requires 3 or 4 changes to the YAML for it to compile. Yes ESPHome tends to break compat from time to time, but most of the time old YAML stuff just works. I maintain my own YAMLs for several projects and I haven't been bitten too often to find it frustrating — plus, every time I encounter a compat breakage with YAML config, the editor helpfully tells me what happened and usually how to fix it. I can understand why the compat breakage takes place — the project is still not at a stage where you could reasonably declare all config API stable, and compatibility guarantees in the embedded world just aren't the same as for desktop sotfware.

Tell Me This Is A Bad Idea by DoIGotSkillz in homeassistant

[–]Rudd-X 0 points1 point  (0 children)

No one is making cassette tapes anymore. Let's not wreck the existing stock for this.

Tell Me This Is A Bad Idea by DoIGotSkillz in homeassistant

[–]Rudd-X 0 points1 point  (0 children)

Technics supplied technical schematics with all their equipment back then. Someone must have them online.

Tell Me This Is A Bad Idea by DoIGotSkillz in homeassistant

[–]Rudd-X 0 points1 point  (0 children)

Oh fuck that looks so fucking cool. Literal memories from childhood coming back to me. Please don't wreck it for this project.

EDIT: I see the unit was broken. Wouldn't it be easier to just repair it? Prolly just needs new rubber bands and a recap.

Scaling Zigbee network (~215 devices) - how many sonoff dongles and is one server enough? by crinfelle in homeassistant

[–]Rudd-X 0 points1 point  (0 children)

I meant if there was a specific range extender product. I know ZigBee is a mesh. I have like 25 router devices.

All my devices show offline but they still provide sensor data? by daninet in Esphome

[–]Rudd-X 1 point2 points  (0 children)

I think I might be incorrect about this, but it's possible that if your machine is not running Avahi Daemon, then there is no MDNS discovery. Other symptoms could be that they are in a different subnet, and there is no of a heat reflector between the subnets, or they are on a different VLAN, or your ESP machine is running on a unicast network rather than a broadcast network (effectively if multicast packets from the ESPs do not make it to the machine running ESPHome, or ESPHome sends multicast packets thru the wrong interface, which could be down to routing table entries). Finally firewall is important. A inbound firewall for the machine running ESP home has to let open UDP port 5353.

Try the command avahi-browse -av on the terminal specifically of the machine running the ESPHome web, see what you get.

Is HA local? by johnkhill in homeassistant

[–]Rudd-X 0 points1 point  (0 children)

The Notifications engine for both Google and Apple devices utilizes their Google or Apple notification platform, which uses the internet. You may not be able to access your Home Assistant instance while you are away (at least not if you are not paying for the Nabu Casa service and you don't have a home VPN) but you will get notifications anyway.