Plugin for Haiku Fan with SenseME

Posted on
Sun Oct 08, 2023 10:53 am
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Plugin for Haiku Fan with SenseME

vtmikel wrote:
webdeck wrote:
vtmikel wrote:
Thank you for sharing. When I start the plugin I get this error. Potentially of note, I have 3 fans (all old firmware), and this is the only fan I have with a light. I wondered if this is the reason why this fan is throwing an error, but not certain.
Code: Select all
   Starting plugin "SenseME Fan 0.8.0" (pid 10615)
   Started plugin "SenseME Fan 0.8.0"
   SenseME Fan Error               exception in device_start_comm(Autumn's Fan): 'ascii' codec can't decode byte 0xe2 in position 7: ordinal not in range(128)


I think the apostrophe in the fan's name is a smart apostrophe instead of a plain one, which is outside the bounds of the ASCII characters. Could you try removing the apostrophe?


Unfortunately not. I renamed it in Indigo, restarted the plugin, edited the device and saved, and restarted the plugin again. Each time I get the same:

Code: Select all
   Started plugin "SenseME Fan 0.8.0"
   SenseME Fan Error               exception in device_start_comm(Autumns Fan): 'ascii' codec can't decode byte 0xe2 in position 7: ordinal not in range(128)


Can you try renaming it in the Haiku app as well?

Posted on
Sun Oct 08, 2023 10:54 am
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Plugin for Haiku Fan with SenseME

webdeck wrote:
vtmikel wrote:
webdeck wrote:
vtmikel wrote:
Thank you for sharing. When I start the plugin I get this error. Potentially of note, I have 3 fans (all old firmware), and this is the only fan I have with a light. I wondered if this is the reason why this fan is throwing an error, but not certain.
Code: Select all
   Starting plugin "SenseME Fan 0.8.0" (pid 10615)
   Started plugin "SenseME Fan 0.8.0"
   SenseME Fan Error               exception in device_start_comm(Autumn's Fan): 'ascii' codec can't decode byte 0xe2 in position 7: ordinal not in range(128)


I think the apostrophe in the fan's name is a smart apostrophe instead of a plain one, which is outside the bounds of the ASCII characters. Could you try removing the apostrophe?


Unfortunately not. I renamed it in Indigo, restarted the plugin, edited the device and saved, and restarted the plugin again. Each time I get the same:

Code: Select all
   Started plugin "SenseME Fan 0.8.0"
   SenseME Fan Error               exception in device_start_comm(Autumns Fan): 'ascii' codec can't decode byte 0xe2 in position 7: ordinal not in range(128)


Can you try renaming it in the Haiku app as well?


I meant to mention that, it does not have a apostrophe in the Haiku app.

Posted on
Sun Oct 08, 2023 11:06 am
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Plugin for Haiku Fan with SenseME

vtmikel wrote:
webdeck wrote:
vtmikel wrote:
webdeck wrote:
vtmikel wrote:
Thank you for sharing. When I start the plugin I get this error. Potentially of note, I have 3 fans (all old firmware), and this is the only fan I have with a light. I wondered if this is the reason why this fan is throwing an error, but not certain.
Code: Select all
   Starting plugin "SenseME Fan 0.8.0" (pid 10615)
   Started plugin "SenseME Fan 0.8.0"
   SenseME Fan Error               exception in device_start_comm(Autumn's Fan): 'ascii' codec can't decode byte 0xe2 in position 7: ordinal not in range(128)


I think the apostrophe in the fan's name is a smart apostrophe instead of a plain one, which is outside the bounds of the ASCII characters. Could you try removing the apostrophe?


Unfortunately not. I renamed it in Indigo, restarted the plugin, edited the device and saved, and restarted the plugin again. Each time I get the same:

Code: Select all
   Started plugin "SenseME Fan 0.8.0"
   SenseME Fan Error               exception in device_start_comm(Autumns Fan): 'ascii' codec can't decode byte 0xe2 in position 7: ordinal not in range(128)


Can you try renaming it in the Haiku app as well?


I meant to mention that, it does not have a apostrophe in the Haiku app.


One more spot to check - select your fan device, click Edit Device Settings - does the "Fan Name (as defined in the SenseME app)" field have an apostrophe in it?

Posted on
Sun Oct 08, 2023 1:47 pm
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Plugin for Haiku Fan with SenseME

No, not there either. It matches but I never had a apostrophe in the Haiku app itself, just the Indigo device.

Posted on
Sun Oct 08, 2023 1:58 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Plugin for Haiku Fan with SenseME

You could try editing the plugin.py to remove all the references to encode(‘ascii’) and change to encode(). Same for decode(‘ascii’) to decode()

No idea if that will help or make things worse.

Posted on
Sat Oct 14, 2023 12:27 pm
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Plugin for Haiku Fan with SenseME

webdeck wrote:
You could try editing the plugin.py to remove all the references to encode(‘ascii’) and change to encode(). Same for decode(‘ascii’) to decode()

No idea if that will help or make things worse.


That solved it. Seems to be working now. Thanks!

Posted on
Sat Oct 14, 2023 12:39 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Plugin for Haiku Fan with SenseME

Awesome. I have published v0.8.1 that incorporates this change.

https://github.com/webdeck/SenseME-Indigo-Plugin/releases/tag/v0.8.1

Posted on
Fri Nov 10, 2023 8:48 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Plugin for Haiku Fan with SenseME

Finally got around to trying this - everything works great - Now I can update to the latest version of Indigo - thanks so much for doing this update!!!!!!

_______
Norm

Who is online

Users browsing this forum: No registered users and 21 guests