Open peedub opened 2 years ago
Try removing the DNS Poisoning as it seems to only be querying the local host... humm let be check the code but it is hitting the local server rather than going out to the internet.
INFO:pethublocal:SureHub Host hub.api.surehub.io IP Address: 10.1.1.183
INFO:pethublocal:Downloading first firmware record to get header information
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 10.1.1.183:80
Or another issue could be you are posioning the Google DNS IP, you may need to update https://github.com/PetHubLocal/pethublocal/blob/main/pethublocal/consts.py#L22 to point to your ISP DNS server.
Thanks again. I have a dns server here and all port 53 traffic is forced through it so that is likely it. I'll update you once I change that.
I assume you've sorted this in the end and your internal DNS poisoning was the issue?
I can confirm this, I also redirect all DNS queries to my local DNS resolver and had the same error. Once I've configured an exception for my HomeAssistant Server in my pfSense, the firmware download works!
So it's a kind of an "external" error and that might be closed. (However, why does it need the Google servers?)
I will add further information into the docs about this. As the DNS poisoning is essential to the hub operation, but only after downloading the firmware. Using Google DNS seemed at the time the easiest option to differentiate between the internal DNS and public, but perhaps I should make it clear during setup and do a query to the default DNS and Google DNS and if I get the same response and they are a RFC1918 address then something is wrong and to log an issue. As the cloud IP should always be an AWS IP (unless Surepet move off AWS.. which is very unlikely(?)) Food for thought so will leave this as an issue.
Ah, understand ... the FW download needs "real" access to hub.api... which is poisoned on the local DNS. Clear now ;-)
During setup, I get the following error when trying to download the firmware. Setup completes successfully if I say no to this step.