August 5, 20214 yr 44 minutes ago, JuanH said: Tried it last night. One thing that is missing from our flows to have this work is state_class and last_reset properties. They are needed for Long Term Statistics, which the new system uses: https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics Once I added these in the the necesarry values, I was able to use them in the new HA Energy configuration: Ok, something's gone wrong, and maybe you guys can help me figure it out. The above values stopped working at midnight last night. My guess is it has something to do woth the last_reset? Maybe I need to be passing it a value at midnight to update it as having re-initialized?
August 5, 20214 yr 2 hours ago, JuanH said: Maybe I need to be passing it a value at midnight to update it as having re-initialized? I think you're correct, not sure how to do so yet...
August 5, 20214 yr Author 53 minutes ago, RhysMcW said: I think you're correct, not sure how to do so yet... Could do it with an inject function, timer and timestamp. And then set the MQTT to retain last value
August 5, 20214 yr In the new "Energy" settings in HA there is the Grid consumption bit where you can add entities, I saw my BNETA power monitor plugs were there so I had a look in InfluxDB at those and see they send last_reset, in what looks like a number that is just the date and time. It looks like HA then adds a column called "last_reset_str" last_reset last_reset_str 202011251456369984.00 -> 2020-11-25T14:56:37+00:00 I've tried using the "J: expression" in the change node to set the value. I've tried the following expressions (with - > being the resulting value from the expression) $now('[Y0001][M01][D01]000000000.00') -> "20210805000000000.00" $string($now('[Y0001][M01][D01]000000000.00')) -> "20210805000000000.00" $number($now('[Y0001][M01][D01]000000000.00')) -> 20210805000000000 (can't seem to get the .00 decimal using the expression unless it is a string) If I use the debug node to see the data going to MQTT I can see the relevant values but HA seems to be ignoring/disregarding them.
August 6, 20214 yr On 2021/07/26 at 10:51 AM, RhysMcW said: Has anyone tried setting the time on the inverter using the modbus connection? I've done a NR flow to get the current date/time from the inverter and compare it to the current date/time, on my HA box, and if there is more than 10 seconds difference then I want to set the date/time on the inverter. The registers are 22,23 & 24 which are 2-byte registers. I can get the date/time fine in NR but I can't seem to get the inverter time set. Does anyone know how you're supposed to setup the payload for sending to the inverter? Here's my current function code for setting up the house/minute for register 24 which the inverter seems to be ignoring as the hour/minute is not getting set. (msg.minutes & msg.seconds are setup in a function prior to this one) function byteArrayToLong(byteArray) { var b_value = 0; for ( var i = 0; i <= byteArray.length - 1; i++) { b_value = (b_value * 256) + byteArray[i]; } return b_value; } msg.payload = { 'value': [byteArrayToLong([msg.minutes,msg.seconds])], 'fc': 16, 'unitid': 1, 'address': 24, 'quantity': 1 }; return msg; which results in the following payload being sent to the ModBusWrite flow, via a link-in/out "payload": { "value": [ 11318 ], "fc": 16, "unitid": 1, "address": 24, "quantity": 1 } My inverter also loses time - about 15 minutes every month. Not sure if there is a RTC or battery somewhere? (there is a huge array of batteries the inverter can use if it wanted to :)) Did you manage to figure out how to write to 2-byte registers? Thanks Innes
August 6, 20214 yr Just now, innesleroux said: Did you manage to figure out how to write to 2-byte registers? it's not so much the method of writing 2-byte registers, that I can see, it's the format the inverter will accept the new date/time that I think is the issue. I have tried so many variations now I've lost track of what I've tried so given up for now, hoping someone else has a look and finds a solution.
August 8, 20214 yr Author On 2021/08/05 at 1:47 PM, Bloubul7 said: Could do it with an inject function, timer and timestamp. And then set the MQTT to retain last value Managed to get it working via MQTT. Changed the Assemble config to the following Added a timestamp inject that injects every 24 hours. Date/ Time Formatter uses a pallete called moment flows (9).json
August 10, 20214 yr On 2021/08/08 at 12:16 PM, Bloubul7 said: Managed to get it working via MQTT. Changed the Assemble config to the following Added a timestamp inject that injects every 24 hours. Date/ Time Formatter uses a pallete called moment flows (9).json 4.71 kB · 6 downloads Thanks, @Bloubul7 I've given your new flow a try, but I've noticed that the entities don't update with the "last_reset_topic". I've checked the topic value, and it definitely sends an updated value over MQTT, either as scheduled, or when done manually, but the subscribing entities don't seem to pick it up. Not sure what I am doing wrong? Example of manually triggering the inject: Entity's last_rest stays the same:
August 10, 20214 yr Author 19 minutes ago, JuanH said: Thanks, @Bloubul7 I've given your new flow a try, but I've noticed that the entities don't update with the "last_reset_topic". I've checked the topic value, and it definitely sends an updated value over MQTT, either as scheduled, or when done manually, but the subscribing entities don't seem to pick it up. Not sure what I am doing wrong? Example of manually triggering the inject: Entity's last_rest stays the same: Have you tried restarting HA? I have not defined the last_reset on as a value on my entities, only defined the subscribed topic. See below screenshot
August 12, 20214 yr Hi All, Complete Noob here. I want to build a nice dashboard in Home Assistant for my solar installation. I have a Deye inverter which is the base for Sunsynk. I have a Raspberry 3b+ and a USB to RS232 Cable. How would I get started to get the firmware on the Raspberry, connecting the raspberry and start playing with Node Red? Thanks Kind Regards Jeremy
August 12, 20214 yr Hi Jeremy, the standard rasbian OS for the PI3 has node red pre-installed. You'd simply connect everything up, and access the node red web ui from a browser. From there you'd be able to install the prerequisite modules and import the flows into NR. once you have readings in NR, next step is to check integration with mqtt or home assistant running elsewhere on the network.
August 14, 20214 yr On 2021/08/12 at 9:36 AM, JeremyJvR said: Hi All, Complete Noob here. I want to build a nice dashboard in Home Assistant for my solar installation. I have a Deye inverter which is the base for Sunsynk. I have a Raspberry 3b+ and a USB to RS232 Cable. How would I get started to get the firmware on the Raspberry, connecting the raspberry and start playing with Node Red? Thanks Kind Regards Jeremy Did you succeed?
August 14, 20214 yr On 2021/08/08 at 12:16 PM, Bloubul7 said: Managed to get it working via MQTT. Changed the Assemble config to the following Added a timestamp inject that injects every 24 hours. Date/ Time Formatter uses a pallete called moment flows (9).json 4.71 kB · 10 downloads Thanks @Bloubul7 Changes pushed to Github
August 25, 20214 yr Hi Guys, I currently hard code my "Grid trickle feed" because I can't figure out which inverter register stores the value. Does anyone know which modbus register stores the value in the screenshot below?
August 26, 20214 yr 15 hours ago, Denarius said: Hi Guys, I currently hard code my "Grid trickle feed" because I can't figure out which inverter register stores the value. Grid_inverter_load - 167 - I think
August 26, 20214 yr Sry, I think I may have misunderstood, you are looking for the settings register, sry, not sure
August 26, 20214 yr @DenariusMaybe read all the registers, change it manually, then read the registers again and compare to see what has changed. I can't see it in the Modbus registers document either.
August 28, 20214 yr I'm looking to setup HA, and so far, only got a NUC. This thread looks like a great source for flows and everything that comes after setting up HA and Node Red. Is there a guide that can be followed to get through the initial setup? The reserved posts look exactly like what I need. FYI, I installed HA Container on Docker, but it didn't look to have the supervisor mode available. I might just need to install HA OS? I'd like to connect to all my SonOff devices without flashing the firmware Any assistance will be appreciated
August 28, 20214 yr 11 minutes ago, Saliegh said: I'm looking to setup HA, and so far, only got a NUC. This thread looks like a great source for flows and everything that comes after setting up HA and Node Red. Is there a guide that can be followed to get through the initial setup? The reserved posts look exactly like what I need. FYI, I installed HA Container on Docker, but it didn't look to have the supervisor mode available. I might just need to install HA OS? I'd like to connect to all my SonOff devices without flashing the firmware Any assistance will be appreciated Hey Saliegh. My recomendation would be to install HA OS: https://www.home-assistant.io/installation/generic-x86-64 Once done, install the Node Red add-on from the included add-on store. Then you can start with the flows in this thread. I also recomend the Everything Smart Home channel on Youtube. Loads of useful guides for HA on there: https://www.youtube.com/c/EverythingSmartHome/featured
August 28, 20214 yr 10 hours ago, JuanH said: Hey Saliegh. My recomendation would be to install HA OS: https://www.home-assistant.io/installation/generic-x86-64 Once done, install the Node Red add-on from the included add-on store. Then you can start with the flows in this thread. I also recomend the Everything Smart Home channel on Youtube. Loads of useful guides for HA on there: https://www.youtube.com/c/EverythingSmartHome/featured Thanks @JuanH, this got me up and running in no time. Using a live OS on a USB was the simplest way to get there. I've been told to get the follow device to hook my NUC up to the Inverter https://www.robotics.org.za/W17286?search=485 Do I use get CAT5 network cable to connect the 2? Probably going to run it about 10 meters
August 28, 20214 yr CAT5 cable yes. Or any other copper cable. 10m should be no issue, 485 can run long distances. Never seen this device before, but can't see why it won't work
August 28, 20214 yr 3 minutes ago, jacauc said: Never seen this device before What other converter options are tried and tested?
August 28, 20214 yr 2 hours ago, Saliegh said: What other converter options are tried and tested? I tried about 4-5 different options mentioned on this thread. However, the simplest and most reliable option I found was the cable for sale on the Solar Assistant website: https://solar-assistant.io/shop
August 28, 20214 yr 2 hours ago, Saliegh said: Thanks @JuanH, this got me up and running in no time. Using a live OS on a USB was the simplest way to get there. I've been told to get the follow device to hook my NUC up to the Inverter https://www.robotics.org.za/W17286?search=485 Do I use get CAT5 network cable to connect the 2? Probably going to run it about 10 meters The USB will most likely fail pretty soon if you keep it as the main drive, due to the amount of reads/writes. Look through the Everything Smart Home channel I mentioned earlier. There is a good guide on moving your installation onto an external (or internal if you can with the NUC) SSD drive.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.