Jump to content

Polglot V2 CAO Wireless Tags Nodeserver


Jimbo.Automates

Recommended Posts

The initial post on this nodeserver before release as here: https://forum.universal-devices.com/topic/23639-coming-soon-cao-gadgets-wireless-tag-polyglot/

Please give it a try and let me know how it goes. I have only tested this with Fahrenheit, but it should work for Celsius as well.  This has most data I think is needed, but more can be added.  The WirelessTag's API is pretty good, so we could basically do everything that can be done in the Web interface inside the ISY, but I'm not sure if that is necessary or needed.  But if there are things you would like to configure from inside the ISY, then let me know and I can start adding them as I have time.   I have only tested with Tag type 12 and 32 but all others should work.  I've ordered some newer tags but they won't be here for a few days.

If you have a Tag that isn't properly showing data the look in the nodeserver log for 'Got Tag' and post or DM me that info, along with the link a couple after that showing LoadTempSensorConfig information.

If you are going to buy a Tag Manager or any Tags, please use this link:  https://goo.gl/rXAGk9   

See Release Notes and UpgradingSee the README which includes the Installation Instructions

Link to comment
Share on other sites

Just installed this nodeserver, and it looks like all 10 of my tags are populating with data, for which there's plenty (screenshot). 

One possible fly in the ointment, I notice that for conditions in programs (the If stanza), neither the tags nor their properties are available.  Is that as designed?

Thanks.

Screen Shot 2018-02-27 at 2.47.06 PM.png

Link to comment
Share on other sites

4 minutes ago, Jimbo said:

That's awesome that it all worked.   I guess I was so concentrated on just getting data into the ISY properly that I never double checked if it could actually be used in programs, it used to work, but now it doesn't.  I'll take a look.

 

 

I upgraded my ISY to 5.0.12 last night, but I didn't see anything in the release notes regarding node servers, so that might not be relevant.  If you can make this data available to programs, then I'm off (again!) to the races...

Thanks!

Link to comment
Share on other sites

Caught an error setting the "Debug" mode in the WirelessTagController node.

2018-02-27 14:52:21,110 INFO     wtController:cmd_set_debug_mode: 0
2018-02-27 14:52:21,111 INFO     Updating Driver wtcontroller - GV5: 0
2018-02-27 14:52:21,116 ERROR    Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 603, in _parseInput
    self.nodes[input[key]['address']].runCmd(input[key])
  File "/home/pi/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 510, in runCmd
    fun(self, command)
  File "/home/pi/.polyglot/nodeservers/WirelessTag/wt_nodes/wtController.py", line 406, in cmd_set_debug_mode
    self.set_debug_mode(val)
  File "/home/pi/.polyglot/nodeservers/WirelessTag/wt_nodes/wtController.py", line 349, in set_debug_mode
    self.set_all_logs(logging.DEBUG)
AttributeError: 'wtController' object has no attribute 'set_all_logs'

 

Link to comment
Share on other sites

1 hour ago, Bumbershoot said:

Just installed this nodeserver, and it looks like all 10 of my tags are populating with data, for which there's plenty (screenshot). 

One possible fly in the ointment, I notice that for conditions in programs (the If stanza), neither the tags nor their properties are available.  Is that as designed?

Easy fix :)  0.0.5 released.   See Upgrading and make sure to say "Yes" to "Update profile to ISY", and close the admin console if you have it open.

 

Link to comment
Share on other sites

I'm stuck at step 4 of the installation, never see any message to approve. Everything else seemed to install, it shows in the Node Server menu in Admin, but no nodes. Looks like the OAuth failed. I can send a log if you need.

Chuck

Link to comment
Share on other sites

7 minutes ago, Dr. Q said:

I'm stuck at step 4 of the installation, never see any message to approve. Everything else seemed to install, it shows in the Node Server menu in Admin, but no nodes. Looks like the OAuth failed. I can send a log if you need.

In the Polyglot web page you should see it? On the main page it should show "New Message"

NewMessage.png.73255c811326a27a58fa2a51c319fa7c.png

And when you click details you should see the "Authorize" link?

Authorize.png.61b47064eb5c4ca726b8714bd67e03a2.png

If you don't see it, is Polyglot Version 2.1.0? does Current Status say "Connected"?  If Disconnected, then click Log and see if there are errors?

 

Link to comment
Share on other sites

The New Message button never shows up and Current Status shows Disconnected. I'm running 5.0.11C on ISY and Polyglot 2.1.0. Plenty of errors:

 

 

2018-02-27 21:28:20,355 INFO     Polyglot v2 Interface Starting...
2018-02-27 21:28:20,356 INFO     Received Config from STDIN.
2018-02-27 21:28:20,583 ERROR    Traceback (most recent call last):
2018-02-27 21:28:20,584 ERROR    File "./wirelesstags-poly.py", line 8, in <module>
2018-02-27 21:28:20,584 ERROR    from wt_nodes import wtController
2018-02-27 21:28:20,585 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wt_nodes/__init__.py", line 8, in <module>
2018-02-27 21:28:20,586 ERROR    from .wtController import wtController
2018-02-27 21:28:20,586 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wt_nodes/wtController.py", line 8, in <module>
2018-02-27 21:28:20,587 ERROR    from wtServer import wtServer
2018-02-27 21:28:20,588 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wtServer.py", line 10, in <module>
2018-02-27 21:28:20,588 ERROR    import socket, threading, sys, requests, json
2018-02-27 21:28:20,589 ERROR    ImportError
2018-02-27 21:28:20,589 ERROR    :
2018-02-27 21:28:20,589 ERROR    No module named 'requests'

 

Link to comment
Share on other sites

I’m stuck at step 2...

 

 

2018-2-27 20:31:22 - info: NSChild cloneRepo: Successfully cloned WirelessTag into NodeServer directory.

2018-2-27 20:31:25 - error: NSChild: Install failed - Non-zero exit code: 1

2018-2-27 20:31:25 - error: NSChild: WirelessTag cloneRepo: Error: runInstallProcess: undefined

2018-2-27 20:31:25 - error: Error: runInstallProcess: undefined

at runInstallProcess (/snapshot/udi-polyglotv2/lib/modules/children.js:42:11)

at

at process._tickCallback (internal/process/next_tick.js:188:7)

2018-2-27 20:31:25 - error: NSResponse: Success: false - cloneRepo: Error: runInstallProcess: undefined

2018-2-27 20:32:04 - error: NSChild: WirelessTag cloneRepo: Non-zero exit code: 128

2018-2-27 20:32:04 - error: NSResponse: Success: false - cloneRepo: Non-zero exit code: 128

 

 

Should say, I’m using Polyglot x64 on Ubuntu - NOT Rpi (armv7j - just in case it makes a difference...

Link to comment
Share on other sites

12 minutes ago, Dr. Q said:

The New Message button never shows up and Current Status shows Disconnected. I'm running 5.0.11C on ISY and Polyglot 2.1.0. Plenty of errors:

 

 


2018-02-27 21:28:20,355 INFO     Polyglot v2 Interface Starting...
2018-02-27 21:28:20,356 INFO     Received Config from STDIN.
2018-02-27 21:28:20,583 ERROR    Traceback (most recent call last):
2018-02-27 21:28:20,584 ERROR    File "./wirelesstags-poly.py", line 8, in <module>
2018-02-27 21:28:20,584 ERROR    from wt_nodes import wtController
2018-02-27 21:28:20,585 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wt_nodes/__init__.py", line 8, in <module>
2018-02-27 21:28:20,586 ERROR    from .wtController import wtController
2018-02-27 21:28:20,586 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wt_nodes/wtController.py", line 8, in <module>
2018-02-27 21:28:20,587 ERROR    from wtServer import wtServer
2018-02-27 21:28:20,588 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wtServer.py", line 10, in <module>
2018-02-27 21:28:20,588 ERROR    import socket, threading, sys, requests, json
2018-02-27 21:28:20,589 ERROR    ImportError
2018-02-27 21:28:20,589 ERROR    :
2018-02-27 21:28:20,589 ERROR    No module named 'requests'

 

Pushed 0.0.6 for this issue.  Hopefully requests is the only module I missed.  Upgrade and restart the nodeserver.

Link to comment
Share on other sites

2 hours ago, Jimbo said:

0.0.6 should hopefully fix this issue as well.  It was returning a bad status code after install completed.

Thanks!

Got past step 2 - now stuck on step 6. In the Polyglot web interface I see the two tag managers I have - but I don't see them in the ISY tree at all (only the 'WirelessTagsController'). 

I restarted the poly, and it wouldn't start again. This is the error:

2018-02-27 22:52:25,900 ERROR    Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 2650, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 1481, in loop_forever
    rc = self.loop(timeout, max_packets)
  File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 1003, in loop
    rc = self.loop_read(max_packets)
  File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 1284, in loop_read
    rc = self._packet_read()
  File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 1849, in _packet_read
    rc = self._packet_handle()
  File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 2305, in _packet_handle
    return self._handle_publish()
  File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 2500, in _handle_publish
    self._handle_on_message(message)
  File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 2647, in _handle_on_message
    self.on_message(self, self._userdata, message)
  File "/root/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 221, in _message
    self.inConfig(parsed_msg[key])
  File "/root/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 431, in inConfig
    watcher(config)
  File "/root/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 588, in _gotConfig
    self.start()
  File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wtController.py", line 101, in start
    self.add_existing_tag_managers()
  File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wtController.py", line 164, in add_existing_tag_managers
    self.addNode(wTagManager(self, address, node['name'], address.upper(), node_data=node))
  File "/root/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 663, in addNode
    self.nodes[node.address].start()
  File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wTagManager.py", line 75, in start
    self.add_existing_tags()
  File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wTagManager.py", line 173, in add_existing_tags
    self.add_tag(address=node['address'], name=node['name'], node_data=node)
  File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wTagManager.py", line 177, in add_tag
    return self.controller.addNode(wTag(self.controller, self.address, address, name=name, tag_type=tag_type, uom=uom, tdata=tdata, node_data=node_data))
  File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wTag.py", line 77, in __init__
    tag_id = int(tag_id)
UnboundLocalError: local variable 'tag_id' referenced before assignment

0.0.6 now..

Link to comment
Share on other sites

4 hours ago, Jimbo said:

Easy fix :)  0.0.5 released.   See Upgrading and make sure to say "Yes" to "Update profile to ISY", and close the admin console if you have it open.

 

By the way, I now have tag properties available as program conditions!  I think I'm good to go.

EDIT: FYI, for the two tag types that I currently possess (13-bit Temperature/Humidity [type 13] and Water/Moisture [type 32]), the screenshots show the tag conditions that are available to ISY programs.

Screen Shot 2018-02-27 at 9.29.27 PM.png

Screen Shot 2018-02-27 at 9.29.06 PM.png

Link to comment
Share on other sites

40 minutes ago, MWareman said:
Thanks!

Got past step 2 - now stuck on step 6. In the Polyglot web interface I see the two tag managers I have - but I don't see them in the ISY tree at all (only the 'WirelessTagsController'). 

I restarted the poly, and it wouldn't start again. This is the error:


2018-02-27 22:52:25,900 ERROR    Exception in thread Thread-1:Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner   self.run() File "/usr/lib/python3.5/threading.py", line 862, in run   self._target(*self._args, **self._kwargs) File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 2650, in _thread_main   self.loop_forever(retry_first_connection=True) File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 1481, in loop_forever   rc = self.loop(timeout, max_packets) File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 1003, in loop   rc = self.loop_read(max_packets) File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 1284, in loop_read   rc = self._packet_read() File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 1849, in _packet_read   rc = self._packet_handle() File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 2305, in _packet_handle   return self._handle_publish() File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 2500, in _handle_publish   self._handle_on_message(message) File "/root/.local/lib/python3.5/site-packages/paho/mqtt/client.py", line 2647, in _handle_on_message   self.on_message(self, self._userdata, message) File "/root/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 221, in _message   self.inConfig(parsed_msg[key]) File "/root/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 431, in inConfig   watcher(config) File "/root/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 588, in _gotConfig   self.start() File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wtController.py", line 101, in start   self.add_existing_tag_managers() File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wtController.py", line 164, in add_existing_tag_managers   self.addNode(wTagManager(self, address, node['name'], address.upper(), node_data=node)) File "/root/.local/lib/python3.5/site-packages/polyinterface/polyinterface.py", line 663, in addNode   self.nodes[node.address].start() File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wTagManager.py", line 75, in start   self.add_existing_tags() File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wTagManager.py", line 173, in add_existing_tags   self.add_tag(address=node['address'], name=node['name'], node_data=node) File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wTagManager.py", line 177, in add_tag   return self.controller.addNode(wTag(self.controller, self.address, address, name=name, tag_type=tag_type, uom=uom, tdata=tdata, node_data=node_data)) File "/root/.polyglot/nodeservers/WirelessTag/wt_nodes/wTag.py", line 77, in __init__   tag_id = int(tag_id)UnboundLocalError: local variable 'tag_id' referenced before assignment
 

0.0.6 now..

I need to see some of the lines before that traceback, should be a line showing: add_existing_tags: node=someaddress = bunch of data.

But, I'll add a check so that error can't happen in the future.   It might be best to delete all nodes except the Controller thru the Polyglot web Node's page, then restart the nodeserver and do the discover again.  It can take a minute or so for the nodes to show up in the ISY.

Edit: I pushed an update so that error won't happen, but still need more info to figure out what caused it.  You can PM me the entire log if possible.

Edit2; or it's possible the node adresses aren't accepted by the ISY so also look in the main Polyglot log for any error lines.

 

 

 

Link to comment
Share on other sites

51 minutes ago, Bumbershoot said:

By the way, I now have tag properties available as program conditions!  I think I'm good to go.

EDIT: FYI, for the two tag types that I currently possess (13-bit Temperature/Humidity [type 13] and Water/Moisture [type 32]), the screenshots show the tag conditions that are available to ISY programs.

Screen Shot 2018-02-27 at 9.29.27 PM.png

Screen Shot 2018-02-27 at 9.29.06 PM.png

That looks good to me :)

 

Link to comment
Share on other sites

6 hours ago, Jimbo said:

I need to see some of the lines before that traceback, should be a line showing: add_existing_tags: node=someaddress = bunch of data.

But, I'll add a check so that error can't happen in the future.   It might be best to delete all nodes except the Controller thru the Polyglot web Node's page, then restart the nodeserver and do the discover again.  It can take a minute or so for the nodes to show up in the ISY.

Edit: I pushed an update so that error won't happen, but still need more info to figure out what caused it.  You can PM me the entire log if possible.

Edit2; or it's possible the node adresses aren't accepted by the ISY so also look in the main Polyglot log for any error lines.

 

 

 

Apologies - I didn't get to the log.... :(

I removed the two nodes (except the controller) thru the Polyglot interface - then updated to 0.0.7. On restarting I then did a discover - and both my tag manager showed up.  THANK YOU!

All good now - after enabling monitoring and discovering each tag manager I now have my tags...  :)  Awesome job!

Link to comment
Share on other sites

Apologies - I didn't get to the log....

I removed the two nodes (except the controller) thru the Polyglot interface - then updated to 0.0.7. On restarting I then did a discover - and both my tag manager showed up.  THANK YOU!

All good now - after enabling monitoring and discovering each tag manager I now have my tags...    Awesome job!

Nice, glad it's working! I wouldn't be surprised if there are some issues since you have multiple tag managers, but I did try to account for it.

 

The debug.log should still exist in the nodeserver directory. I'm curious if that shows what the initial problem was, if you can PM that to me I would appreciate it.

 

Also, everyone please let me know if there is more data you need to see or control that would be good to have.

 

 

Sent from my Pixel 2 XL using Tapatalk

 

 

 

Link to comment
Share on other sites

23 hours ago, Jimbo said:

Also, everyone please let me know if there is more data you need to see or control that would be good to have.

I don't see anything in the URL Calling list that you're not already using, so there's nothing there. 

I have two thoughts, both related. Caveat: I don't know how oauth2 configuration works, or if it gives you access to data that's not available to the URL Calling method.

  • I could see some value in having the "Updated" value made available (any possible time/date format is fine - just something I could torture in ISY programs).
  • Having an ability to force an update if the "Updated" value is stale (it doesn't appear that "Query" does this).

The idea is that I have a few tags that I'd set the update value for as long as possible to conserve battery life, but when I decide it's time to check the values, it would be good to have them fresh.  Applications for this would be: measuring attic temperatures for ventilation fan control (tags are hard to get to for battery replacement), soil moisture sensors (most of the time they're idle and the batteries are not replaceable), etc.

This nodeserver is a great addition to Polyglot.  I'm beginning to feel that Polyglot and Nodelink will be THE killer applications for the ISY, extending it far beyond Insteon/Z-Wave.  Many thanks to yourself and the other devs!

Screen Shot 2018-03-01 at 6.08.08 AM.png

Link to comment
Share on other sites

2 hours ago, Bumbershoot said:

I don't see anything in the URL Calling list that you're not already using, so there's nothing there. 

I have two thoughts, both related. Caveat: I don't know how oauth2 configuration works, or if it gives you access to data that's not available to the URL Calling method.

  • I could see some value in having the "Updated" value made available (any possible time/date format is fine - just something I could torture in ISY programs).
  • Having an ability to force an update if the "Updated" value is stale (it doesn't appear that "Query" does this).

The idea is that I have a few tags that I'd set the update value for as long as possible to conserve battery life, but when I decide it's time to check the values, it would be good to have them fresh.  Applications for this would be: measuring attic temperatures for ventilation fan control (tags are hard to get to for battery replacement), soil moisture sensors (most of the time they're idle and the batteries are not replaceable), etc.

This nodeserver is a great addition to Polyglot.  I'm beginning to feel that Polyglot and Nodelink will be THE killer applications for the ISY, extending it far beyond Insteon/Z-Wave.  Many thanks to yourself and the other devs!

 

The interface has everything available in the Wireless Tags API, the same API that used by their web interface http://wirelesstag.net/ethClient.asmx

For the first one, I have that on my TO DO List.  I thought the "Query" directly on a wireless tag should force an update of the latest data, it uses http://wirelesstag.net/ethClient.asmx?op=RequestImmediatePostback but if you are finding that doesn't force an update then I will need to look into it.  I should have some free time tonight.

Thanks for Kudo's much appreciated. I too feel that nodeservers, and especially the new Polyglot which @einstein.42 has spent a huge amount of time developing and the developer community we have all been fostering is the killer app for the ISY.

 

Link to comment
Share on other sites

5 hours ago, Jimbo said:

The interface has everything available in the Wireless Tags API, the same API that used by their web interface http://wirelesstag.net/ethClient.asmx

For the first one, I have that on my TO DO List.  I thought the "Query" directly on a wireless tag should force an update of the latest data, it uses http://wirelesstag.net/ethClient.asmx?op=RequestImmediatePostback but if you are finding that doesn't force an update then I will need to look into it.  I should have some free time tonight.

Thanks for Kudo's much appreciated. I too feel that nodeservers, and especially the new Polyglot which @einstein.42 has spent a huge amount of time developing and the developer community we have all been fostering is the killer app for the ISY.

 

I'm now seeing that the "Updated" value on the web interface is indeed updating after I query the tag through the node server.  It doesn't update immediately (looks like it can take up to 15 seconds for the "Updated" value to update on their website).  I probably just didn't show enough patience when I originally tested it, so you're correct, it does work.

In a quick scan of the API, I haven't seen much that I'll likely need.  Maybe a "PingAllTags" or a "RebootTagManager" on the controller node, though I don't think I've ever found a need to reboot the Tag Manager.  "PingAllTags" might be useful programatically in some instances (and since it's in the API, someone must find it useful).  I'll give it more thought as I start writing new programs against this data. 

Again, great work!

Link to comment
Share on other sites

I'm getting this error periodically in the logs, but it's nothing fatal, apparently:

2018-03-01 14:13:27,755 DEBUG    get_handler: command=/update
2018-03-01 14:13:27,756 DEBUG    wtController:get_handler: processing command=/update params={'tagid': '8', 'tagname': 'MasterBath', 'lux': '0', 'ts': '2018-03-01T14:13:26 00:00', 'temp': '21.5546722412109', 'hum': '53.0057373046875'}
2018-03-01 14:13:27,757 ERROR    wTag13F:7e5612e82e1644:MasterBath:get_handler: Unknown command '/update'
2018-03-01 14:13:27,758 INFO     Updating Driver 7e5612e82e1644 - CLITEMP: 70.79
2018-03-01 14:13:27,761 DEBUG    ----------------------------------------
2018-03-01 14:13:27,762 DEBUG    Exception happened during processing of request from
2018-03-01 14:13:27,763 DEBUG    ('192.168.1.46', 2482)
2018-03-01 14:13:27,766 ERROR    Traceback (most recent call last):
2018-03-01 14:13:27,768 ERROR    File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
2018-03-01 14:13:27,769 ERROR    File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
2018-03-01 14:13:27,770 ERROR    File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
2018-03-01 14:13:27,771 ERROR    File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
2018-03-01 14:13:27,772 ERROR    File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
2018-03-01 14:13:27,773 ERROR    File "/usr/lib/python3.5/http/server.py", line 410, in handle_one_request
    method()
2018-03-01 14:13:27,775 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wtServer.py", line 44, in do_GET
    hrt = self.parent.get_handler(parsed_path.path,self.query)
2018-03-01 14:13:27,776 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wtServer.py", line 94, in get_handler
    return self.parent.get_handler(path,query)
2018-03-01 14:13:27,777 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wtServer.py", line 155, in get_handler
    ret = self.ghandler(command,params)
2018-03-01 14:13:27,778 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wt_nodes/wtController.py", line 225, in get_handler
    return node.get_handler(command,params)
2018-03-01 14:13:27,779 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wt_nodes/wTag.py", line 283, in get_handler
    self.set_hum(params['hum'])
2018-03-01 14:13:27,780 ERROR    File "/home/pi/.polyglot/nodeservers/WirelessTag/wt_nodes/wTag.py", line 356, in set_hum
    value = int(value)
2018-03-01 14:13:27,781 ERROR    ValueError: invalid literal for int() with base 10: '53.0057373046875'
2018-03-01 14:13:27,782 DEBUG    ----------------------------------------
2018-3-1 14:13:27 - info: WirelessTag(6): Processing command: status
2018-3-1 14:13:28 - info: WirelessTag(6): 7e5612e82e1644 CLITEMP set sucessfully to 70.79

 

Link to comment
Share on other sites

8 hours ago, Bumbershoot said:

I'm now seeing that the "Updated" value on the web interface is indeed updating after I query the tag through the node server.  It doesn't update immediately (looks like it can take up to 15 seconds for the "Updated" value to update on their website).  I probably just didn't show enough patience when I originally tested it, so you're correct, it does work.

In a quick scan of the API, I haven't seen much that I'll likely need.  Maybe a "PingAllTags" or a "RebootTagManager" on the controller node, though I don't think I've ever found a need to reboot the Tag Manager.  "PingAllTags" might be useful programatically in some instances (and since it's in the API, someone must find it useful).  I'll give it more thought as I start writing new programs against this data. 

Again, great work!

Thanks!  Yes, it can take a few for the Tag to send back the data.

Version 0.0.8 released which adds the Last Update time, and should fix issue in the traceback you posted.

I was thinking to add PingAllTags to run when a "Query" is run on a Tag Manager, but didn't have time to test it tonight.  The Reboot is also a good idea.  Added to the list Github WirelessTag Issues  Feel free to add any other issues.  

Release Notes

Upgrading

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...