Skip to content

Commit

Permalink
Fix state
Browse files Browse the repository at this point in the history
  • Loading branch information
adaxi committed Nov 2, 2023
1 parent 5d341a8 commit 30ab697
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 5 additions & 3 deletions src/eltako/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ export const plugin = {

radioSender = new RadioSender(radioSerialPort)
await radioSender.init()
radioParser = new RadioParser(radioSerialPort)
await radioParser.init()

// radioParser = new RadioParser(radioSerialPort)
// await radioParser.init()

usbSender = new UsbSender(usbSerialPort)
usbParser = new UsbParser(usbSerialPort)
Expand Down Expand Up @@ -127,7 +128,8 @@ export const plugin = {
server.log(['info'], `Published ${actuators.length} state into home assistant`)
} catch (err) {
console.log(err)
server.log(['error'], `Failed to connect to mqtt broker ${options.mqttUrl}`)
server.log(['error'], `Failed to startup. Exiting.`)
process.exit(1)
}
}
},
Expand Down
7 changes: 0 additions & 7 deletions src/eltako/radio-parser.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import Joi from 'joi'
import Enocean from 'enocean-js'

const { ESP3Parser, pretty } = Enocean

const internals = {}
internals.schemas = {}
internals.schemas.button = Joi.object({
index: Joi.number().required()
})

export class RadioParser {
constructor (port) {
this.port = port
Expand Down

0 comments on commit 30ab697

Please sign in to comment.