LordMike / MBW.BlueRiiot2MQTT

Utility to map between Blue Riiots pool API, and Home Assistant MQTT
49 stars 2 forks source link

Value cannot be null (Parameter 'source') Error message #29

Closed RebelElephant closed 3 years ago

RebelElephant commented 3 years ago

Hi,

I have tried using the Docker image as well as the Add-In and I get the same error every-time:

[2020-12-06 08:38:33+00:00 ERR] [MBW.BlueRiiot2MQTT.Service.PoolUpdater.SingleBlueRiiotPoolUpdater] An error occurred while performing the update for pool 3146832f-cade-4116-951e-4933f17xxxxx
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.OrderedEnumerable`2..ctor(IEnumerable`1 source, Func`2 keySelector, IComparer`1 comparer, Boolean descending, OrderedEnumerable`1 parent)
   at System.Linq.Enumerable.OrderByDescending[TSource,TKey](IEnumerable`1 source, Func`2 keySelector)
   at MBW.BlueRiiot2MQTT.Features.BlueDevice.BlueDeviceFeature.UpdateInternal(SwimmingPool pool, SwimmingPoolDevice data) in /src/MBW.BlueRiiot2MQTT/Features/BlueDevice/BlueDeviceFeature.cs:line 103
   at MBW.BlueRiiot2MQTT.Features.FeatureUpdaterBaseTyped`1.UpdateInternal(SwimmingPool pool, Object obj) in /src/MBW.BlueRiiot2MQTT/Features/FeatureUpdaterBase.cs:line 55
   at MBW.BlueRiiot2MQTT.Features.FeatureUpdateManager.Process(SwimmingPool pool, Object obj) in /src/MBW.BlueRiiot2MQTT/Features/FeatureUpdateManager.cs:line 18
   at MBW.BlueRiiot2MQTT.Service.PoolUpdater.SingleBlueRiiotPoolUpdater.PerformUpdate(CancellationToken stoppingToken) in /src/MBW.BlueRiiot2MQTT/Service/PoolUpdater/SingleBlueRiiotPoolUpdater.cs:line 179
   at MBW.BlueRiiot2MQTT.Service.PoolUpdater.SingleBlueRiiotPoolUpdater.Run() in /src/MBW.BlueRiiot2MQTT/Service/PoolUpdater/SingleBlueRiiotPoolUpdater.cs:line 83

Appreciate any assistance you can provide here.

RE

LordMike commented 3 years ago

Oh. It's probably having an issue detecting the firmware version.. I figured that probably not work someday.

Is the blue device new / first time being used?

LordMike commented 3 years ago

I've pushed 0.9.2. Should resolve this issue.

LordMike commented 3 years ago

@RebelElephant did you get a chance to try out 0.9.2 ?

colesealeaf commented 3 years ago

Hi, I was getting this error too.

I restored my homeassitant, not knowing that there could have been an issue. Anyway, installed 0.9.2 and it connects OK. But I don't get any sensors coming in. Maybe its my installation :/

[2020-12-10 02:16:47+00:00 INF] [MBW.BlueRiiot2MQTT.Service.BlueRiiotMqttService] Discovered new pool, 'Stanny Pool' [2020-12-10 02:16:52+00:00 INF] [MBW.BlueRiiot2MQTT.Service.PoolUpdater.SingleBlueRiiotPoolUpdater] New data ready for pool 'Stanny Pool' at 12/10/2020 02:19:35 (interval 01:12:00). Waiting 00:02:42.8398104 [2020-12-10 02:16:52+00:00 INF] [MBW.HassMQTT.HassMqttManager] Pushed 20 discovery documents, 19 values and 20 attribute changes [2020-12-10 02:19:39+00:00 INF] [MBW.BlueRiiot2MQTT.Service.PoolUpdater.SingleBlueRiiotPoolUpdater] New data ready for pool 'Stanny Pool' at 12/10/2020 03:30:42 (interval 01:12:00). Waiting 01:11:02.3151702 [2020-12-10 02:19:39+00:00 INF] [MBW.HassMQTT.HassMqttManager] Pushed 0 discovery documents, 1 values and 2 attribute changes [2020-12-10 03:30:47+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.PoolUpdater.SingleBlueRiiotPoolUpdater] There were 1 consecutive updates without new data for 'Stanny Pool', setting next run to be 12/10/2020 03:31:47, waiting 00:01:00

RebelElephant commented 3 years ago

Hi, Finally got a chance to check it properly. Initially when I had a quick look, the Add On had auto updated and the status was showing as OK but there was no reading from any of the sensors. When I checked it again tonight, all showing OK and values are showing for the sensors.

Thanks for the quick fix.

Is it worth paying for the subscription to blueriiot premium?

LordMike commented 3 years ago

I'm only using the premium to get the sigfox updating link.. I don't know of any of the other features associated... Added to that, I think the premium device was at a reasonable price level.. :)

If we can figure out how to invoke an update using bluetooth (f.ex. the wifi extender box thingy), and you have a bluetooth device statically, then probably not - you'd be covered invoking that on a schedule.

For me, that's way too much time to invest. So the premium is definitely worth it.

RebelElephant commented 3 years ago

Hi LordMike,

I got myself a Raspberry Pi Zero W which can see the BlueConnect via Bluetooth LE. What info would you need to help develop a Bluetooth reading capability? (if it is possible - I am willing to assist).

RebelElephant

LordMike commented 3 years ago

Neat. I don't think I'll dive deep into it, due to time constraints. If anybody manages to do so though, it might be possible to implement whatever is needed within B2M.

One place to start is the reversed code from the Android app. It has a number of Bluetooth interactions, where one of them is probably whats needed to do a measurement.

As I understand it, once you've paired, Bluetooth exposes a number of services that you can communicate with. It's probably really simple once we're into it ... :)