Owl Intuition pv & Home Assistant

Thanks for your quick reply, I’m sure everyone will agree it’s greatly appreciated.

In the meantime I’ve downgraded back to 2023.4.6.

If anyone needs to do this you need to issue the following command from an SSH console (install the Terminal & SSH add-in).

ha core update --version 2023.4.6

2 Likes

@glopresti I’ve created a PR which I believe fixes the issue.

1 Like

This worked for me thanks :slight_smile:

Great! I was a bit overwhelmed these days but this is really appreciated. I’ll review and merge it right away.

I’m not sure if this will be of interest but I use node red to strip apart the owl ump multicast - I then pass the pieces to influxdb and eventually grafana for some pretty graphs:

[{“id”:“44115e71.e01c9”,“type”:“tab”,“label”:“Original Solar PV flow”,“disabled”:false,“info”:""},{“id”:“6e0dea56.f3c3f4”,“type”:“udp in”,“z”:“44115e71.e01c9”,“name”:“Owl Solar PV”,“iface”:"",“port”:“9991”,“ipv”:“udp6”,“multicast”:“true”,“group”:“224.192.32.19”,“datatype”:“utf8”,“x”:90,“y”:260,“wires”:[[“d77e7101.e2c8e”,“d4a7c8c7.d336c8”]]},{“id”:“d77e7101.e2c8e”,“type”:“debug”,“z”:“44115e71.e01c9”,“name”:“Owl Solar PV”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“x”:290,“y”:200,“wires”:[]},{“id”:“9445345a.d9a1c8”,“type”:“comment”,“z”:“44115e71.e01c9”,“name”:“SOLAR DATA PACKET”,“info”:“SOLAR DATA PACKET\nEXAMPLE PACKET\n\n0.000.00 0.000.00\n\nPARAMETERS\nThe main tag contains sections for the current solar readings () and the totals for the day (). Both sections have and tags that contain the values for power generated by the PV system and power exported to the electricity grid.\n \nTag Attribute Description\n \n \n Solar Id The MAC Address of the Network OWL\n \n \nCurr/Day units Units for the value in the xml tag.\nwh = Watt Hours, divide by 1000 to get kWh\nw = watts”,“x”:120,“y”:160,“wires”:[]},{“id”:“dec6a9e.a030858”,“type”:“function”,“z”:“44115e71.e01c9”,“name”:“setup global variable solarPvId”,“func”:“global.set(“solarPvId”,msg.payload);”,“outputs”:1,“noerr”:0,“x”:970,“y”:260,“wires”:[[]]},{“id”:“b202ffe1.bf262”,“type”:“function”,“z”:“44115e71.e01c9”,“name”:“setup global variable currentGeneratingUnitsW”,“func”:“global.set(“currentGeneratingUnitsW”,msg.payload);”,“outputs”:1,“noerr”:0,“x”:1020,“y”:420,“wires”:[[]]},{“id”:“6258c68c.1d75b8”,“type”:“function”,“z”:“44115e71.e01c9”,“name”:“setup global variable exportingUnitsW”,“func”:“global.set(“exportingUnintsW”,msg.payload);”,“outputs”:1,“noerr”:0,“x”:990,“y”:500,“wires”:[[]]},{“id”:“963edb3.6a15e28”,“type”:“function”,“z”:“44115e71.e01c9”,“name”:“setup global variable currentDayGeneratedW”,“func”:“global.set(“currentDayGeneratedW”,msg.payload);”,“outputs”:1,“noerr”:0,“x”:1010,“y”:580,“wires”:[[]]},{“id”:“ee24910a.50fac”,“type”:“function”,“z”:“44115e71.e01c9”,“name”:“setup global variable currentDayExportedW”,“func”:“global.set(“currentDayExportedW”,msg.payload);”,“outputs”:1,“noerr”:0,“x”:1010,“y”:660,“wires”:[[]]},{“id”:“cf0c6650.c7c678”,“type”:“ui_gauge”,“z”:“44115e71.e01c9”,“name”:“Currently generating”,“group”:“1c8bae75.1a8cc2”,“order”:1,“width”:0,“height”:0,“gtype”:“gage”,“title”:“Currently generating”,“label”:“watts”,“format”:"{{value}}",“min”:0,“max”:“4000”,“colors”:["#fff86b","#e4ef65","#77bb40"],“seg1”:“500”,“seg2”:“1000”,“x”:1380,“y”:420,“wires”:[]},{“id”:“779072ad.f99a2c”,“type”:“string”,“z”:“44115e71.e01c9”,“name”:“Currently exporting”,“methods”:[{“name”:“between”,“params”:[{“type”:“str”,“value”:""},{“type”:“str”,“value”:""}]},{“name”:“toFloat”,“params”:[{“type”:“num”,“value”:“1”}]}],“prop”:“payload”,“propout”:“payload”,“object”:“msg”,“objectout”:“msg”,“x”:650,“y”:500,“wires”:[[“62d34c81.631d04”,“6258c68c.1d75b8”,“9ea332b6.a6a65”]]},{“id”:“11f0d153.c7431f”,“type”:“string”,“z”:“44115e71.e01c9”,“name”:“Current Generated Today”,“methods”:[{“name”:“between”,“params”:[{“type”:“str”,“value”:""},{“type”:“str”,“value”:""}]},{“name”:“toFloat”,“params”:[{“type”:“num”,“value”:“1”}]}],“prop”:“payload”,“propout”:“payload”,“object”:“msg”,“objectout”:“msg”,“x”:670,“y”:580,“wires”:[[“a5949be8.678188”,“963edb3.6a15e28”,“97874c41.90e15”]]},{“id”:“334174ab.10874c”,“type”:“string”,“z”:“44115e71.e01c9”,“name”:“Current Exported Today”,“methods”:[{“name”:“between”,“params”:[{“type”:“str”,“value”:""},{“type”:“str”,“value”:""}]},{“name”:“toFloat”,“params”:[{“type”:“num”,“value”:“1”}]}],“prop”:“payload”,“propout”:“payload”,“object”:“msg”,“objectout”:“msg”,“x”:670,“y”:660,“wires”:[[“d9bbec3e.1ef5c”,“ee24910a.50fac”,“586f5093.d6e54”]]},{“id”:“62d34c81.631d04”,“type”:“ui_gauge”,“z”:“44115e71.e01c9”,“name”:“Currently Exporting”,“group”:“1c8bae75.1a8cc2”,“order”:2,“width”:0,“height”:0,“gtype”:“gage”,“title”:“Currently Exporting”,“label”:“watts”,“format”:"{{value}}",“min”:0,“max”:“4000”,“colors”:["#e0eed4","#77bb40","#253d0e"],“seg1”:"",“seg2”:"",“x”:1370,“y”:500,“wires”:[]},{“id”:“a5949be8.678188”,“type”:“ui_chart”,“z”:“44115e71.e01c9”,“name”:“Current Generated today”,“group”:“1c8bae75.1a8cc2”,“order”:3,“width”:0,“height”:0,“label”:“Current Generated Today”,“chartType”:“line”,“legend”:“true”,“xformat”:“HH:mm:ss”,“interpolate”:“linear”,“nodata”:"",“dot”:false,“ymin”:“0”,“ymax”:“20000”,“removeOlder”:1,“removeOlderPoints”:"",“removeOlderUnit”:“86400”,“cutout”:0,“useOneColor”:false,“colors”:["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],“outputs”:1,“x”:1390,“y”:580,“wires”:[[]]},{“id”:“d9bbec3e.1ef5c”,“type”:“ui_chart”,“z”:“44115e71.e01c9”,“name”:“Curent Exported Today”,“group”:“1c8bae75.1a8cc2”,“order”:4,“width”:0,“height”:0,“label”:“Curent Exported Today”,“chartType”:“line”,“legend”:“true”,“xformat”:“HH:mm:ss”,“interpolate”:“linear”,“nodata”:"",“dot”:false,“ymin”:“0”,“ymax”:“20000”,“removeOlder”:1,“removeOlderPoints”:"",“removeOlderUnit”:“86400”,“cutout”:0,“useOneColor”:false,“colors”:["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],“outputs”:1,“x”:1380,“y”:660,“wires”:[[]]},{“id”:“24479ab1.ad5ee6”,“type”:“function”,“z”:“44115e71.e01c9”,“name”:“setup global variable solarPvTimestamp”,“func”:“global.set(“solarPvTimestamp”,msg.payload);”,“outputs”:1,“noerr”:0,“x”:1000,“y”:340,“wires”:[[]]},{“id”:“e1c66e38.93061”,“type”:“debug”,“z”:“44115e71.e01c9”,“name”:“currently generating”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“x”:930,“y”:380,“wires”:[]},{“id”:“9ea332b6.a6a65”,“type”:“debug”,“z”:“44115e71.e01c9”,“name”:“currently exporting”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“x”:930,“y”:460,“wires”:[]},{“id”:“fe848103.c53fb”,“type”:“debug”,“z”:“44115e71.e01c9”,“name”:“solarPvId”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“x”:900,“y”:220,“wires”:[]},{“id”:“ef7c731e.c8649”,“type”:“debug”,“z”:“44115e71.e01c9”,“name”:“solarPvTimesatmp”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“x”:930,“y”:300,“wires”:[]},{“id”:“586f5093.d6e54”,“type”:“debug”,“z”:“44115e71.e01c9”,“name”:“exported today”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“x”:920,“y”:620,“wires”:[]},{“id”:“97874c41.90e15”,“type”:“debug”,“z”:“44115e71.e01c9”,“name”:“generated today”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“x”:920,“y”:540,“wires”:[]},{“id”:“fc0d8c67.cfe13”,“type”:“function”,“z”:“44115e71.e01c9”,“name”:“Combine 6 global variables into one payload”,“func”:“msg.payload = \n\n{\n"solarPvId” : global.get(“solarPvId”),\n"solarPvTimestamp" : global.get(“solarPvTimestamp”),\n"currentGeneratingUnitsW" : global.get(“currentGeneratingUnitsW”),\n"exportingUnintsW" : global.get(“exportingUnintsW”),\n"currentDayGeneratedW" : global.get(“currentDayGeneratedW”),\n"currentDayExportedW" : global.get(“currentDayExportedW”)\n\n}\nreturn msg;\n\n",“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:1010,“y”:780,“wires”:[[“5de13385.20a87c”,“2d01f7bc.b02da8”]]},{“id”:“4b79f042.9a914”,“type”:“inject”,“z”:“44115e71.e01c9”,“name”:"",“props”:[{“p”:“payload”},{“p”:“topic”,“vt”:“str”}],“repeat”:“10”,“crontab”:"",“once”:true,“onceDelay”:0.1,“topic”:"",“payload”:"",“payloadType”:“date”,“x”:550,“y”:780,“wires”:[[“fc0d8c67.cfe13”]]},{“id”:“d4a7c8c7.d336c8”,“type”:“switch”,“z”:“44115e71.e01c9”,“name”:“Take only from SOLAR bundle”,“property”:“payload”,“propertyType”:“msg”,“rules”:[{“t”:“cont”,“v”:"<solar id=",“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:1,“x”:350,“y”:260,“wires”:[[“7d974fea.2648e”,“a8c0e311.c45dd”,“582ffb1b.984ac4”,“779072ad.f99a2c”,“11f0d153.c7431f”,“334174ab.10874c”]]},{“id”:“5de13385.20a87c”,“type”:“debug”,“z”:“44115e71.e01c9”,“name”:"",“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“false”,“x”:1350,“y”:740,“wires”:[]},{“id”:“7d974fea.2648e”,“type”:“string”,“z”:“44115e71.e01c9”,“name”:“solarPvId”,“methods”:[{“name”:“between”,“params”:[{“type”:“str”,“value”:""}]}],“prop”:“payload”,“propout”:“payload”,“object”:“msg”,“objectout”:“msg”,“x”:620,“y”:260,“wires”:[[“dec6a9e.a030858”,“fe848103.c53fb”]]},{“id”:“a8c0e311.c45dd”,“type”:“string”,“z”:“44115e71.e01c9”,“name”:“timestamp”,“methods”:[{“name”:“between”,“params”:[{“type”:“str”,“value”:""},{“type”:“str”,“value”:""}]}],“prop”:“payload”,“propout”:“payload”,“object”:“msg”,“objectout”:“msg”,“x”:630,“y”:340,“wires”:[[“24479ab1.ad5ee6”,“ef7c731e.c8649”]]},{“id”:“582ffb1b.984ac4”,“type”:“string”,“z”:“44115e71.e01c9”,“name”:“Currently Generating Units”,“methods”:[{“name”:“between”,“params”:[{“type”:“str”,“value”:""},{“type”:“str”,“value”:""}]},{“name”:“toFloat”,“params”:[{“type”:“num”,“value”:“1”}]}],“prop”:“payload”,“propout”:“payload”,“object”:“msg”,“objectout”:“msg”,“x”:680,“y”:420,“wires”:[[“e1c66e38.93061”,“b202ffe1.bf262”,“cf0c6650.c7c678”]]},{“id”:“2d01f7bc.b02da8”,“type”:“influxdb out”,“z”:“44115e71.e01c9”,“influxdb”:“242678f7.d4b1”,“name”:“OwlSolarPV”,“measurement”:“stations”,“precision”:"",“retentionPolicy”:"",“database”:"",“retentionPolicyV18Flux”:"",“org”:"",“bucket”:"",“x”:1350,“y”:780,“wires”:[]},{“id”:“e7e52d25.ae51”,“type”:“comment”,“z”:“44115e71.e01c9”,“name”:“This Flow takes Owl multicast output and divides it to be an influx database”,“info”:"",“x”:300,“y”:720,“wires”:[]},{“id”:“2b71e3c3.ff463c”,“type”:“comment”,“z”:“44115e71.e01c9”,“name”:“Owl appears to pump out electricty parameteres as well as solar so the witch only goes to the solar package”,“info”:"",“x”:850,“y”:160,“wires”:[]},{“id”:“1c8bae75.1a8cc2”,“type”:“ui_group”,“name”:“SolarPV”,“tab”:“2f11a8c0.5a5aa”,“order”:1,“disp”:true,“width”:“10”,“collapse”:true},{“id”:“242678f7.d4b1”,“type”:“influxdb”,“hostname”:“192.168.1.105”,“port”:“8086”,“protocol”:“http”,“database”:“OwlSolarPV”,“name”:“OwlSolarPV”,“usetls”:false,“tls”:"",“influxdbVersion”:“1.x”,“url”:“http://localhost:8086”,“rejectUnauthorized”:false},{“id”:“2f11a8c0.5a5aa”,“type”:“ui_tab”,“name”:“MK14 7PH”,“icon”:“dashboard”,“order”:9,“disabled”:false,“hidden”:false}]

Hack it about and let me know if you find it useful?

The fix so far seems to be just for electricity. After deploying I was still receiving errors in the log for HOTWATER_STATE and HEATING_STATE

In my local copy I have amended the following 2 lines to replicate what was done with the electricity sensors. Now I have no errors I have successfully upgraded to 2023.5.4 and Owl Integration now works.

SENSOR_HOTWATER_STATE: ['Hotwater State', None, 'mdi:information-outline', OWLCLASS_HOTWATER, None, None],

SENSOR_HEATING_STATE: ['Heating State', None, 'mdi:information-outline', OWLCLASS_HEATING, None, None],

I don’t have the relevant skills to do a code merge/deploy in GIT so perhaps this change can be considered for inclusion?

Thanks

OK, I reviewed all of the state classes after the latest contributions and I believe I have fixed all of them in Fixed a few more state classes following #27 and comments in discourse · custom-components/sensor.owlintuition@cd57116 · GitHub

Could you please retry?

Looks OK here.

I only have heating (2 zones but only one visible in HA) and Hot Water. Electricity was removed when we had solar fitted as I didn’t have the correct unit to allow eparate import/export measurements so couldn’t test that.

I lost the Hotwater status during the day and a restart of HA didn’t seem to help even though it was fine for a few hours

I notice that there’s a difference between the Heating State and Hotwater state lines with a missing None as the second parameter. When I made my local changes I included the None and it worked fine.

There was nothing untoward in the logs.

Before

SENSOR_HOTWATER_STATE: ['Hotwater State', '', 'mdi:information-outline', OWLCLASS_HOTWATER, None, None],

After

SENSOR_HOTWATER_STATE: ['Hotwater State', None, 'mdi:information-outline', OWLCLASS_HOTWATER, None, None],

I’m not sure what this does but I think it needs to be there?

Yep, that also looked like an inconsistency. I’ve fixed it, and a priori the code in Added support for multizone sensors by glpatcern · Pull Request #28 · custom-components/sensor.owlintuition · GitHub allows to support multizone with Hot Water. Would you be able to give it a try? Thanks!

I just updated HA and I’m now getting the error below with the integration. I downloaded the latest sensor.py file for the integration, but it didn’t fix it.

I have rolled back using a backup to version 2023.5.3 and it’s all working again, any ideas?

Logger: homeassistant.loader
Source: custom_components/owlintuition/sensor.py:164
Integration: owlintuition (documentation)
First occurred: 8:35:33 PM (1 occurrences)
Last logged: 8:35:33 PM

Unexpected exception importing platform custom_components.owlintuition.sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/owlintuition/sensor.py", line 164, in <module>
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'

Hi there, this seems exactly what was discussed in Remove coroutine decorator removed in Python 3.11 by shortbloke · Pull Request #31 · custom-components/sensor.owlintuition · GitHub

Did you fetch the latest code from today?

Check out my work here which uses node-red, It’ll show you how to do it:-

Or even here:-

1 Like

Hi Graham,

Great to see that your project is still active, but for the readers of this thread the sensor we discuss here is “native”, in the sense that it does not require any other (Arduino-based or other) system to convert OWL data to MQTT or the like.

There have been a few updates lately, and I will tag a new release soon as the recent issues ought to be all fixed (unless proven wrong of course!).

I started out using an ESP 8266 and “Arduino” code but then I discovered Node-Red which made that obsolete. Check out the Node-Red Flow I posted. It only deals with the Owl Central Heating thermostat and Mains Power sensor.

Ok, but where do you run Node-Red? You still need another “system” independent from HA as far as I understand, right?

Node-Red is an Add-On for Home Assistant. Go to Settings/Add-Ons and you will see it there. If you are not familiar with it then it might take a few days just to get your head round it. Things that you create are referred to as Flows. To test out my Flow you will need to download it (the flow.json) from github and then Import it into Node-Red (3 lines menu, top right/Import). You may also need to add some Node pallettes (3 lines menu/Manage Pallettes). Get back to me if you pursue this and get stuck.

I’m running HA 2023.7.3 and trying to use the owlintuition integration for the first time (so can’t confirm if it would work on older versions) - I’ve followed all instructions and have the necessary files under /custom_components/owlintuition and added the necessary to my configuration.yaml but keep getting ‘Platform error sensor.owlintuition - Integration ‘owlintuition’ not found’ when trying to reload my config.

Any ideas?

I’ve tested on HAOS 10.0 and Core 2023.4.6 and it’s working - would love to keep it working on the latest versions though

Hi Mark,
Could you please share your HA logs on the latest version? Maybe post them in a GitHub issue. Chances are that HA introduced a (yet another) breaking change and the sensor needs adaptations.