-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NonNASA] Outdoor Temperature and Energy Consumption - Home Assistant Sensor Request #214
[NonNASA] Outdoor Temperature and Energy Consumption - Home Assistant Sensor Request #214
Comments
Hi Aran, Like said, I will test this later in the day, but in the mean time, and to better understand the good work you are doing:
Sorry for so many questions. Goahead |
Hi @Goaheadz,
|
Hi Omer, You are a superstar! I haven't tested everything completely yet but all the sensors are coming up in Home Assistant! Thank you so much for implementing this. You should be proud. Brad |
Hi Brad, Thank you so much for your kind words! 😊 I'm really glad to hear that all the sensors are showing up in Home Assistant. Your feedback is invaluable, and it's great to know the implementation is working well so far. If you could continue testing and let me know if everything remains stable or if you encounter any issues, that would be super helpful. Once you're confident that all is working as expected, I'll be happy to merge the changes from the testing source to the main branch. Looking forward to your feedback! Best, |
Here is now so lot of messages that i can't keep count what is relevant and which not... |
Hello, First of all, thank you for your feedback! The term "samsung_hvac_nasa" was actually the name of my test system, and it accidentally made its way into the documentation during the discussion. Apologies for the confusion, and this will be corrected. Regarding the C8 topic: We specifically set this address for adding the sensors under the outdoor unit. If these sensors were added to each indoor unit, it would lead to duplicated sensors. Therefore, we chose this approach to improve efficiency and prevent data redundancy. When you mention all available sensors, could you clarify which specific sensors you are referring to? As we continue to decode the system, we are adding new sensors gradually. If you are capturing additional sensor logs or values, please feel free to share them with us. This will help us include any missing or newly discovered sensors. |
In this thread start message is some log view, where is undefined sensor values. If they are available in bus messages, why discard them... These would be useful sometimes.
|
Hey Omer, I will have to wait till I get home to send you the logs but I turned on my AC remotely today and the voltage and instantaneous sensors aren't updating. They still say 0. Outdoor temperature is working perfectly and the current sensor is updating but seems to be incorrect. The cumulative energy sensor is updating but is obviously incorrect as well. Just wanted to let you know. I'll share my log with you later. Jkirjo: I think those undefined values are pretty useless info. I wouldn't want him to waste his time with those personally but perhaps someone would have a use for them. Thanks |
Hello Brad, Thank you for the update! From the logs I reviewed earlier, it seems that the energy values are indeed showing as 0, which explains why the sensors are not updating correctly. To get to the bottom of this, I’ll need more detailed logs. If there are others with different models who can share their log information, it would help us troubleshoot and test potential fixes more quickly. I appreciate your patience, and please do share your logs when you have a chance. This additional information will be crucial in identifying the root cause and resolving the issue effectively. Thanks, |
Hello Brad, To help narrow down the issue, could you let me know which pins you connected your air conditioner to (e.g., F1/F2/F3/F4)? Also, could you specify which ESP device and RS485 module you’re using in your setup? This information will be really helpful in understanding the configuration and diagnosing the problem accurately. Thanks, |
I will take a more detailed log while running it later tomorrow (it's a nice temperature right now). I presume you would want more detailed logs while it is running and generating different values. It is connected to the F1 and F2 connections. I purchased the 'M5 Stack Official ATOM Lite ESP32 Development Kit' along with the 'M5Stack Official ATOMIC RS485 Base TTL-RS485 Converter'. At least that's what they were detailed as from AliExpress. They look exactly like the items that were recommended. No need to thank me for my patience. You are the one doing the hard work! I am very thankful and quite happy to provide any info you need. I imagine it wouldn't be easy when you don't have the device yourself to test. |
Hi Brad, "I turned on my AC remotely today and the voltage and instantaneous sensors aren't updating. "
We are talking about VDC (outdoor DC inverter unit), so I would assume that only if the compressor starts working/ramping up, till then, there will be no VDC values ...just guessing. In your log file its seems that the outdoor unit did not started the compressor yet. I would also guess that 0.8A is the current being draw for the startup procedure. (valves , electronics, sensors, relays, outside FAN etc etc), cause its just +/-180W of consumption in DC side. (depending in efficiency of the inverter, that would be +/-200W in AC side)..at this point the compressor did not started, so inverter_power[W] is also 0 I believe that if you use FAN mode only, the result would be the same as above in log files. (I need to test this also) At least, that's how I understand the system works. I was not able to test this yesterday (got home pretty late), but I will try to test it today and give you all some reports to. Regards |
Hello Brad, Thank you for the details and for your support! Yes, having detailed logs while the AC is running and generating different values will be quite helpful. Just to confirm, in your YAML configuration, have you set the baud_rate to 2400? If not, could you please try setting it to 2400 and let me know if that makes any difference? The F1 and F2 connections should be correct, but the baud rate setting can sometimes affect communication. I really appreciate your cooperation. We’re making good progress thanks to your help! Best regards, |
Hello everyone, I have made significant code optimizations for the Non-NASA implementation. These changes include improved memory management and substantial updates to the logging structure to log all data comprehensively. If a few of you could help test this latest version, it would be greatly appreciated. Based on the results, I can plan the next steps accordingly. For those who will be testing, please share YAML examples, log dumps, and device connection information with me. external_components:
- source: github://omerfaruk-aran/esphome_samsung_hvac_bus@add-outdoor-sensors
components: [samsung_ac]
refresh: 0s Thank you! |
I will do this later in the evening for sure. |
Aran, Just changing in YAML: external_components:
....And adding the outdoor sensors in YMAL, nothing works anymore. Integration broken or maybe log format not correct, so that integration cant see values. logs_samsung-hvac-muti-split_run (2).txt My YAML: |
with UART debug: |
Could you please change the baud rate to 2400, re-upload the configuration, and test again? If you have the time, I can also connect to your computer via Anydesk to perform the tests myself. Feel free to reach out to me on Instagram at @teknoaran for further assistance. |
2400? Why? |
The reason for setting the baud rate to 2400 is that non-NASA protocol devices specifically communicate using a 2400 baud rate, according to the protocol specification. While the 9600 baud rate works for NASA protocol devices, the non-NASA devices require 2400 baud for proper communication, including outdoor sensor data. Without this change, the integration won't be able to read or send data correctly to these non-NASA devices. The main purpose of this test is to confirm the baud rate configuration. In previous attempts, the outdoor temperature and energy sensors were receiving incorrect values, which caused the sensors to not update correctly. If the baud rate adjustment is correct, this change should resolve that issue, allowing the sensors to receive accurate data. |
I still dont get it...sorry :) In the past, when I started debuging with @lanwin I was able to see this data format in logs like this: [W][samsung_ac:543]: MSG: {src:c8;dst:00;cmd:f3;commandF3:{inverter_max_frequency[Hz]:66; inverter_total_capacity_requirement[kW]:7.700000; inverter_current[ADC]:2.400000; inverter_voltage[VDC]:0.000000; inverter_power[W]:0.000000}} Today I dont remember how to enable this type of raw data in yaml, and thats probably why it doesnt work for me. |
Yes, the data captured by my code at a speed of 2400 baud is very important, I will direct the project accordingly. The settings you have changed now are for testing, we will restore it after the test. |
I removed the small data size control that I added for non-NASA purposes. While the baud_rate is 9600, can you update it and try again? |
Ok. |
@tech2urdoor can you write the models of the outdoor and indoor units? |
It is a ducted system with one outdoor unit: AC090HCAFKH/SA I'm not sure what model the 'Indoor' part of it would be as that's located in the ceiling space, if that makes sense. There is a wired remote control: MWR-WE10 There is a completely separate zonemaster controller that controls dampeners (turning vents in rooms on and off) but I believe that is not directly connected at all as even the official wifi kits for the AC couldn't control zones. |
Hey Everyone, I’ve made an important update for the Non-NASA protocol. This update introduces a dynamic delay mechanism during the startup phase. Now, the controller registration requests are adjusted to ensure they’re sent only after the outdoor unit is fully ready. The system will start with a 10-second delay and adapt up to 1 minute, providing more reliable and consistent communication. Key Focus for Testing: Energy Sensors: Please pay close attention to the energy sensors (current, power, voltage, and cumulative energy) and let me know if the values are now accurate and updating correctly. Update your code and upload it to your device. |
Hi Omer, I just updated and uploaded the code. I switched it on through home assistant and lowered the target temperature so the compressor would run. Everything worked fine with no lag but unfortunately, the voltage and instantaneous power sensors never updated in home assistant. Same experience as last time. Thanks |
@tech2urdoor Can you update it again and run another test? |
Same result. Logs attached |
Hi Omer, First I want to thank you for your work on the development of the Non-NASA Samsung AC system. My system is: Outdoor Unit For integration I use m5stack-atom with baud_rate: 9600. Communication works fine. |
Hi @jszkiela72, Thank you for your valuable feedback and for providing detailed information about your setup. It's possible that the current sensor value for the outdoor unit is indeed off by a factor of 10, likely due to a calibration issue. I’ll look into this and work on a correction for accurate current readings. I’ll update you soon with a potential fix. |
Hi @tech2urdoor, Based on my research, there can be issues with sensor data not being read correctly due to differences in some air conditioner models, as well as the ESP devices and RS485 modules used. Specifically, problems may arise when the baud rate configurations vary. Although a baud rate of 9600 might work for some devices, it could be necessary to test other baud rate speeds. Could you conduct more extensive testing to see how these different configurations affect the results? For example, could you try changing the baud rate to 2400, 4800, and 9600, and then create separate log records for each, and send them? Thank you, and best of luck! |
I also confirm the 10x off in current: I notice improvements but still to much lag and fail in requests.
Its hard to explain behavior, cause I can see sometimes the integration change to "unavailable" for brief second, if i press from an off state to "fan" state per example. After that if I press again "fan", it will start (beep), and sometimes it responds quikly. My 2 cents would be, something flooding the D1 mini. In log files: logs_samsung-hvac-muti-split_run (7).txt Keep up the good work. |
samsung-hvac-muti-split.yaml (2).txt Should I remove some enable logs in yaml code to easy the messages? |
Unfortunately if I use any other baud rate other than 9600 everything becomes unavailable in Home Assistant. Attached logs for each baud rate. Thanks |
Voltage, current and power is related to Inverter, so values reported by outdoor unit in are in the DC side...not AC input. We could make some calculation to have approximate total consumption of the units, but introducing indoor units to the calculations would be harder. Power is Power, so DC power should be +/- the same as AC power, minus indoor units fans/electronics. |
I'm jealous! I'm not getting any readings in home assistant for voltage or instantaneous power even though that data is being communicated (according to the logs). I also have an independent reading from a Shelly em with a ct clamp over the AC circuit so this isn't a necessity for me. The whole circuit actually draws around 15w with AC off. I'm guessing that is power that it uses to power the control panel and the m5stack chip that is wired into that circuit. Although having this working would allow me to use that ct clamp to monitor a different circuit. I'm surprised your AC is actually connected to a socket. Here in Australia, all high powered devices like air conditioners have to be on an independent circuit. They draw too much power for a standard socket. |
"465 W reported by outdoor unit vs. 273 W reported by the socket." That would be the holy Grail of energy. Putting 273W AC and getting 465W DC out (almost 2x gain). :) yep..something is not right. |
@Goaheadz @tech2urdoor |
The difference may be due to True RMS AC. |
I had a mistake, I didn't see that this thread was talking about NonNASA @omerfaruk-aran |
Hi @htht2001 I noticed, no problem. :) I continue to work on this subject. I will give information about the process. |
Integration takes 5-10 seconds to respond after a change request in HA. |
If you mention that, I observed similar behavior in fact. And the web interface directly on ESP was somehow slowly responding as well. |
Hi folks! The "unknown" state is here with ac on and off, it doesn't matter if a change operational mode. My setup:
Other infos abount my setup and other issues here |
I hope this message finds you well. |
Hello everyone; |
Thank you Omer. Appreciate the update and your work. I don't have any coding experience but this is certainly motivating me to learn. Sorry if this is a silly question but what programming language should I be learning in order to help with this project? |
@omerfaruk-aran I'm here, coding experience and non-NASA owner, but this is the first time I give a look to ESPHome components. If you could point me to the specific areas or files in the codebase that I should start looking into for this problem, I would appreciate it! |
Discussed in #108
Originally posted by Goaheadz March 6, 2024
Since there is already a message containing the outdoor temperature, I think making this as a HA sensor, would be handy for automation's.
This is the message I get:
[W] | [samsung_ac:493] | MSG: {src:c8;dst:00;cmd:c0;commandC0:{ou_operation_mode:88; ou_4way_valve:0; ou_hot_gas_bypass:0; ou_compressor:0; ou_ac_fan:0; ou_outdoor_temp[°C]:13; ou_discharge_temp[°C]:11; ou_condenser_mid_temp[°C]:12}}
Let me know what can I do, to make this possible.
Help needed :)
Thx
G
The text was updated successfully, but these errors were encountered: