Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.
View this topic in a long page with up to 500 replies per page Create new topic
1 | 2 | 3
40 posts

Geek
+1 received by user: 4

Trusted

  Reply # 2039842 18-Jun-2018 15:38
Send private message quote this post

phrozenpenguin:

 

gabesmith:

 

An update to this. I have developed a way to programmatically control the Goldair Wifi controllable panel heaters and I suspect this will work with the Goldair eco panels as well. Some details are found here: https://github.com/codetheweb/tuyapi/issues/31

 

Hi @gabesmith this looks really interesting, nice work. I have a few of those panel heater and ultimately would like to integrate them into home assistant, so I can get rid of the Goldair App and reliance on their servers.

 

 

 

Did you follow the setup instructions in order to get your key? You sentence "Device Encryption Key discovery is done by finding these in the mobile app log file." I didn't really follow (I'm on iOS...).

 

Any chance of a few bullet points explanation around the best way to get started to test control not using the Goldair app? 

 

 

I found my Encryption Keys using this debug file on my Android mobile. Located here:

 

Android/data/com.goldair.smart/cache/1.abj

 

Go through the the heater/app pairing process and you should see an event like this in the file:

 

2018-03-26 11:15:31Business{"result":{"errorDevices":[],"successDevices":[{"productId":"........[truncated]

 

On that line look for the value "localKey":"abc12323etc" - [note eg your key will be different]

 

Test it out using the Tuyapi code.

 

I am also playing around with Homeassistant (learning) but I just have my solution running with a cron job on a raspberry pi right now.

 

Happy to help further with this if needed.


5 posts

Wannabe Geek


  Reply # 2040773 19-Jun-2018 21:35
Send private message quote this post

Hey @gabesmith I made a post on the GitHub page for your project.



Would you be interested at all in helping to tweak the homebridge-tuya-outlet plugin to get these heaters working better on Homebridge?



Basically I’ve managed to add the heater to my homekit using the plugin. It acts as a power outlet at the moment, so I can only control on and off.



I think it would be cool to add other functions. I think I may need to add specific accessories for these functions though. I’d specifically like to add the on board thermometer as a sensor, the led as a light.

40 posts

Geek
+1 received by user: 4

Trusted

  Reply # 2042390 22-Jun-2018 13:39
Send private message quote this post

deiphid: Hey @gabesmith I made a post on the GitHub page for your project.



Would you be interested at all in helping to tweak the homebridge-tuya-outlet plugin to get these heaters working better on Homebridge?



Basically I’ve managed to add the heater to my homekit using the plugin. It acts as a power outlet at the moment, so I can only control on and off.



I think it would be cool to add other functions. I think I may need to add specific accessories for these functions though. I’d specifically like to add the on board thermometer as a sensor, the led as a light.

 

Hi deiphid, I dont run homebridge myself so I have limited ability/motivation/need for this myself. I have been playing around with homeassistant a bit but havent got very far with it.... I am making do right now with my heater scheduling just using node scripts and cron jobs which is actually working really well.

 

Happy to share what I have done more if this helps you and other progress this?


5 posts

Wannabe Geek


  Reply # 2042449 22-Jun-2018 14:32
Send private message quote this post

Thanks for your reply.

There’s a bit of discussion still going on at https://github.com/codetheweb/tuyapi/issues/31

I presently have no idea how to follow those instructions, but I’m working on it 😂

Is there a layman explanation for how to “Call .get({schema: true}) to find the DIP index of each property you want to use“.

I assume this means to send a request of some sort to the device itself, and the response will include the information I require. Ummmmm... is there an app for that?

I know you found that each of the heater properties correspond to a particular number. Is that the DIP index? I’m trying to learn as I go but I can’t find an explanation anywhere for what a DIP index is.

40 posts

Geek
+1 received by user: 4

Trusted

  Reply # 2042520 22-Jun-2018 16:33
Send private message quote this post

Hi deiphid, it looks like the homebridge plugin is a wrapper thing that will need to work with your tuyapi code needed to fill in the gaps. I would say a good starting point is to get Node and the tuyapi examples like .get({schema: true}). The goldair heaters work with .get({schema: true}) without needing to know your heater encryption keys but you will need these for doing .set operations.

 

The DPIDs for my heater are the following. I learnt these by changing stuff on the heater and then calling .get({schema: true}) to see what changed.

 

'1': true, -on/off

 

 

'2': 14, -setpoint

 

 

'3': 19, -current Temp, readonly

 

 

'4': 'C', - 'C' comfort, 'ECO', 'AF' AntiFreeze

 

 

'6': false, -child lock on

 

 

'12': 0, -fault, readonly

 

 

'101': 'stop', -power level 'stop','1','2','3','4','5','auto'

 

 

'102': 1440, -timer in mins

 

 

'103': false, -timer on

 

 

'104': true, -led display on

 

 

'105': 'auto', -mode 'auto', 'user' - what is the difference?

 

 

'106': 14 -eco temp set point between 5-31


149 posts

Master Geek
+1 received by user: 1


  Reply # 2056753 16-Jul-2018 00:18
One person supports this post
Send private message quote this post

We have two of these heaters at home. This week I came across Home Assistant and these were the only "smart" devices we have that didn't automatically work with it, so I tried my hand at Python and built an integration based on your discoveries above:

 

https://github.com/nikrolls/homeassistant-goldair-heater

 

 

 

It was challenging but fun to write because the boards are very slow in these devices. It takes a couple of seconds to make changes, meaning when you send an update and then request the current state immediately afterwards like HA does, you get the old state back. This makes standard Tuya integrations quite flaky in HA. But trial and error and some local state management has turned this into a very reliable integration.

 

Keen for any feedback and/or success stories using it!


274 posts

Ultimate Geek
+1 received by user: 10


  Reply # 2056834 16-Jul-2018 09:13
Send private message quote this post

nikrolls:

 

We have two of these heaters at home. This week I came across Home Assistant and these were the only "smart" devices we have that didn't automatically work with it, so I tried my hand at Python and built an integration based on your discoveries above:

 

https://github.com/nikrolls/homeassistant-goldair-heater

 

 

 

It was challenging but fun to write because the boards are very slow in these devices. It takes a couple of seconds to make changes, meaning when you send an update and then request the current state immediately afterwards like HA does, you get the old state back. This makes standard Tuya integrations quite flaky in HA. But trial and error and some local state management has turned this into a very reliable integration.

 

Keen for any feedback and/or success stories using it!

 

 

This looks ACE. Will try it out and let you know any feedback. 

 

Do your heaters actually work well - I'm having issues with the auto mode, e.g. set to auto 22, actual temp 26 and still full power! I'm wondering if it is the "slow" boards not fully responding to all the commands (I'm using the supplied Goldair app). Regardless, will try your plugin out as that will at least help with the graph of setpoint / actual.


149 posts

Master Geek
+1 received by user: 1


  Reply # 2056853 16-Jul-2018 09:46
Send private message quote this post

Mine seem to react fairly well when they reach target temperature. They seem to have a threshold of a couple of degrees where they'll stay full power, but once they're 2-3 degrees over they'll scale right back and often sit at low power to maintain the temperature. I've noticed that it's so cold lately that they're on full power a lot of the time just to keep up, but when it was warmer they were quite dynamic, even turning off completely when they've overshot their target.

 

The only thing I notice is that the thermostat is very local to the heater, so it's really measuring the temperature of the air it's heating rather than the room itself. However once we've figured out the best way to expose power level to HA (see below) you could use that and a few clever automations or a simple python script to write your own logic. This would be especially cool combined with a standalone thermostat elsewhere in the room, for instance.

 

I'm currently looking at optionally exposing the temperature as a standalone sensor, and how best to give access to the power level so it can be updated from the UI (or at least in automation). I structured the code so that there's a device class that handles all the complex API calls, updates, and optimisation, and then you can pass a single instance of this around to multiple thin platform wrappers. Simply put, the complex logic is contained and all the known properties and options are already written, so creating new platforms is very easy and lightweight on top of this. I've been playing around with sensors and other platform types, but I haven't finished them yet. I need to understand the HA process for adding multiple platforms instead of just one, and I wanted to get something simple out for you to play with as quickly as possible!


274 posts

Ultimate Geek
+1 received by user: 10


  Reply # 2057128 16-Jul-2018 14:44
One person supports this post
Send private message quote this post

Thanks and that makes sense. Yes plenty of options when linking in other hardware e.g. room temp sensors.


264 posts

Ultimate Geek
+1 received by user: 12


Reply # 2057407 16-Jul-2018 22:49
Send private message quote this post

nikrolls:

 

Keen for any feedback and/or success stories using it!

 

 

I have the Goldair GPPH Series 2 panel heater and been looking for something to control it better than the provided Goldair app.

 

Thanks for making the code available. I'm trying out Home Assistant via a Docker container before I make the investment in another Raspberry Pi and your Goldair heater component just works! Amazing! Thank you. Now I need to buy another RPi.

 

The only issue I had was that my Docker version of Home Assistant couldn't install Python dependencies properly so it couldn't find 'pytuya', but after a manual 'pip' installation, it works fine. Hoping it's a Docker/HA issue and when I get a RPi the issue will be irrelevant.

 

Now for me to figure out in HA how to control the heater with voice using my Google Home :)


149 posts

Master Geek
+1 received by user: 1


  Reply # 2060568 22-Jul-2018 18:46
Send private message quote this post

minigopher17:

 

The only issue I had was that my Docker version of Home Assistant couldn't install Python dependencies properly so it couldn't find 'pytuya', but after a manual 'pip' installation, it works fine. Hoping it's a Docker/HA issue and when I get a RPi the issue will be irrelevant.

 

 

I've had someone on GitHub with a similar issue. Looks like you can't install it on a hass.io (and presumably HassOS) setup because they don't auto-install pip dependencies there. It may be resolvable with your method though, I'll let them know. When/if this component is accepted into the core, the dependency won't be an issue.

 

Heads-up for everyone following along: I've made an update that can now optionally reveal the thermometer as a sensor, and the LED display as a light, and the child lock as a lock. You can also control the power level (currently in the swing mode option because HA doesn't support power levels), and along the way I realised I wasn't handling Eco and Anti-freeze properly with regards to target temperatures, so I fixed that as well. Please note the new configuration.yaml and installation which are now slightly different.


274 posts

Ultimate Geek
+1 received by user: 10


  Reply # 2060785 23-Jul-2018 08:40
Send private message quote this post

Thanks for the update. I'm still having frustrations installing on hass.io (pip is only temporary and doesn't persist through reboot). I've seen the latest .74 release has Tuya components so not sure if the Python dependencies will be included - would be great if so.


149 posts

Master Geek
+1 received by user: 1


  Reply # 2060972 23-Jul-2018 13:18
Send private message quote this post

phrozenpenguin:

 

I've seen the latest .74 release has Tuya components so not sure if the Python dependencies will be included - would be great if so.

 

 

Unfortunately the Tuya ecosystem is a little fragmented, and consists of both cloud-enabled (log into the Tuya service and can be controlled remotely) and local-only (must be controlled by direct API calls) devices. Goldair decided to go with the local-only version, and HA has just officially added support for only the cloud version, so they're not compatible.

 

However in this GitHub discussion, someone has indicated that HA 0.74 may have just come along with the library we need - or it could be a result of them playing around with pip, we're not quite sure yet.

 

Now that I've done the upgrade I'm going to get a development version of HA working on my computer and start integrating it into the core, along with writing specs for it. As soon as that's done I'll propose it to the HA team for official inclusion and then all these issues will be resolved!


274 posts

Ultimate Geek
+1 received by user: 10


  Reply # 2061005 23-Jul-2018 13:59
Send private message quote this post

Official inclusion in HA sounds great @nikrolls.


5 posts

Wannabe Geek


  Reply # 2063874 27-Jul-2018 22:03
Send private message quote this post

So... I've made next to no progress in writing a Homebridge plugin but I found that the homebridge-igenix-air-conditioner plugin works for these heaters!

 

Regarding writing my own plugin, I just don't know enough about writing code. I had a few attempts at writing an index.js file but couldn't get anything working. I don't know how to install the file on my raspberry pi to get Homebridge to actually load it.

 

Then I thought I might edit the index.js file for the homebridge-mi-heatercooler plugin. I knew the plugin itself has all the functionality I want, I figured I just had to fiddle with the code to get it to send the correct command to the Goldair heater for each function.

 

As I was searching for information on tuya and heaters, I came across the homebridge-igenix-air-conditioner plugin. I installed that and updated my config file with devid, uid and localkey. The plugin controls the heater perfectly. I can turn it on and off, see the current temp and set target temp.

 

There are four quirks though.

 

1) There is no function to switch the led screen on and off (which is my second most wanted function after on/off).

 

2) The plugin is for an air conditioner, so it has functions for auto, cooling and off. "Cooling" doesn't work, and the plugin just switches back to auto. That's fine for me because I just set the target temp and leave it on auto anyway. Still, it would be cool if the plugin had modes correlating to the modes on the Goldair heater.

 

3) The temperatures in the plugin are definitely Celsius, but there is an option in settings to change between Celsius and Fahrenheit that appears to be stuck (incorrectly) on Fahrenheit.

 

4) Finally, is a fan speed and oscillate function in the plugin that obviously has no affect on the heater. I would like to remove these and maybe add in the child lock function.  

 

I am going to play around with the coding of the homebridge-igenix-air-conditioner plugin and see if I can find some way to tailor it to my purposes.

 

 


1 | 2 | 3
View this topic in a long page with up to 500 replies per page Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.