scottyphillips / pychonet

A simple to use library for interfacing with the ECHONETlite protocol
GNU General Public License v3.0
20 stars 17 forks source link

code not found: 0xd0 #1

Closed khcnz closed 3 years ago

khcnz commented 3 years ago

I'm getting a code not found error on the console 0xd0 is missing. I'm guessing it's this one? image

scottyphillips commented 3 years ago

0xD0 is missing from EPC.py under the home air conditioner class. For a history lesson I think I swiped those codes from a JavaScript implementation and just dumped it straight in as JSON. 😂

khcnz commented 3 years ago

The error prints to the console just when instantiating the object aircon = echonet.HomeAirConditioner("192.168.4.34")

From the spec i've got 0xD0 exists on image but not the Home Air Conditioner 0x30..?

I've mapped it but don't get any bytes back on this one. Hrrrrm.

scottyphillips commented 3 years ago

When the object is instantiated it will build a property map - the idea is that these don’t change so no need to continue to poll the API after. I think this appears to be a rogue attribute that according to the spec shouldn’t belong to the home air conditioner class?

khcnz commented 3 years ago

Seems to be I think perhaps the best fix here would be to just comment the print out? I'd wager other people might have the same issue with this or other opcodes with other devices

scottyphillips commented 3 years ago

Have you run discover and confirmed it’s indeed a home aircon?

khcnz commented 3 years ago

HA! I think you might be right on this one.. Discover hadn't worked for me in the past (returns nothing) and I had just assumed it was some oddity of my environment. I think you might be right that maybe it's returning a different class type. I'm not at the location with the heatpumps and don't think multicast works over VPN but will confirm this weekend.

scottyphillips commented 3 years ago

The Multicast function doesn’t seem to work on raspbian but works on MacOS. You can run discover against the IP address now and it should work as unicast

Scott

Get Outlook for iOShttps://aka.ms/o0ukef


From: khcnz @.> Sent: Wednesday, July 7, 2021 8:42:27 PM To: scottyphillips/pychonet @.> Cc: Scott Phillips @.>; Comment @.> Subject: Re: [scottyphillips/pychonet] code not found: 0xd0 (#1)

HA! I think you might be right on this one.. Discover hadn't worked for me in the past (returns nothing) and I had just assumed it was some oddity of my environment. I think you might be right that maybe it's returning a different class type. I'm not at the location with the heatpumps and don't think multicast works over VPN but will confirm this weekend.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/scottyphillips/pychonet/issues/1#issuecomment-875497754, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGHQNDCHUQ6D7C6RRMXYBBDTWQVRHANCNFSM474LICCQ.

gvswastaken commented 3 years ago

In a local branch I actually commented out the "code not found" message so the library is quiet to at least stdout.

khcnz commented 3 years ago

Oh and it seems my device is a home air conditioner so it must just be supporting a code that it shouldn't be.. [{'netaddr': '192.168.x.x', 'eojgc': 1, 'eojcc': 48, 'eojci': 1, 'group': 'Air conditioner-related device group', 'code': 'Home air conditioner'}]}

gvswastaken commented 3 years ago

I also have some devices using reserved codes with reserved attributes (specifically Panasonic Smart Cosmo and Power Station S+) that do not seem to be documented anywhere, unfortunately it does not seem uncommon.