Høiax Connected smart water heaters

This topic is about the new Høiax app for smart water heaters.
It is being developed at GitHub - frodeheg/no.hoiax: Adds Høiax devices to Homey
If you want to test or do code reviews please let me know.

1 Like

All features intended for the first version of the app has been implemented and pushed to github. Will push for review as soon as I have cleaned up the code. Aiming to publish the app in the next few days.

The first version was just submitted for Certification. It will be available for the public within two weeks :slight_smile:

Not sure how the testing process work, but I think anyone that would like to test it can install it from Homey Developer Tools

1 Like

Awesome, just got my Høiax Connected. Looking forward to this!

1 Like

Nice!
Since this is my first app I’m not entirely sure how this works, but I think you will be able to install the app from the above link before it is certified (if you want). It would be great to get any feedback on if everything works before it becomes public as Athom does not have a water tank to test it with. Also any improvement suggestions are welcomed :slight_smile: .

Don’t think other people than you can use this install link.

Right, seems like I need to put it here: https://store.homey.community/ but apparently I need approval to get it there too so not sure when I will get a beta test link available…

Probably @MaxvandeLaar can inform you.

Sounds like once they have approved my first submission they will allow for beta testing links in the regular store too so I guess it’s better to wait.

And it’s live :slight_smile:

1 Like

A test version with some extra configuration settings is available here for testing:

What is new:

  • Norwegian readme.txt
  • Ability to set some configuration settings:
    • “Average ambient temperature”
    • “Average inlet temperature”
    • “Regulation Difference”
    • “Legionella program frequency”
    • “Max water flow”
    • (Note that most of these have no effect other than to allow the tank to more accurately calculate the current capacity)

Seems like there has been a few crashes of the app today.
I don’t know much about these crashes as I don’t have any logs, if anyone has any details please share. I will try to fix as soon as possible

Whoever experienced the crash can try this new version so I get some more insight so I can fix it:

(will be made public in a day or two in either case after I have tested it a bit)

Crashes were presumably due to one of:

  • bad internet connection
  • bad username/password
    I have added handling to all internet communication so the app will no longer crash but instead turn the device into unavailable state and retry every 10 second until it get a new connection. Then it will make the device available again when the connection has been restored.

The test version linked above has been updated with this fix and will be pushed to certification tomorrow unless I find problems with it.

Another bug has been discovered when deleting devices:

  • Apparently a timer function kept triggering even after the device had been deleted causing the app to report crashes with invalid_device. A new test version (1.3.1) now disposes of the timer in a clean fashion when the device is deleted.

A workaround for the problem would be to restart the app after a device has been deleted.
For normal users this version of the app has no added improvements over the live version.

The new test version will go live tomorrow if I don’t have troubles with it.

I wonder if Athom has some error-detection robot trying to do everything to break the app after it has been submitted. When one error has been fixed another one keep popping up and now I am starting to get extremely odd error reports for errors that should be utterly impossible.

Also since I am not getting any complaints from any humans with problems or bad reviews it seems more and more like a robot is trying to break the app.

Does anyone know?

I really like it if they do have such a robot.

A new test version with some more bug-fixes has been submitted.
It will be made public tomorrow if nothing goes wrong overnight.

Yes, this is “normal” in that a lot of other app developers (including myself) are getting crash reports that make no sense at all. These are impossible to fix, unless you wrap your entire app inside a giant try/catch handler and basically just ignore all errors.

The reason these are showing up now is because Homey firmware 7.4.1 introduced a new Node.js version internally that is less lenient with uncaught errors. Previously, a lot of these crashes were just being ignored internally (but they still happened).

As to how these seemingly impossible errors can happen, I can only guess, but it’s either bit rot ór Homey is extremely susceptible to radiation flipping random bits. Or something.

Besides random errors, there are also quite a few SDK and Web API errors that have surfaced with 7.4.1. I started ignoring any errors on SDK methods (what else can I do?).

I actually went through this process before Athom made these changes. The reason was having enabled ‘strict mode’ in all my JS files and I set up a telemetry system that sends all program errors to me.

The errors are all fixable (except when the error occurs in the Homey SDK code of course) but requires some searching. A good start is to find all function calls that return promises and attaching a .catch() method to them or prefix them with ‘await’.

If you find any SDK errors that are really undescriptive, please report them in my repo:

1 Like

No, I’m getting errors that are impossible in a normal situation.

For example, I’m getting an error “storage.initSync is not a function” on this line: com.swttt.homekit/app.js at b7ff0b2e01240289ebe628c802ef88bb97f2e12c · swttt/com.swttt.homekit · GitHub

I’m getting that error once every few days. If it’s really not a function it shouldn’t work for any of the 7500 installs of the app, and I’m not getting thousands of crash reports. So there’s a particular installation where something is very wrong.

And this isn’t the only example.