JeremyJvR Posted September 7, 2021 Share Posted September 7, 2021 Hi All, I recently downloaded the latest flow from GitHub and when I import I get unrecognized flows "cycle" and "moment" Any ideas? Thanks Quote Link to comment Share on other sites More sharing options...
dawolf Posted September 7, 2021 Share Posted September 7, 2021 Hi @JeremyJvR You need to download two additional nodes that are not pre-installed with NR. Click the hamburger icon on the top right corner > click Manage Palette > Click Install tab. Search and install the following two nodes, node-red-contrib-cycle node-red-contrib-moment That should resolve the issue. Sc00bs 1 Quote Link to comment Share on other sites More sharing options...
JeremyJvR Posted September 7, 2021 Share Posted September 7, 2021 Awesome, thanks did the job dawolf 1 Quote Link to comment Share on other sites More sharing options...
RhysMcW Posted September 8, 2021 Share Posted September 8, 2021 (edited) On 2021/09/06 at 10:26 AM, Sc00bs said: LOL, nope tried that already, still there. @Bloubul7 is it the energy node in the Node Red flow that is causing this error? Wondering if I maybe updated the Node Incorrectly, though I can't see much room for error @Sc00bs did you come right with this? I notice you have state_class, with an underscore, mine does not have the underscore, but that is because on the Inverter_Monitor_Publish flow in the "Assemble Config" node there is the following line to set the state_class payload for MQTT - it references "stateclass", with no underscore, in msg "state_class": msg.stateclass, so check your "Assemble Config" node to see if your's is like that and if so remove the underscore in your Energy change node(s). Edited September 8, 2021 by RhysMcW Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted September 8, 2021 Share Posted September 8, 2021 6 minutes ago, RhysMcW said: @Sc00bs did you come right with this? I notice you have state_class, with an underscore, mine does not have the underscore, but that is because on the Inverter_Monitor_Publish flow in the "Assemble Config" node there is the following line to set the state_class payload for MQTT - it references "stateclass", with no underscore, in msg "state_class": msg.stateclass, so check your "Assemble Config" node to see if your's is like that and if so remove the underscore in your Energy change node(s). Yes, all sorted and working now, I had made changes in my yaml file previously and forgot about them. As a result there was an argument in my HA as to what the stateclass should be! Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted September 8, 2021 Share Posted September 8, 2021 Working with the _ so who knows Quote Link to comment Share on other sites More sharing options...
dawolf Posted September 8, 2021 Share Posted September 8, 2021 45 minutes ago, Sc00bs said: Yes, all sorted and working now, I had made changes in my yaml file previously and forgot about them. As a result there was an argument in my HA as to what the stateclass should be! @Sc00bs would you mind sharing what your yaml file entries look like? I currently have this in my configuration.yaml file, homeassistant: customize: sensor.sunsynk_grid_gridbuy_day: device_class: energy state_class: measurement sensor.sunsynk_solar_pv_day: device_class: energy state_class: measurement however I still cant see/select the sensors in the Energy settings. Thanks. Quote Link to comment Share on other sites More sharing options...
jacauc Posted September 8, 2021 Share Posted September 8, 2021 1 minute ago, dawolf said: @Sc00bs would you mind sharing what your yaml file entries look like? I currently have this in my configuration.yaml file, homeassistant: customize: sensor.sunsynk_grid_gridbuy_day: device_class: energy state_class: measurement sensor.sunsynk_solar_pv_day: device_class: energy state_class: measurement however I still cant see/select the sensors in the Energy settings. Thanks. I don't think it's necessary to have anything in configuration.yaml as long as the state_class is configured in the nodes such as shown above. For me it works without any changes in yaml. I suggest removing that entire section and checking then. Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted September 8, 2021 Share Posted September 8, 2021 1 minute ago, jacauc said: I don't think it's necessary to have anything in configuration.yaml as long as the state_class is configured in the nodes such as shown above. For me it works without any changes in yaml. I suggest removing that entire section and checking then. Yup, removed it totally, was a legacy of another problem I had a few months ago Quote Link to comment Share on other sites More sharing options...
dawolf Posted September 8, 2021 Share Posted September 8, 2021 Thanks. I've removed it completely and also added the state_class rule to the energy nodes (7 in total), I also double checked my Assemble Config node and the settings correspond with using an underscore, I've restarted everything however still don't see the sensors in the energy drop downs. Quote Link to comment Share on other sites More sharing options...
jacauc Posted September 8, 2021 Share Posted September 8, 2021 1 minute ago, dawolf said: Thanks. I've removed it completely and also added the state_class rule to the energy nodes (7 in total), I also double checked my Assemble Config node and the settings correspond with using an underscore, I've restarted everything however still don't see the sensors in the energy drop downs. Could it be due to mqtt discovery being turned off in HA? Try adding this to configuration.yaml and check? mqtt: discovery: true Quote Link to comment Share on other sites More sharing options...
dawolf Posted September 8, 2021 Share Posted September 8, 2021 Thanks, I've added the mqtt discovery to the yaml config, restarted but still unable to see the entities. I will try to restore an earlier system backup and try again. Quote Link to comment Share on other sites More sharing options...
dawolf Posted September 8, 2021 Share Posted September 8, 2021 What Home Assistant version are you guys on? I'm currently on core-2021.8.8 Quote Link to comment Share on other sites More sharing options...
RhysMcW Posted September 8, 2021 Share Posted September 8, 2021 2 minutes ago, dawolf said: What Home Assistant version are you guys on? I'm currently on core-2021.8.8 it's from 2021.9 that they introduced the new total_increasing for the state_class Quote Link to comment Share on other sites More sharing options...
dawolf Posted September 8, 2021 Share Posted September 8, 2021 Thanks @RhysMcW I've updated to 2021.9.4 Now I see the PV and Grid selections in the Energy configuration. I guess it's a waiting game until data starts to populate, Quote Link to comment Share on other sites More sharing options...
Bloubul7 Posted September 8, 2021 Author Share Posted September 8, 2021 Yes takes about an hour or 2 dawolf 1 Quote Link to comment Share on other sites More sharing options...
RhysMcW Posted September 8, 2021 Share Posted September 8, 2021 (edited) 2 minutes ago, dawolf said: I guess it's a waiting game until data starts to populate yeah, that only updates every 60 minutes and not necessarily on the hour so be patient Edited September 8, 2021 by RhysMcW dawolf 1 Quote Link to comment Share on other sites More sharing options...
Saliegh Posted September 8, 2021 Share Posted September 8, 2021 Warning... Appreciation post Thanks to @Bloubul7 for doing all the leg work to get this going and maintaining it. Many others too have contributed, appreciate all the collaboration and efforts. Thanks to @Sc00bs for making time on a Sunday night to debug this with me. Glad I was not the only one stumped (lol). The follow up WhatsApp messages also made me feel like the support in this community is great. Thanks to @RhysMcW for adding the missing piece of the puzzle. So in summary, what got me across the line that maybe not in black and white here (Deployment on a NUC) Hardware I bought 2 RS485 converters (WaveShare and this). I got it working with the latter. Have not tested the Waveshare yet. When wiring, follow @Sc00bs instructions. What you need to do in addition, is wire up the ground. That would be the green and green/white. With the 5kw Inverter, use the BMS485 port, NOT the RS485. Software Deploying HomeAssistantOS onto my NUC SSD was most easily achieved by running a live (Boot from USB) version of Ubuntu. Instructions here From Supervisor menu, install Add-ons Node-Red InfluxDB (database engine) Create the db Create a user (db_user) Mosquitto Broker Graphana (for Dashboards) Setup datasource To the db that you created in [2] above Use the IP address of the machine, not localhost in the http url Authorize with the user that you created in [2.2] above From Configuration menu, install Integrations Mosquito Broker. I've just got my HA integration with solar solution working, thanks to you guys. I pledge to help out where I can. I am pretty new to all the software and hardware mentioned here, so still learning. Will be trying to modify the Grafana dashboards for my use case. Also want to build in some automation around turning SonOff devices off when the grid is down (I've seen mention of this on this thread). Baby steps... Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted September 8, 2021 Share Posted September 8, 2021 @Bloubul7 is definitely our CIC on this one , without him I think would still be trying to work out how ModBus works, lol Quote Link to comment Share on other sites More sharing options...
Saliegh Posted September 8, 2021 Share Posted September 8, 2021 (edited) Anybody else experiencing a bad request and reference error? I just downloaded the latest flows from @jacauc github page, and got the attached error. It should be ok to move v1value and v2value declarations to the top of the script, right? Edited September 8, 2021 by Saliegh Added question about moving declarations to the top Quote Link to comment Share on other sites More sharing options...
dawolf Posted September 8, 2021 Share Posted September 8, 2021 Hi @Saliegh Yes, you can add those variable declarations and you should be good. I also needed to add those two variable declarations with one of the versions of the flows I downloaded. Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted September 9, 2021 Share Posted September 9, 2021 Can you guys maybe submit your changes to @jacauc github so that it can be updated Quote Link to comment Share on other sites More sharing options...
Saliegh Posted September 9, 2021 Share Posted September 9, 2021 19 minutes ago, Sc00bs said: Can you guys maybe submit your changes to @jacauc github so that it can be updated Yeah, I've PM'd him about this. The repo should be updated to support gitflow too for new developments Quote Link to comment Share on other sites More sharing options...
Saliegh Posted September 9, 2021 Share Posted September 9, 2021 5 hours ago, Saliegh said: Yeah, I've PM'd him about this. The repo should be updated to support gitflow too for new developments PR submitted. It's been too long since I used GitHub Quote Link to comment Share on other sites More sharing options...
Saliegh Posted September 14, 2021 Share Posted September 14, 2021 So I found both RS485 to USB converters that I bought work perfectly. I'm going to sell one of them. If anybody is interested, the advert is available here Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.