I am very new to OpenHab and I am starting with a device that doesn’t appear to be supported as yet. I am a developer by profession so I hope to be able to get it to work anyway. The device is a Windy Inverter AC which I have come to realize just a rebranded Midea I believe. I have the Nethome Plus app controlling the AC and now I want to start my smarthome journey by using OpenHAB to do everything the app can do and more.
Can someone point me in the right direction to get started with creating this link please? Are there any existing bindings that will help? What key things do I need to know that stumped you when you first tried to setup something that had no support?
I am using openHAB 4.2.1 hosted on a Raspberry Pi 4. Any help would be much appreciated.
Hi,
Definitely try @apella12 version last post in the link above he has taken the binding alot closer to being something that could become an official binding so I am quite sure he would welcome any developer by profession help or assistance. I have added the link to his github space below also so you can review as well. GitHub - apella12/openhab-addons at midea2
Awesome, many thanks for this information. I am now in the process of setting up ssh connections to allow me to copy the jar (this is the best way to copy jar’s right, or is there an addon for that?). I will definitely be interested in helping in any way I can.
So the easiest way to copy the jar seems to be over ftp.
This Thing looks great. I have only tested a few so far but really great work. You guys have saved me so much time. I will continue to test it and see how best I can provide any help or feedback.
It depends what installation you are using and from where you are connecting
scp will probably always work
As I need my phone and the PC I use the smb-server. It can be easily installed with openhabian-config
The folder to copy the jar to is /usr/share/openhab/addons/
btw: I had some trouble with the target-temperature. Due to the delay the new target always switched back to the current one. I solved it by connecting two items: One for displaying and one for setting (with profile follow).
Thanks @justaoldman for shout out. The August 1 jar should have all the functionality to date. Lately, I have been working on creating unit tests, cleaning out WIP testing code and adding JavaDocs as required by the OH developer guidelines. I’m testing a version to make sure I didn’t screw up something along the way.
I have no formal Java training, this is a retirement hobby, so suggestions are welcome. To be honest, I could not have gotten this far without the excellent starting code from @JacekDob and additions by @justaoldman. The entire discovery process and encryption/decryption code is basically unchanged as are most java classes. I have added some functionality, corrected a few things and changed the connection process to allow for less frequent polling. Besides that, my main effort has been to clear all the compilation rules that OH didn’t like and add tests and documentation.
Rapidly changing through several temperatures can be problematic and needs to be avoided at this point. It takes about 2 seconds for a command to complete. I found the slider card is a good option. It can be configured to set the command interval (2 seconds+) and to only send the command on release. Also setting a temperature in a rule (say using cron) should not be a problem. The stepper card can really go haywire with rapid changes (although I think this is a degrees F issue only). I’ve opened an issue on that.
I haven’t experienced the temperature reverting I’d be curious how you are setting the temp (widget or rule), what unit (F or C), the poll interval and the autoupdate setting.
Thanks! This truly is easier than ftp and it looks like it is enabled by default in the version I am using. Got it to work on my phone and pc in seconds.
Experience is the best teacher, looks like you have a lot. I am looking forward to delving into the code once I get a chance. So far only three things stood out to me.
The outside temperature is not available when my AC is off, as such it shows 102.5 degrees C (while the inside is at 30 C) which we could just replace with OFF or something whenever those temperature ranges are read.
I added the items for one AC and then changed the temperature unit from F to C, this lead to a lot of decimal places showing up. Probably just need to round out after the conversion.
And finally the changing of the temperature unit, even though it is just two options, a dropdown list would be a better user experience so as to know what the current setting is.
Thanks for the first look. I understand your thoughts. One limitation is the OH core as the channels need to match the items (String, Switch, Number, etc).
3) The temperature unit could be changed to a string from a switch easily, my only thought it is (a least for me) a “set it” and “forget it”, but I’m open to it.
2) Adding metadata to the item as state description should clear that up. Something like %.1f °C. The device only uses °C in calculations and the response is from reading a byte, so not sure how all those 0’s occur. The return is a float to handle the 0.5 marker, so may that’s it.
Handling outside temp is going to be tricky. What is happening in your case is the device is returning 0xFF. The formula used from the byte is (255 - 50)/2. We could catch the 255, but the channel still expects (needs) a number:temperature, not a string. I seem to recall that some units return 0x00 for outside temp when off and that’s also a problem. There are also graphing issues if it is turned into a string channel. My unit continues to report outside temperature while off just on a reduced frequency. Anyway something to think about how to address when you look at the code.
You are welcome! and thank you for the work you have put in.
3… My user experience was that I added the items and saw that they were in °F, then I saw the toggle for Temperature Unit and the noob in me thought that would automatically change everything to °C. But of course it changed the LED display value on the AC itself, as it should. I then changed it back and went and found the right way to change the units for each item individually. It really is a set it and forget it thing but noobs like me are out there.
2… You are right, the default metadata was %d %unit% so I changed that to %.1f %unit% and it works better.
1… What do you think of this approach: Add a switch option to Disable Outside Readings when powered off, that way the user can choose not to use the feature if they have an AC like yours, then if this is set to true and the power is off we set the reading value to 0 or if possible, we set the final string representation of the value to OFF.
And lastly, not sure if this is too off topic or if I should ask in another thread but I am not seeing any graphs. I see persistence files in the rrd4j folder but whenever I select Analyse I don’t see any plots. I am also trying to figure out how to change the persistence to mapdb but I haven’t figured that out yet either.
Again, great work, I will have to set up a new Java environment soon so I can do more than just suggest stuff.
That will depend on how you have your widget setup and item configured.
Foe example this widget from the other midea post that used the modifed daiken widget will let you define what item you want to graph. based on what you set in props
It depends on your persistence method. If rrd4j is your standard (settings - persistence - general…) then you should be able to see the graph after clicking “Analyze”
Ok, so it wasn’t my default but after changing it to my default I was able to see the plots. Now I just need to figure out how to move it to mapdb because according to the docs rrd4j averages old data: “So while you might store a sample value every minute for the last 8 hours, you might store the average per day for the last year”. I don’t want to lose any data.
When starting OH for the first time there should have been a menu about regional settings so that all your items are created with the desired unit. Obviously you found how to change, but I believe you can still set the default on the Settings>Regional>Advanced (metric/US at bottom). I’ll change the verbiage on the channel a bit to make clearer.
This is the easiest. I’m in the middle of something else right now, so can’t do right away.
mapdb only stores the last value (bad for graphs!). It is good for restore on startup as it can handle both numbers and strings. rrd4j only does numbers and ON/OFF. The averaging is just to avoid an ever increasing database.
Changing this setting fixed the issue where I was seeing many zeros for the different readings. That’s great!
No problem at all. Hopefully I will get to start my openHAB dev journey soon.
I get it, it looks like I have to use it but I hope there is a way to set the maximum size or something that will allow me to have control over when it starts summarizing stuff.
This looks really good, and I love the ability to add other peripherals to it as well. However, I have already invested in the system recommended by the suppliers of my AC. But hopefully your link will help other persons.