Corrected switch behavior. Before MiniCameras were on/off with Motion, but that cannot be controlled from them. They CAN Arm/Disarm though and that is what their on/off command did, so I made it so the switch properly triggers off that now.
Altered way Armed System(s) were being populated during arming/disarming
The cameras are armed. Looking at the state variables on the camera page I see "Armed = true" but also see some mismatched/duplicated string variables too
Arm String : Disarmed
Armed : true
...
Motion Detection Enabled : true
Name : front door
Network ID : 39640
Type : xt2
Updated : 2020-11-18T17:14:57+00:00
battery : 75
switch : on
temperature : 59
Arm String : Armed
Arm String : Disarmed
Arm String : Armed
Arm String : Disarmed
Arm String : Armed
Fix for the Disarm System command. Basically a copy/paste error left it so that Cameras and MiniCameras were always calling the ArmSystem on the parent NOT the DisarmSystem like they should have been.
It is saved in iso-8859-1 because I have had problems with that before on my various weather related API drivers.
I am not seeing that happening this time though. I just checked the driver again in my browser and then loaded it on a Hubitat that does not have it and I still see the normal degree symbol (°).
Yeah, I had that problem over and over again until I switched the format on my webserver to iso-8859-1. I still have to open the file, reopen it with the correct iso, then paste in the updated one from my Hubitat... Very annoying. But if I do not, the degree symbol always turns into something odd. I try to remember to check for it every time just to be sure also but sometimes I forget which is what I thought might have happened this time. So thanks for checking about it just to make sure!
The cameras in general report in Fahrenheit but the driver is SUPPOSED to convert it to whatever temperature scale your Hubitat is set as (on the Settings - Locations & Modes - Temp Scale). If it is not doing so... that would be a problem and an annoying one because I have reused this code in a BUNCH of drivers without issue prior (and even using it to convert from C to my native F when testing the UK's Met service for example). Let me know if the Hubitat is correct and there is still and issue with it. I want to make sure something like this works.
The place the driver handles it is on line 2110 (where it takes the returned temperature and sends it through the ConvertTemperature function at line 2850).
I've had the same problem (shows F value not converted to C) since I started using this. At one point I hard-coded the conversion but stopped doing it after a few updates. My other temperature sensors are all fine.
If I do a refresh on the parent device, my camera report the correct temp but in F.
If I do a get camera info on the child device the correct temp in C appears for a second then change to a odd number which is neither correct in C nor in F.
Like @Evilborg the code is showing � instead of ° in the driver code. I don't know what to do with that.
Edit: I change the � for "°" and the symbol is showing fine but it did nothing for the value tho.
Ok dokey then. Obviously a problem here. I will have to take a look tomorrow and see if I can figure out why. What is really odd is that all the methods that provide temperature all do it through the process devices, that same line 2110. So for it to be providing different temperatures...
One quick question ymerj. For the odd number... could you send me the number the parent showed, then the number the child showed? I wonder if one is being passed from the API as C, I think it is F, and try to convert it to C making it worse...
You are all using C and it is set that way on your hub... I think I need to convert my hub for a bit while I am doing these tests tomorrow and also see what the API reports if I switch what the Blink app says my temperature scale... Lots to do. But tomorrow. It has been a long day already.
Thanks for pointing out the problem folks! I appreciate knowing about them so I can fix them.
Temperature conversion should be fixed now. If you were using F you would never have noticed. But users of C would have seen intermittent results where the value should be correct if they used CameraInfo but became incorrect as soon as a GetHomescreen was run. This is because temperature data can come back in not 1, not 2, but (at least) 3 different places. I handled 2 but the third that was coming in (as part of Signals data) was slipping through and not being converted. I tried it a bunch of times on mine with my Hubitat set for C and it seems to work now. The conversion numbers all proved correct (I have a past with some temperature conversion, but rather than "trust myself" I ran every sample through a conversion calculator). Plus the API only appears to provide F. Even switching the scale in the app did not alter what was returned in my tests.
Different Topic(s):
Trying a different upload format for the file today. Let me know if the degree symbol still turns into something weird. That is NOT something I can change about the driver unless I just remove it entirely. It is purely how the text encoding goes onto the webserver as opposed to what my browser thinks it is when I copy it from the Hubitat driver code window.
I'm seeing the same. When you hit GetCameraInfo you can see the Temperature change in the Current States and it goes up and then back down again to what it should be within a second. It is showing C now though
Minus six "sounds" cold until I see the degrees C. Then I think of when I was testing and it was a nice warm 39 (F) but that showed as only 3.88 (C). Once you folks hit -18 (C) then I start to think of it as a bit cold out.
As for the odd temperatures... I found the "troublemaker". It was the "last_connect" data that comes back in a CameraInfo. It includes past data that was overriding the existing data (and getting overwritten) causing the bump. It is now fixed (I am now ignoring that data, no known value to it anyways).
Updated Version(s):
BlinkAPI.groovy = 0.2.5
Change(s):
Now ignoring the "last_connect" data from CameraInfo responses instead of tossing it into the ProcessDevices. The data was older and was causing overwrite issues (it would overwrite current data and be overwritten as well) for extra events with no value.
Maybe just one more remark on the Celsius temperature: the decimals are always the same, ie x.11, x.22, x.33, x.44 etc. Probably how the camera's report them. Can it be rounded off to maybe one decimal?