- Deno Version >= 2.1.4
# Install dependencies
deno install
# Simulate devices
deno task run simulate -r wss://canary-relay.dephy.dev -w chunmi_tsa1 -o playground -m cdb9247ec7ab3302fd12450ae7453ab9f833639f109833f06c5d909991d62a3c
# Bridge real data
deno task run bridge -r wss://canary-relay.dephy.dev -w qingping_air_monitor -o qingping_air_monitor -m cdb9247ec7ab3302fd12450ae7453ab9f833639f109833f06c5d909991d62a3cDevice type modulesare located in the src/device-types directory.
Check out src/device-type.ts for type definitions of device type modules:
processState: A function that processes the state from Home Assistant.truncateAttributes: A function that truncates the attributes for Nostr.allowedAttributes: An array of allowed state attributes.simulateHassState: A function that simulates the state from Home Assistant.
Check out src/device-types/chunmi_tsa1.ts for an example.
Make changes to createStateEvent function in src/nostr.ts to customize the Nostr event.