Thank Rod Mcbain for putting so much effort into creating and sharing this video with everyone. This video provides a wealth of information for Home Assistant project users and offers detailed guidance for Waveshare RS485 to ETH (B) customers in their practical applications. I believe Waveshare should offer you the greatest discounts on products, or even provide them for free. If you have any ideas about incorporating other new Waveshare products in your future videos, I will certainly provide you with the greatest support!
Thanks for putting this out there! I'm about to try to implement the same thing with a Fujitsu heat pump unit. Your video has been very helpful. I didn't realize I could directly connect the waveshare to home assistant via TCP in YAML. I was only going to use the waveshare unit I bought (the same one as you are using) just to debug it and move the actual control to an ESP32/ESPHome device. Thanks again for your video!!
Hi Rod, it worked like a charm first try in my LG ThermaV MonoBloc HM091M.U43 (adding these details so it shows in Google searches to help more people). I am using an Elfin-EW11 and can confirm it didn't work until I configured the same "Modbus TCP" equivalent to your Waveshare. I had been previously trying to plug it into my NodeRed setup instead of HA but couldn't make it happen there so I eventually gave up and went your way. I have also wired a SDM230-Modbus in the feeding line of the HVAC so I also get the live consumption too. I would highly recommend you to do it, as you can just parallel the RS485 line of the Waveshare, give it address #2 and plug it into your HA in less than 10'. There should be a way to integrate that SDM backwards into the LG via Modbus directly but I haven't bothered "yet". Again Rod, great work and many thanks!
Good to hear it worked for you. I've currently got a Shelly EM in my consumer unit that monitors the heat pumps consumption, upgrading to something like the SDM230 would be more accurate and is probably a worthwhile upgrade. Thanks for the suggestion.
Wow! This helps a lot. Thanks Rod! Got a PW21 Serial Server RS485 to Serial WiFi/Ethernet Server IP. Needed the Wifi and AC operation with 110-220 Volts. Have a UTP CAT6 cable running form my pump to my appartment electrical board (in which there is wifi coverage). This cable will be used for data transfer (Modbus A/B lines). Cable length is about 20 meters, RS485 supports the length, lets see... Need to mount the PW21 device in the electrical board, and make the hardware connections. Then configure, and integrate with homeassistant. Will update this comment with the results
Great video!! For your biggest disappointment: the flow rate; you could install an additional flow rate sensor and use that to measure your effective COP. Thanks a lot for your inspiration.
Thanks, I have been thinking about getting an ultrasonic flow meter, that would allow me to monitor the flow rate without disturbing the pipework in any way. The way it's currently plumbed in there's not a lot of room for modifications and it's super awkward down the side of the buffer tank, so strap on ultrasonic sensors could be a good solution.
Great stuff! I've only connected my heat pump via thinq app, as I don't even have a way of doing a wired ethernet connection to my pump... plus it's fast and easy 😅 But definitely also going to jump into the modbus to have it all local Thanks!
Hi @RodMcBain I have another question. In the video, you show the register table (Holding Register (0x03). Register number 30013 is Outdoor Air temp. In the modbus.yaml file you have this for the item hp_outdoor_air_temp input_type: input Why is there an input? Why isn't there a holdig? I don't understand this. Thank you for the explanation.
You really don't need to blur out internal cat 3 addresses, we know it'll either be 10. or 192. or 172. As you're a network man I'm sure that me knowing the actual assignments won't help me in the slightest gaining access to your heat pump... If I was to gain access to your network a simple AngryIP network search would soon tell me what IP your WS module is on... lol - Other than that a good video...
Thanks, I know it's not particularly valuable info, it's just somewhat ingrained into me to avoid purposely exposing internal network config. It was a pain to bur in the edit so I did regret doing it 😀
Excellent video! Detailed and professionally made! Btw, how to get as pdf the service manual for REYQ12T7Y and BS6Q14AV1? I'm going to install FXMQ25 to two ports simultaneously on BS6Q14AV1 but need to understand the details how this actually works....
Incredible work. I'm trying to do the same with the solar inverter, but I've only been able to read the normal and binary sensors. And the switches work too. But when I try to code a number that should let me change, I am not able to make it work. That is, I don't know how to convert a sensor. in number. Any indication of how you have done it? Thank you very much!
Excellent vid Rod what an interesting way to control a heat pump. Yours says third party controller for the connection point, I have a Panasonic heat pump how would I find where to connect the waveshare on the board? I see a connection point that says external controller 1 would it be that? any advise
Thanks for sharing your knowledge, it is invaluable to us beginners. A question - can the heat pumps normal controller be used at the same time as you are controlling things through modbus? In other words, can a beginner with a long learning curve, develop the modbus controls over time, and use the heat pumps own controller until the modbus controls are finished? Thanks.
Yes, the control display can also be used in the U34 series, but if there is a communication error, the machine stops with an error message on the ch13 screen within a short time. After restarting communication, he continues his work nicely.
Hi! Great video!! Can the original factory remote display still be used? Or should it be eliminated? I don't use the measurement function. Is it enough to set the parameters from the home assistant, or do you have to take over the automatic operations as well? Will there be a video of the operation? Thx
Hi, you can use both at the same time, I still have the main controller connected and it still controls the timing of my hot water, so shouldn't be a problem to just use home assistant for monitoring. I hadn't really considered a video showing the operation, was there something specific you wanted to see?
Nice Work! Im trying to set up homeassistant aswell but i have CTC zenith 360 With a CTC ecoair 610m. But cant get it setup with my waveshare module. And aswell with a heatmeter ”Itron CF ECHO II Qp 1.5” with a m-bus to modbus converter. But i cant get it to Work with yaml file. Its so frustrating. This video helps alot! But not enough in my case, keep the Work up! :)
Hi Rod, excellent video! No blabla just the important facts. I set up everything right the way you explained it. As a newbie in HA your explanation made it possible. If I look in the list of entities all hp entities show a message "this entity has no unique id". What did I do wrong? Regards, Michael
Thanks, happy it helped! You can get rid of the message and allow config from the UI by adding a unique_id entry for each of the entries in the modbus.yaml file, the ID can be anything you like but must be unique in your HA instance. I think you need to restart HA after setting the IDs.
Hello. I am curious about your first sentence above : "Previously I integrated my heat pump with home assistant via WiFi and LGs ThinQ API". I have seen that there is integration between HA and ThinQ, but I couldn't find anything specific about the Therma V via this method. What entities are available in HA? Do you see energy usage/generated as well as flow temps etc? Curious to know before I decide whether to get the WiFi module or not. Thanks!
I used this integration for ThinQ: github.com/ollo69/ha-smartthinq-sensors For my heat pump it exposes the Hot water temp, the In and Out water temps and room temperature. It also reports current temp and allows you to see the target temp for the heating and hot water. I talk a lot more about it in this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-fRtfh1v-T6M.html The modbus integration definitely provides a lot more data and is probably the way to go.
Strange. I have the THERMA V PDC but the external boiler must be connected to the terminals where you show that the interface (3-part controller) must be connected. For RS485, the PI485 interface must be purchased separately to be mounted inside the PDC.
That is a bit strange, had a quick search for THERMA V PDC but couldn't figure out what model your referring to. LG like to mix things up and make everything complicated so I'm not surprised this is not consistent. What I've shown worked for my monoblock Therma V, but it's very possible for your heat pump you'll need an extra module.
Hi Rod, thank you very much for your Waveshare Rs485 Video. What did you find out to regulate the Heat pump for minimum consumption and not falling into the start stop trap. I have a 16kW HP .U33 feeding a 1500 l buffer tank. The power of the HP is ok for the whole house but I am using just one floor. So I need less power but I could not find out how to limit the max. power or regulate the compressor. May be you or someone in the community can help with your experience. Thank you!
Hi, Did you see this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-fRtfh1v-T6M.html before I used the waveshare module and modbus I had the LG wifi module that allowed control via ThinQ, in that video I talk a lot more about how I'm controlling the heat pump, that bit doesn't change with the modbus integration. Unfortunately the only real control you have is the pump on / off state and the target flow temperature. There is no way to directly control the max power used or directly regulate the compressor, but your heatpump should already be doing a good job of managing that based on the desired target temp and the flow and return temp.
Nice video. After seeing it i did order the waveshare device. Bit i have trouble connecting my heatpump. I testet the modbus connection with modbus rtu direct to a bms controller and works fine. But with the waveshare device and modbus tcp to home assistant i get no connection. What port and ip adresse do you use in the destination part off the webinterface in the waveshare device? And did you have to open ports in your router? Thanks🙏🏼😃
Thanks, it's really hard to debug and help with problems over youtube comments but make sure you've used the viacom app and set the "Transfer Protocol" option ( ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Xuj2YFZ5zME.html ) that should automatically change the port in the network section to 502, that port and whatever IP your waveshare has listed in the network section are what you need to connect to from HA. If you have everything setup on the same network there should be no need to open any ports on your router. I went through some generic debugging steps in this comment thread, might be helpful (the linked comment should be at the top marked as Highlighted Comment): ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Xuj2YFZ5zME.html&lc=UgzRb9r1vbOg_DGfEwx4AaABAg
Hi Rod, you're saying that with the current flow rate you can calculate the COP. But do you also not need the outgoing and returning water temperature for this? If so, how do you tackle this calculation? Thanks!
That is correct, both my old ThinQ integration and the modbus integration already supply the flow and return temps. Combined with the flow rate that should give heat in and heat out, I've also got a shelly EM that gives me the last required variable the kWh consumed by the pump to produce the heat.
I don't know how to tell if a model has a flow meter other than hooking it up and checking. I could add an external flow / heat meter but for a pump my size they are not cheap and a real pain to install, I think in my case where the heat pump is feeding a buffer tank the flow is going to be constant so I can probably get by without the flow meter.
LG therma V 4 series probably already have a flow meter Code ending in U34, possibly the smaller ones U44... I am currently testing the 12kW HM123MR.U34. Flow data available. But current electric power probably isn't. Unfortunately. While the wall control console shows :(
Hi @RodMcBain I am trying to understand this code: climates: - name: "hp_water_climate" address: 5 slave: 1 input_type: input max_temp: 55 min_temp: 40 offset: 0 precision: 1 scale: 0.1 target_temp_register: 8 temp_step: 0.5 temperature_unit: C I assume that address 5 is the current DHW temperature. So register 30006 I further assume that target_temp_register: 8 is the desired DHW temperature. So register 40009. So the first value is input and the second is holding. The input type in the code is input. How can this work if I refer to two different types of registers? Thanks for the explanation
My understanding is the input_type here only relates to the register type of the address field. The register defined in target_temp_register is hardcoded in home assistant to be a holding register, I think that makes sense as it's a temperature value that you can change so can only be a holding register.
rob - great video, i have a mebay generator controller im trying to get it working with homeassistant modbus , i have the modbus registers from the manufacture but i dont understand it , would be much appreciated if you can help
I find it hard trying to help debug modbus issues in YT comments even when using the same LG heat pump where I have some experience, there's so much that can go wrong. I hope you get it working!
thanks a lot for the great video, I have a LG VRF System with a concealed indoor unit which it is controlled by a wired remote controller, is it possible to integrate it in to home assistant by this way?
I'm really not sure, your best bet is to check the manual. I know some of the split heat pump units require some additional hardware to control them with modbus, the VRF System might be the same, but I've had no experience of this, sorry.
UPDATE - i used NodeRed for integration - i also can read the waterflow... my SW1 switch is a 8 pin switch. maybe thats the reason why i can read the waterflow newer version of the board.
@@RodMcBain calculation of COP now is also easy... but for water in and out reading i use a shelly 1pm with ADD-ON so the temperature sensor has a much faster update rate. do you know from the LG ESS the Modbus Register - the LG ESS is communicating over modbus with the Therma V. I also use a Victron 3 phase Setup and i want so simulate the modbus register for ESS to the LG Therma V! is think LG ESS is also based on Sunspect Protocol
Hi Rod. I took the plunge and went for this modbus solution, so I bought the same kit and wired it up as you described. However, I am at a complete loss. No matter what I do, I cannot find any data coming through, and the 'Act' light remains off on the Waveshare. I can connect to the Waveshare device, and I have tried multiple software tools for scanning the channels etc and I get nothing but a time out. I have tried switching the 2nd jumper switch on/off (as well as the 1st which enables the 3rd party controller), changing the modbus channel (01, 02, 11 etc) and it is the same story :( I was a little curious about your second jumper that you set. I have the split version and for the 2nd jumper in the manual it says OFF = REGINE and ON = Unified Open Protocol, but I have no idea what this means. If you have any insights at all please let me know. And thanks again for the video! One other question - I see there are several modbus channels in the settings. I am setting the one under Connectivity/Modbus Address. The documentation refers to a Meter Interface modbus address (I don't see this one), and there are others. Which one needs to be set to be the same as the 'slave' in HA?
Hi, Did you ever get this working? Unfortunately I have no experience with the LG split units, even the monobloc units come in various hardware revisions that all behave a bit differently and have manuals that use different naming for the same thing. For my unit switch 1.1 toggles between master and slave mode (make sure slave is selected), 1.2 is only listed as Modbus Function and the only only is the down position labled as "Common 3rd party", I expect this is the same as the "Unified Open Protocol" and probably what you want. In my settings I only have an option for "Modbus Address" so that almost certainly what you have labeld as "Connectivity/Modbus Address" There are far too many variable to debug these problems in youtube comments. But I went through some generic debugging steps in this comment thread, might be helpful (the linked comment should be at the top marked as Highlighted Comment): ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Xuj2YFZ5zME.html&lc=UgzRb9r1vbOg_DGfEwx4AaABAg
@justincooke4877 I don't know if this is the cause of issue, but in the split and hydrosplit installation manual there is a note: "In case of Split IWT, RTU Gateway should be installed for using modbus and refer to the RTU Gateway installation manual for memory maps." LG's Modbus RTU Gateway has part nr. PMBUSB00A.
Hello great video thanks. I'm trying to set up the same modbus adapter with HA but to get data from my SunSynk inverter. I think I've followed your video fairly closely but can't see how you got from altering the config.yaml to seeing data on the dahs board. I've updated my yaml but where do I look ? or how do I include this on a dashboard ? Thanks again..
Thanks, In my example I added a line "modbus: !include modbus.yaml" to my configuration.yaml file, that includes the modbus.yaml which which defines where the waveshare adaptor lives and beneath that defines all the devices to create (sensors, binary_sensors, climate etc), each of those devices maps onto a modbus input_type and address. You can see the full contents of my modbus file here: rodmcbain.com/mastering-modbus-heat-pump-integration-with-home-assistant/
@@RodMcBain thanks for that and sorry for the newbie questions. I’ve put a new file called modbus.yaml plus I put the include line in my config.yaml. I think I’ve followed this correctly and no errors. After a restart should the waveshare device show up in my devices list ? Accompanied by all the entities? There is nothing showing in mine ? Also if you unplug the inverter would you still see these entities but they would be 0 or null ? Ie can I set this up on the bench without the inverter just to get the HA bit working? Thanks Rod
i tried to couple a SDM630 Modbus v2 and with the Waveshare RS485 to RJ45/Ethernet. But the Data Light doesnt flash and in Vircon is no TXD / RXD Flow. It cant be the wiring. Any Tipps on Remote?
Hi Rod, Haven't you encountered a problem with some entities lately? I updated to the latest version of HA today. After restart I have two entities in error state (unavailable). I have this error in the log: Modbus waveshare1/hp_outlet_temp address waveshare13_input_33 is duplicate, second entry not loaded! Modbus waveshare1/hp_dhw_tank_temp address waveshare15_input_33 is duplicate, second entry not loaded! Both of these registers are used at the same time in the climates section. In the Climates section I can see the value of the outlet and dhw tank. Don't know what to do with it? Thank you
Yes, I noticed this yesterday, I've removed the 2 duplicate entries from the modbus config and replaced them with sensor templates that get the values from the climate devices. Something like this should work: - sensor: - name: hp_outlet_temp unique_id: "modbus.hp_outlet_temp" unit_of_measurement: "°C" device_class: temperature state_class: measurement state: "{{ state_attr('climate.hp_heating_climate', 'current_temperature')|float }}" - name: hp_dhw_tank_temp unique_id: "modbus.hp_dhw_tank_temp" device_class: temperature state_class: measurement unit_of_measurement: "°C" state: "{{ state_attr('climate.hp_water_climate', 'current_temperature')|float }}"
Hi@@RodMcBain Thanks for the code. I tried something similar but failed. I have this information from github: 2024.3.1 allows duplicate names if they are in different entity types.
Hi@@RodMcBain Your code didn't help me either. I am getting this error Invalid config for 'modbus' at modbus.yaml, line 155: required key 'address' not provided Invalid config for 'modbus' at modbus.yaml, line 160: 'state' is an invalid option for 'modbus', check: modbus->0->sensors->0->state Shouldn't I create the sensor somewhere other than in the modbus section?
Hi, Those are template sensors so can't live in the modbus file. I have them in a templates.yaml file which is included in the configuration.yaml file with: template: !include templates.yaml
Hi@@RodMcBain I've got it sorted and sorry for spamming. I put the following in the sensors.yaml file. Maybe it will be useful to someone. - platform: template sensors: hp_outlet_temp: friendly_name: "HP Outlet Temperature" unit_of_measurement: "°C" device_class: temperature value_template: "{{ state_attr('climate.hp_heating_climate', 'current_temperature') | float }}" - platform: template sensors: hp_dhw_tank_temp: friendly_name: "HP DHW Tank Temperature" unique_id: "modbus.hp_dhw_tank_temp" device_class: temperature unit_of_measurement: "°C" value_template: "{{ state_attr('climate.hp_water_climate', 'current_temperature') | float }}"
Sorry to post here again. Has anyone encountered the following error? Logger: homeassistant.components.modbus.modbus Source: components/modbus/modbus.py:355 Integration: Modbus Pymodbus: waveshare1: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received) The integration with the heat pump works for me so far, but I noticed this error in the HA log. This error appears more than 100 times a day. Does anyone know what it could be? Thank you
Hi @NailenBarkins, I had a similar problem, I think a recent change in home assistant broke this, try removing the "count: 1" lines from your climate devices.
@@NailenBarkins I think I replied too early in the morning, the "No response received, expected at least 8 bytes (0 received)" is the same error you were getting when the slave parameter was wrong, so HA asking for a value and not getting the expected response. As most things seem to be working I'd suspect it's maybe just one entry that's mapped wrongly. To start debugging that I'd probably try commenting out all but 1 entry in the modbus yaml file and see if the error goes away, if it does add back more entries and restart, hopefully through a process of elimination you can locate an entry that's causing the error. Probably also a good idea to enable modbus debug logging by adding "homeassistant.components.modbus: debug" to the HA log configuration, might give you a more verbose log.
Hi @@RodMcBain So I think I solved it. I added all the registries to test them. The problem is probably in these two registers: 39998 Product Group 0x8X (0x80, 0x83, 0x88, 0x89) 39999 Product Info. Split : 0 / Monobloc : 3 / High Temp. : 4 / Medium Temp. : 5 / System Boiler : 6 I approached them like this: address: 13 and address: 14. register 39998 shows me a value of zero and register 39999 shows me nothing (not available). And it was exactly this registry that showed me the error, see more.
Hello, great tutorial. Unfortunately I can't replicate it on my device 😞 I have two switches on the heat pump board that enable modbus. They are in the ON position. I have a cable connected to the third-party terminals, which I have connected to the same waveshare converter as in the video (485B and 485A). I will connect the internet + power to the converter. First, the PWR lights up immediately on that LINK. That is all. ACT does not light up. I can connect to the converter using vir com. Can someone advise me where the problem could be that the ACT diode does not light up. What should I possibly check? Is it possible to somehow measure the signal on connectors 485B and 485A? Thank you.
Hi, I had a similar issue when first setup and the problem in my case was the "Transfer Protocol" setting in the vir com app, make sure you've set it to Modbus_TCP_Protocol. If that's set the problem could be in Home Assistant, my understanding is if Home Assistant isn't properly connected to the pump via the Waveshare module the ACT light won't be on. In your HA config double check the IP and port are correct and type is set to "tcp". If that all looks correct there might be some helpful info in the HA logs that could point you at the problem.
Hi@@RodMcBain I think I have everything set up as you describe in the video. Is it necessary to have something installed in HA? Any supplement? Or is only the modbus.yaml file sufficient?
Hi@@RodMcBain I found this in the log: Logger: homeassistant.components.modbus.modbus Source: components/modbus/modbus.py:401 Integration: Modbus (documentation, issues) First occurred: 00:11:45 (1 occurrences) Last logged: 00:11:45 Pymodbus: waveshare1: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)
Hi @NailenBarkins Sorry for the delay getting back to you, it's really hard to debug these things remotely, especially over youtube comments. You don't need anything else installed in HA, should just work. The HA error suggests HA is setup and trying to connect. It's worth checking the settings in the Serial section of the vir com app match your heat pump, I didn't need to change these but it worth double checking them. If you've not already done so it's worth power cycling the heat pump, switch it off at the breaker for at least 15 seconds and power it back on. I'm not sure if this is a required, it's possible I did this without realising it''s a required step. Modbus address 1 worked for me but I did read a comment on another forum where someone said they had to change it to 2 to get it working, remember to change the "slave" parameters in the modbus.yaml file and the modbus address in the LG controller installer menu. I'm not sure what else to suggest other than double checking the jumper settings and the serial connection.
Modbus address on the controller is set to 1 and that should match slave in the home assistant config. I have read someone saying they couldn't get that to work and had to change it to 2 but 1 worked for me. My ThermaV is a is HM161M U33.
I'm afraid not, I just had a look to see what might be sensible to share, almost all of it has bits that are specific to my setup, like the zwave on/off switch and the power monitoring. But if there's anything specific you want I'm happy to share it.
@@RodMcBain thank you for your quick replay, i was just wondering if you made it or this is a custom software that you can name it? i have one Residential Heat Pump water heater from A. O. Smith that communicates with RS485 similar to you application that i would like to control remotely as well. thank you very much!
@@Laerciocatao If by dashboard you're talking about this ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Xuj2YFZ5zME.html then that's just a standard Home Assistant lovelace dashboard with standard components on it. All the controls, sensors and climate devices can just be added to make it look however you want it.
Can you expand on your comment a little, there are several ways to connect this up, seems like using modbus and native Home Assistant is the simplest cleanest solution. But I'd love to hear what you think the advantage of using mqtt instead plain modbus for something that natively speaks modbus is. Why is node-red better? Seems like another layer of complexity for little advantage? Not really arguing either way, if there's a better way I want to know what it is!
I think it is a better approach by using a different converter type from Modbus RS485 to Modbus TCP...and read directly the values using ModbusTCP using Node-Red as gateway without mqtt that is heavy and needs brokers and queues
@@MrElciupacabra I think I misunderstood the point you were trying to make, home assistant does directly read the Modbus TCP values, MQTT is not involved and node-red is not needed to do that, check out www.home-assistant.io/integrations/modbus/
I have a controller all ready attached to the heat pump via modbus. How would i attach the waveshare module. Can i connect it to the same A & B terminals that are already used for my other controller.
I'm not 100% sure, but my understanding is with modbus you can only have one controller on the bus, you can have many slave devices being controlled but only ever 1 controller, the waveshare module is a controller so it's not going to work without removing the controller you already have.