I’ve been a long time user of brefra’s plugwise stick code in HA next to your plugin for my PW Smile, so happy to hear you’ve joined forces!
I will start testing v0.11.0 today and report back later.
Just to be sure, to migrate we just need to remove Plugwise USB stick integration from HA integrations and HACS, then upgrade Plugwise beta custom component to v0.11.0 right?
PS will the entities keep the same names, so my Grafana configuration stays valid? (yes they do)
No, after installing the new integration my graphs still worked, so that was pretty obvious
I see no issues so far. Installation worked fine and almost all of my circles have been detected.
With the ‘old’ integration I had to restart HA every two days to get measurements back, it seemed the stick would just stop responding after a while. I had a cronjob active to just restart the entire vm. I’ve disabled this for now, to see if this issue is still present.
As the circles keep some historical data, could this data be used to fill any measurement gaps in HA and possibly Grafana? Not really sure if that could work as the integration would need to fill influxdb for Grafana with older data.
In a more generic answer: you might be able to export the ‘recorder’ data and feed that back into influxdb or the like (grafana is just a front-end for your data, it doesn’t neccesarily keep records). But if there isn’t any data from the devices (i.e. entities in HA) than there wouldn’t be anything to backfill I guess
Real glad you were able to try out the integration, I didn’t read back the old topic fully but maybe it’s something @brefra is aware of ‘where to look’. It might also be hw-related.
To clarify a bit, the plugwise-beta integration has a lot of improvements compared to the plugwise-stick integration v1.2.2.
New features
Support for battery powered plugwise Scan (motion detection) devices.
Service plugwise.configure_battery_savings to configure the battery related settings for devices running on batteries.
Service plugwise.configure_scan to configure the Scan motion sensor.
for battery powered devices. Note: this service is only available if battery powered devices are found.
Automatically register (join) new Plugwise devices or devices that have been reset to factory defaults.
Service to unregister devices from the USB-stick.
Fixes & optimizations
Proper model detection (one of the first results of our collaboration )
Power updates for “Stealth” devices
Speedup of initial discovery process at startup of Home Assistant when one (or more) devices are off-line
Discovery process is more reliable
Improved overall protocol handling which makes the integration more reliable
Proper logging levels: info level logs network communication
Reduced time to shutdown/restart.
Known issue / behaviour
After startup of Home Assistant (or restart of this Integration) battery powered devices will be unavailable until they are awake to send their state(change).
@hapklaar, hopefully this version fixed your “stop responding” issue. If not please report back here. It should definitely be fixed.
Extracting historical data (power consumption per hour) from the circles is possible to some extent. The problem is passing this data to HA. I am not aware of a possibility of some kind of rewriting the history like “This sensor did received this value 3 hours ago”.
There is no difference in code/functionality between models reported as “Circles” or “Stealth’s”. Previous versions reported the device type while it now reports the model based on the hardware version. Internally it’s still an “Circle” device type.
I don’t have any power production device to test, so I don’t realy know if there is a way to report the power production of today/yesterday. But I do know the today and yesterday power consumption is calculated by retreiving the relevant messurements records of the devices logs, which is collected every hour and stored into its own memory.
As far I’m aware there is only one kind of record stored in memory. Despite of the sensor name called Power consumption yesterday it might represent the the actual power production value in your case.
Does the power consumption sensor show a reasonable number?
Yes “Power usage” and “Power Usage 8 seconds” does show the actual production power right and so does “Power production current hour” but that one is continue so not a 0 value at every hour. The -3.905 is from more then one day.
All power consumption kWh values are not used at all for production(the 0.007 is from a consuming pc as a test)
EDIT:
I just did a test with a Circle without the setting in the Circle properties “delivers energy” in Plugwise Source and then I get positive (right) values on hour/today for production in the consumption entities. That might be a workaround for production at the moment.
Thanks, It looks like there might be some possibilities for this. No promises yet, I have to do some research first.
Just for the reference I registered a feature request for the backend lib.
Any recommended log setting? I tried " homeassistant.components.plugwise-beta: debug"
Did not really help me to find out what happened other than this:
2020-11-10 17:27:08 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140339944461168] Sending {‘id’: 33, ‘type’: ‘result’, ‘success’: True, ‘result’: {‘resources’: {‘component.plugwise.config.flow_title’: ‘Smile: {name}’, ‘component.plugwise.config.step.user.title’: ‘Plugwise type’, ‘component.plugwise.config.step.user.description’: ‘Product:’, ‘component.plugwise.config.step.user.data.flow_type’: ‘Connectie type’, ‘component.plugwise.config.step.user_gateway.title’: ‘Verbinden met de Plugwise Smile’, ‘component.plugwise.config.step.user_gateway.description’: ‘Aub invoeren:’, ‘component.plugwise.config.step.user_gateway.data.password’: ‘Smile ID’, ‘component.plugwise.config.step.user_gateway.data.username’: ‘Smile gebruikersnaam’, ‘component.plugwise.config.step.user_gateway.data.host’: ‘Smile IP-adres’, ‘component.plugwise.config.step.user_gateway.data.port’: ‘Smile poort nummer’, ‘component.plugwise.config.step.user_usb.title’: ‘Verbinden met een legacy USB-stick’, ‘component.plugwise.config.step.user_usb.description’: ‘Aub invoeren:’, ‘component.plugwise.config.step.user_usb.data.usb_path’: ‘USB pad’, ‘component.plugwise.config.step.manual_path.data.usb_path’: ‘USB pad’, ‘component.plugwise.config.error.already_configured’: ‘Dit apparaat is al geconfigureerd’, ‘component.plugwise.config.error.invalid_auth’: ‘Authenticatie mislukt, voer de 8 karakters van je Smile goed in’, ‘component.plugwise.config.error.cannot_connect’: ‘Verbinding mislukt, probeer het opnieuw’, ‘component.plugwise.config.error.network_down’: ‘Plugwise Zigbee netwerk is down’, ‘component.plugwise.config.error.network_timeout’: ‘Network communicatie timeout’, ‘component.plugwise.config.error.stick_init’: ‘Initaliseren van USB-stick mislukt’, ‘component.plugwise.config.error.unknown’: ‘Onbekende fout’, ‘component.plugwise.config.abort.already_configured’: ‘Dit apparaat is al geconfigureerd’}}}
I’m not using the USB stick but the network connection to the Stretch, and I’m sure I selected that option in HA.
Not needed to set debug, errors are always shown in Logs.
But you need to look directly after you’ve encountered the error.
But wait, you see a message from the config-flow, not a HA Core error-message.
Did you ignore the device in the past? Under “Integraties” press the 3 vertical dots on the top-right, select “Ignored” and look if there is a Plugwise Integration being set to ignore? If yes, un-ignore it.
If that is not the case, the best thing to do is to delete all the Plugwise integrations, reboot HA Core, and add the Integrations again. Via Discovery and/or manually.