hlapp/wirelesstags-js

New tagType

Closed this issue · 8 comments

wirelesstag.net has a new tagType=42 for their new Outdoor Probes (Temperature Only). Unable to make connection to that tagType using current code.

APICallError: Internal Server Error
Calling https://www.mytaglist.com/ethClient.asmx/LoadCurrentSensorConfig with body {"id":25} failed with status 500
at checkAPIerror (/home/pi/.node-red/node_modules/wirelesstags/lib/platform.js:650:16)
at Request._callback (/home/pi/.node-red/node_modules/wirelesstags/lib/platform.js:583:21)
at Request.self.callback (/home/pi/.node-red/node_modules/wirelesstags/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/home/pi/.node-red/node_modules/wirelesstags/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/home/pi/.node-red/node_modules/wirelesstags/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:97...
hlapp commented

Thanks for reporting @gainestr! The problem seems to be that 42 isn't a new tagType but used to identify the current sensor (which I don't think you can buy yet, or perhaps not anymore).

I'll see what I can glean and/or reverse engineer from their demo client implementation.

hlapp commented

Finally able to get back on this. Observations after some poking around:

  1. The Web UI SDK download at the API docs is unchanged. Purportedly, this is what's online as the web UI, and if that works for your probe, the download is obviously not what's currently used as the web app. (Perhaps I should email them to update it.)
  2. The client.js has changed, and indeed seems to have code for the outdoor probes. Interestingly, the tagType == 42 test is now used for two (entirely unrelated) sensor types, one of which remains the current sensor. I assume that's cruft.
  3. The XXXXCurrentSensor* methods seem to all be gone from the API, suggesting the current sensor is discontinued if it ever was supported. (Perhaps something they had in development?).

I created a separate issue for retiring the *CurrentSensor* API methods, and will investigate the changes in the client.js code.

hlapp commented

@gainestr I notice that you have "temperature": 0 in the tag's data block. If I read the vendor-published client.js correctly, that must mean that you haven't (or hadn't) activated the external thermocouple probe yet. (Or alternatively, you were measuring the temperature of an ice bath.)

I.e., can you confirm that at least at the time the app showed the temperature as either 0.0°C, 32.0°F, or awaiting external probe activation?

hlapp commented

@gainestr thanks, this helps. For confirm I am understanding correctly what you're saying and what the vendor's client.js seems to be saying, the probe model you have is the "Basic" one, and isn't the one that would allow you to choose connecting either a DS18B20 or a k-type Thermocouple probe? (I'm inferring this from rev & 0x0F === 0x0D for your "rev": 125.

It seems in order to have the ability to switch between DS18B20 and thermocouple, rev & 0x0F === 0x0F would have to hold.

hlapp commented

See #44 for some challenges and considerations for how best to implement support for these probes. Comments and feedback are certainly welcome.

hlapp commented

Basic support for the Outdoor tags should be available now (caveat being that as noted in #45, I'll only be able to thoroughly test once I receive the Outdoor tags I've now ordered). Released as part of v0.7.0, which is available from npm as well.

I'm going to close this, even though there are some r/w operations (in particular switching to the DS18B20 for the Thermocouple and GE Protimeter models) that aren't covered yet. I'm leaving #44 open for now as a reminder, though I think this is outside of the scope of what you were looking for.