RFX reporting different units

Posted on
Sat Apr 07, 2018 7:38 am
jenkins007 offline
Posts: 113
Joined: Nov 08, 2006
Location: Seguin, TX

RFX reporting different units

I always use degrees in Fahrenheit. Since I updated to the latest version 2.1.9, I am now seeing 2 RFX Temperature sensors reported in F and 2 in Celsius. I changed the plugin to report in C, and the result is displayed below where 3 sensors report in C. The one in F is an additional wire connected to the master bedroom sensor (hence no voltage reading on it). When I configure RFX back to F, the Master bedroom reports back in F like in the first screen shot. I've been using these for many years with no errors.
Screen Shot 2018-04-07 at 8.11.42 AM.png
Screen Shot 2018-04-07 at 8.11.42 AM.png (80.16 KiB) Viewed 5026 times
Attachments
Screen Shot 2018-04-07 at 8.24.18 AM.png
Screen Shot 2018-04-07 at 8.24.18 AM.png (84.43 KiB) Viewed 5026 times

Thanks,
Matthew

Posted on
Sat Apr 07, 2018 10:03 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: RFX reporting different units

https://www.dropbox.com/s/3kev5jvqh18qeav/RFXCOM-v-2.1.9.zip?dl=1

same version number, should fix it..

I have to apologize. I am traveling and have only a small laptop with slow connection .
so not pluginstore posting ,, (sorry jay)

Karl

Posted on
Mon Apr 09, 2018 10:52 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: RFX reporting different units

I've added this fix into a new release (2.1.10).

Image

Posted on
Tue Apr 10, 2018 9:32 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: RFX reporting different units

Karl & Matthew,

Have either of you seen the issue reported here or know what might be causing it?

I mistakenly thought that one might be related to the issue on this thread, but apparently it is not.

Image

Posted on
Tue Apr 10, 2018 11:58 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: RFX reporting different units

Will check tomorrow
Karl


Sent from my iPhone using Tapatalk

Posted on
Wed Apr 11, 2018 4:51 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: RFX reporting different units

This one is for Matt...


RFXcom plugin 2.1.10 Temperature Sensor device types

Diagnosis:
for existing devices the status column gets updated properly, when creating a NEW RFXcom temperature sensor device the status column does not get updated.

Devices.xml has
Code: Select all
      <UiDisplayStateId>display</UiDisplayStateId>
properly defined. the corresponding State is defined as
Code: Select all
      <States>
         <State id="display">
            <ValueType>String</ValueType>
            <TriggerLabel>Display</TriggerLabel>
            <ControlPageLabel>Display</ControlPageLabel>
         </State>
....
.
The state" display" also gets properly updated, but not the status column.
Code: Select all
   RFXCOM Debug                    finalizeStatesChanges:TempInsideUpstairs :[{'decimalPlaces': 1, 'value': 74.66, 'key': u'temperature'}, {'value': 0, 'key': u'humidity'}, {'value': '', 'key': u'humidityStatus'}, {'value': 2, 'key': u'type'}, {'value': 100, 'key': u'batteryLevel'}, {'value': 6, 'key': u'signalStrength'}, {'decimalPlaces': 1, 'uiValue': u'74.7 \xb0F', 'value': 74.66, 'key': u'temperature'}, {'uiValue': u'74.7 \xb0F', 'value': u'74.7 \xb0F', 'key': u'display'}, {'value': '2018/04/11 17:14:29', 'key': u'lastUpdated'}]


I checked prefs file etc ... , but I simply can not find anything that is wrong. Especially when it works for defined devices, but not for NEWLY defined devcies - or for that matter if you change the device type to eg humidity sensor and back--

I am at the end of my toolset

Karl

Posted on
Wed Apr 11, 2018 10:34 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: RFX reporting different units

Thanks for looking into this Karl. I think I tracked down what is going on. The issue is this Devices.xml change which updated the device type for the Temperature device from custom to sensor. That change was made (not by me) since using the native Indigo sensor device type better describes the device type. That allows, for example, other plugins to include those devices when enumerating all sensor devices.

The problem is that Indigo's native device types (everything but custom) ignore the UiDisplayStateId setting. This is so that the UI remains consistent for those device types. In the case of a sensor device, it always shows the state sensorValue, which is automatically included for sensor devices (don't add it to the XML). That value is also mirrored at the device instance level as dev.sensorValue (just like dev.brightness for dimmers). The problem is a bit more complex because changing the Devices.xml for the device type does not automatically update existing device instances. In fact there is no way to morph an existing device from one type to another without deleting and re-creating it. This explains why older devices work differently (they are still custom type and not sensor type) but newer ones don't show anything in the status column. The reason the status column is blank is because the state sensorValue is never being updated and that is the state that is always shown in the status column for a sensor device.

I think the best solution here (but I haven't looked a the RFX .py code to know for sure) might be to mirror the what is getting stuffed into the "display" state into the "sensorValue" state. This should probably be done conditionally though, only if "sensorValue" state exists (if "sensorValue" in dev.states:) because for older device instance that are still of type custom, it won't.

Image

Posted on
Thu Apr 12, 2018 7:13 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: RFX reporting different units

that seems to work... (added in _finalizeStatesChanges),.. one issue the sensor value must be a number )..Temperature Sensors seems to be the only sensor dev type.

Karl


ps now I have to figure out how to add this to the GitHub site.. :oops:
Attachments
Screen Shot 2018-04-12 at 08.08.19.png
Screen Shot 2018-04-12 at 08.08.19.png (57.69 KiB) Viewed 4797 times

Posted on
Thu Apr 12, 2018 8:24 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: RFX reporting different units

i posted a fixed version to the gihub site (version 2.1.11)

Karl

Posted on
Thu Apr 12, 2018 12:11 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: RFX reporting different units

Hi Karl,

Looks like your Github Pull Request is into the wrong branch. Instead of being a request on the master/main branch it is in an old (and now stale) branch mbendiksen-blindst2t3. I don't think there is an easy way to move it over, so can you save off your changed files, pull down the latest version from the master branch, copy in your changes, and re-submit the pull request to the master branch?

Thanks again for looking into fixing this one!

Image

Posted on
Thu Apr 12, 2018 2:08 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: RFX reporting different units

trying ...

it looks as if create a new pull request is disabled
click on "New pull request" goes to :
Screen Shot 2018-04-12 at 15.05.54.png
Screen Shot 2018-04-12 at 15.05.54.png (58.1 KiB) Viewed 4748 times


can't add anything here.. I guess I am missing a basic step .. or I need to spend some time really going into GitHub ..

I am logged in with kw123



Karl

Posted on
Thu Apr 12, 2018 2:27 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: RFX reporting different units


Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Apr 12, 2018 4:35 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: RFX reporting different units

yes I did.. and I am stuck

0. downloadeddesktop , logged in, (kw123)

1. there is no fork button, used the menu, seems to work

2. after forking and replacing the 2 files I changed, I see the diff screens , all correct.

3. here I am stuck:::: "commit to Master" does not do anything .

any pointer what I did wrong would be appreciated.


Karl
Attachments
Screen Shot 2018-04-12 at 17.33.34.png
Screen Shot 2018-04-12 at 17.33.34.png (224.98 KiB) Viewed 4714 times

Posted on
Thu Apr 12, 2018 4:53 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: RFX reporting different units

... had to put something into the field "Summary" .. then I could "push up" ..

should I see the files on the GITHUB site?

thanks

Karl

Posted on
Thu Apr 12, 2018 5:31 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: RFX reporting different units

When you look at your forked repo on Github, you can see a problem: you apparently deleted the README.md file and checked in the deletion - shouldn't have done that since we want to keep the README. The fix for that is to go back to your Github Desktop, switch to the History tab on the left side under the repo name, find the checkin where you deleted the readme, right-click it and select Revert This Commit. Switch back to the Changes tab and at the bottom you'll see "Revert blah blah" and an Undo button - click that and now you'll see the README appear back in the change file list. Commit that and it should put the README back to your forked repo.

Once that's done, switch back to look at your forked repo on Github. Above the file list you'll see a button titled New pull request - click that. You can then proceed with Step 3 of the wiki article.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 3 guests