Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GMMTS TICMeter] Exception while calling fromZigbee converter: Cannot mix BigInt and other types, use explicit conversions #8794

Open
tonito659 opened this issue Feb 10, 2025 · 0 comments

Comments

@tonito659
Copy link

Hello !

I have encountered the following error multiple times while using the TICMeter. :

[2025-02-10 21:08:46] error: z2m: Exception while calling fromZigbee converter: Cannot mix BigInt and other types, use explicit conversions}
[2025-02-10 21:08:46] debug: z2m: TypeError: Cannot mix BigInt and other types, use explicit conversions
at /app/node_modules/.pnpm/[email protected]/node_modules/src/devices/gmmts.ts:1833:51
at Array.forEach ()
at ticmeterConverter (/app/node_modules/.pnpm/[email protected]/node_modules/src/devices/gmmts.ts:1813:10)
at Object.convert (/app/node_modules/.pnpm/[email protected]/node_modules/src/devices/gmmts.ts:1862:20)
at Receive.onDeviceMessage (/app/lib/extension/receive.ts:170:51)
at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:204:23)
at EventEmitter.emit (node:events:536:35)
at EventBus.emitDeviceMessage (/app/lib/eventBus.ts:130:22)
at Controller. (/app/lib/zigbee.ts:125:27)

Digging a bit more shows that it could be this line that is wrong :

value = new Date(msg.data[key] * 1000).toLocaleString('fr-FR', {timeZone: 'Europe/Paris'});

Could it be that casting msg.data[key] as a Number could correct it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant