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

Issue running wink-mqtt #13

Open
asapkota opened this issue Oct 16, 2016 · 16 comments
Open

Issue running wink-mqtt #13

asapkota opened this issue Oct 16, 2016 · 16 comments

Comments

@asapkota
Copy link

Hello

I have been trying to get this to work for weeks without success. I have a rooted Wink Hub. I have followed the instructions and mqtt service is running but I am not seeing any mqtt messages, The log only has the following:

DB changed from /var/lib/database/apron.db to /tmp/database/apron-2.db
Aborted

Any help is greatly appreciated. Thanks

@danielolson13
Copy link
Owner

What's your aprontest -l say?

You have a Mqtt broker and the up is set correctly?

On Sun, Oct 16, 2016 at 5:50 PM Abin Sapkota notifications@github.com
wrote:

Hello

I have been trying to get this to work for weeks without success. I have a
rooted Wink Hub. I have followed the instructions and mqtt service is
running but I am not seeing any mqtt messages, The log only has the
following:

DB changed from /var/lib/database/apron.db to /tmp/database/apron-2.db
Aborted

Any help is greatly appreciated. Thanks


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#13, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEs5GDVeBbjDksK93xoQA0SISLtvgXnBks5q0pwbgaJpZM4KYGH3
.

@asapkota
Copy link
Author

aprontest shows list of zwave devices. I recently added a device using
aprontest -a successfully as well.

MQTT broker is setup correctly on my HASS box. I can use a MQTT client to
test publish/subscribe.

Thanks

On Oct 16, 2016 18:04, "Dan Olson" notifications@github.com wrote:

What's your aprontest -l say?

You have a Mqtt broker and the up is set correctly?

On Sun, Oct 16, 2016 at 5:50 PM Abin Sapkota notifications@github.com
wrote:

Hello

I have been trying to get this to work for weeks without success. I have
a
rooted Wink Hub. I have followed the instructions and mqtt service is
running but I am not seeing any mqtt messages, The log only has the
following:

DB changed from /var/lib/database/apron.db to /tmp/database/apron-2.db
Aborted

Any help is greatly appreciated. Thanks


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#13, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/
AEs5GDVeBbjDksK93xoQA0SISLtvgXnBks5q0pwbgaJpZM4KYGH3>
.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFPiQ7MRE_QhyqhpgLsiK-5TDekwLVJ9ks5q0p9TgaJpZM4KYGH3
.

@asapkota
Copy link
Author

when i run the this command from the shell I get the same issue

/usr/bin/node --max_old_space_size=5 --max-stack-size=5 --max_executable_size=5 /opt/wink-mqtt/wink-mqtt.js

Aborted

@danielolson13
Copy link
Owner

Maybe you're missing some dependancies can you do an ls on the node-modules
dir
On Sun, Oct 16, 2016 at 7:30 PM Abin Sapkota notifications@github.com
wrote:

when i run the this command from the shell I get the same issue

/usr/bin/node --max_old_space_size=5 --max-stack-size=5
--max_executable_size=5 /opt/wink-mqtt/wink-mqtt.js

Aborted


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEs5GOgdbO4KJS2DwhVhfynB0maQSX-Tks5q0rOAgaJpZM4KYGH3
.

@asapkota
Copy link
Author

How would I do that on the Wink Hub?

Also here is the log from the Mosquitto broker. .253 is my Wink Hub. I see it connecting to the broker

@asapkota
Copy link
Author

I did a npm ls on the original box where I did the npm install and here is what I get. looks like all dependencies are met.

dependencies.txt

@causalloop
Copy link

Any word on support for the latest (as of this comment) wink version: 3.3.26? I tried running the command a few posts back but I don't get aborted, it just sits there. The logs look like the memory is getting eaten up pretty good.

Inittab changed a bit as well, changing the rooting instructions a bit - if you were starting from scratch I guess. They added this line:

# Put a getty on the serial port #::respawn:/root/platform/spawnTerminal.sh # GENERIC_SERIAL <-- I commented this out ttyAM0::respawn:/sbin/getty -L ttyAM0 115200 vt100 <-- and added this

I can upload some of the files if needed.

@asapkota
Copy link
Author

@causalloop how did you upgrade your rooted Wink? I have been trying to
update for a few days and it keeps failing saying MD5 mismatch.


Abin Sapkota
P: 617-500-5775

On Thu, Nov 17, 2016 at 1:11 AM, causalloop notifications@github.com
wrote:

Any word on support for the latest (as of this comment) wink version:
3.3.26? I tried running the command a few posts back but I don't get
aborted, it just sits there. The logs look like the memory is getting eaten
up pretty good.

Inittab changed a bit as well, changing the rooting instructions a bit -
if you were starting from scratch I guess. They added this line:

Put a getty on the serial port

#::respawn:/root/platform/spawnTerminal.sh # GENERIC_SERIAL <-- I
commented this out
ttyAM0::respawn:/sbin/getty -L ttyAM0 115200 vt100 <-- and added this

I can upload some of the files if needed.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFPiQ5HZuHe1wsaTugyK5cPJFmyjSX31ks5q-_AMgaJpZM4KYGH3
.

@danielolson13
Copy link
Owner

I haven't updated to 3.3.26 yet. Last last update I followed some
instructions on Reddit. May be a good idea to update the root password to
something you know. I think the ssh keys get wiped on update.
On Thu, Nov 17, 2016 at 8:25 AM Abin Sapkota notifications@github.com
wrote:

@causalloop how did you upgrade your rooted Wink? I have been trying to
update for a few days and it keeps failing saying MD5 mismatch.


Abin Sapkota
P: 617-500-5775

On Thu, Nov 17, 2016 at 1:11 AM, causalloop notifications@github.com
wrote:

Any word on support for the latest (as of this comment) wink version:
3.3.26? I tried running the command a few posts back but I don't get
aborted, it just sits there. The logs look like the memory is getting
eaten
up pretty good.

Inittab changed a bit as well, changing the rooting instructions a bit -
if you were starting from scratch I guess. They added this line:

Put a getty on the serial port

#::respawn:/root/platform/spawnTerminal.sh # GENERIC_SERIAL <-- I
commented this out
ttyAM0::respawn:/sbin/getty -L ttyAM0 115200 vt100 <-- and added this

I can upload some of the files if needed.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
#13 (comment)
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFPiQ5HZuHe1wsaTugyK5cPJFmyjSX31ks5q-_AMgaJpZM4KYGH3

.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEs5GPHRNd9fjpkc0aZubyJOEbNYcYq9ks5q_FXZgaJpZM4KYGH3
.

@causalloop
Copy link

@asapkota Heh, I kinda beat my head against that one too. I was following some threads on rootwink.com back and forth and finally I just sorta said screw it and plugged in an MD5 hash that someone had posted for a different version, which obviously didn't work.. but it DID spit out the value it was expecting :)

Basically it said this (I cut out all the irrelevant stuff):
md5 non-match... download: 3e3b2229c4cf28513f61e33ac4d642de manifest: 346046b0ce311d3b6342fdf033261594 END Upgrade failed...
The one I used - 'download' was for 2.66 (I was on 2.49 at the time). I ran it again using the 'manifest' hash and viola! Well, 'viola, one thing down..' :-P

Worth noting, I have a banana pi hooked up to it via the UART and had done the nand trick to get in.... a year ago? I'd since migrated to a smartthings hub but kept the wink hub to use with the couple of lutron things I had and used I hack someone came up with (I think it was 'smartwink' or something - either way it isn't compatible with the new version. might not be with 2.66 either, I sort of skipped over it). It was nice when it worked, but I was always having problems if (god forbid) someone hit the actual on switch for the lights (it wouldn't register the event - which I suspect was a pairing problem with the pico remote and plug in dimmer I'm using, but I was never motivated enough to fix it).

Anyway, if you can get your API key (which is a stupid long process of Wink doing......something?... then out of the blue 3-4 months an email shows up after forgetting about it with the key..) you can plug it into the config for Home Assistant and they'll talk (I think you can do without it, but you have to put your username/pass into the config which I think would require you to repeat the process?) - though its via the 'cloud', which is better than nothing, but if I can get this going.. I may switch to using either the wink hub or ST hub (or both) as 'connectors' for local control of devices and handle stuff from HA.

I digress - anyway, I think the hash was finally what got it going. I'd stored ssh keys both in the update partition and the normal one as well as the serial connection - which stops letting you access it (though you can watch it spit out logging info) during the upgrade part supporting @danielolson13 's point about things getting wiped. I just made sure that every time I rebooted, there was a password stored and keys stored. That said, I haven't seen any evidence that the nand hack wouldn't work on 3.3.26 - though I can't verify that (YMMV).

Here's one of the pages I was using (it links to the other pages I followed). (I'm variable on that board) It's mostly about getting to 2.66 (as of this) but it more or less works :-P
http://www.rootwink.com/viewtopic.php?f=14&t=236

Also worth noting - at some point you have to set the 'DO-UPDATE' (or upgrade or somethig) to 1 instead of 0. I think I might have also per some instruction commented out something about actually doing the update, possibly as a result of the 'smartwink' stuff I'd put in which I'm pretty sure made things more complicated cause I lost some symlinks... (oops.. backup backup backup :-P) Its handy to do a 'find' and have it do like, (I don't recall the exact syntax) 'find . >> allthethings.txt' just so I have a list of ALL the files. I'm sure if I'd put the effort into it I could have gotten it to display the symlinks properly and avoided some headaches, but better than not etc. I also backed up the conents of the partitions so I could compare what files said what before the upgrade since (from my research at the time) mounting the images for those is not... practical - something to do with the chip I think... I'm not sure, it gave me a headache lol

Anyhoot - if you want a dump of any of the files, let me know, I can stick em on pastebin or something.. not sure if that violates some .

HTH

@causalloop
Copy link

Oh, one other thing, the aprondb file.. I think it moves. I was looking at the log and noticed it had at one point put it in the /tmp folder. It's also getting a number that doesn't seem to be following a pattern - aprondb-1, aprondb-4 or something. I literally have 2 devices connected to the wink hub right now lol

@asapkota
Copy link
Author

Thanks for the info.

I have the API key and am using HA. I am trying to get my Thermostat to
work now that it is supported on HA. I think the Wink hub needs the 3.3.26
firmware for that.

I wasn't able to get wink-mqtt to work or local-control so at this point I
am not worried if I lose root.

Thanks


Abin Sapkota
P: 617-500-5775

On Thu, Nov 17, 2016 at 10:34 AM, causalloop notifications@github.com
wrote:

Oh, one other thing, the aprondb file.. I think it moves. I was looking at
the log and noticed it had at one point put it in the /tmp folder. It's
also getting a number that doesn't seem to be following a pattern -
aprondb-1, aprondb-4 or something. I literally have 2 devices connected to
the wink hub right now lol


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFPiQ3cHsE6vAdEQ97usleCqOKishLgFks5q_HQdgaJpZM4KYGH3
.

@causalloop
Copy link

I can't speak to the Thermostat, but I feel like the MQTT could work. I don't think they've changed anything to actively prevent it, I'm sure the subset of people who've gone through the trouble of rooting their hubs isn't enough of a concern (vs Apple and the iPhone). I will say, that once I got MQTT working on my Smartthings hub I was impressed how fast it was. The whole 'local control' thing is a very grey area... On the ST hub, there's 'local control'.. if you're hitting on/off switches and using the out-of-box device handlers and the 1 smartapp, but the rest of its in the cloud. If you're not familiar with ST, you can add little smart apps (sort of akin to the robots, but specialized). I've been using one caled CoRE which is basically a If/Then/Else engine (complicated but VERY powerful).. but at the end of the day, Wink or ST, the processing power is limited (maybe why the robots have never been particularly sophisticated or offer a more... 'advanced' mode). My point being that being able to offload 'rules' to something who's purpose in life is to handle rules would drastically increase the responsiveness of the hubs. My gripe with HA - granted I've just started playing with it - is it doesn't appear to automatically populate with devices over MQTT, which I guess isn't surprising all things considered, though using the built in Wink integration, it found everything lickity split, same with my Hue hub. Though, if you have both, I recommend not linking the Hue to Wink if you're using HA as (at least for me) I ended up with duplicates and couldn't tell which was directly from the Hue and which was showing up through Wink.

Anyhoot... Sorry for the long winded, rambly responses - I need to work on that :-)

@asapkota
Copy link
Author

thanks. I had forgotten about the API request and out of the blue I got and
email with my credentials from Wink a few days ago. I had already given up
on Wink and bought a ST hub but I will give it another shot.

I just upgraded Wink to 3.3.26 but forgot to update the keys so cannot SSH
into it anymore, Ugh.


Abin Sapkota
P: 617-500-5775

On Thu, Nov 17, 2016 at 11:21 AM, causalloop notifications@github.com
wrote:

I can't speak to the Thermostat, but I feel like the MQTT could work. I
don't think they've changed anything to actively prevent it, I'm sure the
subset of people who've gone through the trouble of rooting their hubs
isn't enough of a concern (vs Apple and the iPhone). I will say, that once
I got MQTT working on my Smartthings hub I was impressed how fast it was.
The whole 'local control' thing is a very grey area... On the ST hub,
there's 'local control'.. if you're hitting on/off switches and using the
out-of-box device handlers and the 1 smartapp, but the rest of its in the
cloud. If you're not familiar with ST, you can add little smart apps (sort
of akin to the robots, but specialized). I've been using one caled CoRE
which is basically a If/Then/Else engine (complicated but VERY powerful)..
but at the end of the day, Wink or ST, the processing power is limited
(maybe why the robots have never been particularly sophisticated or offer a
more... 'advanced' mode). My point being that being able to offload 'rules'
to something who's purpose in life is to handle rules would drastically
increase the responsiveness of the hubs. My gripe with HA - granted I've
just started playing with it - is it doesn't appear to automatically
populate with devices over MQTT, which I guess isn't surprising all things
considered, though using the built in Wink integration, it found everything
lickity split, same with my Hue hub. Though, if you have both, I recommend
not linking the Hue to Wink if you're using HA as (at least for me) I ended
up with duplicates and couldn't tell which was directly from the Hue and
which was showing up through Wink.

Anyhoot... Sorry for the long winded, rambly responses - I need to work on
that :-)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFPiQ59860V7pEWfO03Z4LzlUH4-Tqiuks5q_H8GgaJpZM4KYGH3
.

@causalloop
Copy link

Well, I think you could still use the nand hack and solder pins on for the UART and use the FTDI/USB adapter. I'd have to look to see what the process was for it all, but I think you basically prevented it from booting, and it defaults tooooo.... uboot? Sort of a command line version of a bios, but you can mount the partitions and edit as needed if I recall. Though I have to admit, the nand thing always made me nervous.. I should have soldered a button in line so I didn't have to worry about shorting the wrong thing (my hands are shaky enough when it come to precision work..)

You might still be able to SSH into it if you clear out your 'known hosts'/'authorized keys' (can never keep track of which is which) - assuming the password hasn't changed.. I feel like that worked on at least the ~2.49 version, though it wouldn't let me do that from a different machine that didn't have the right keys, so you may be stuck (unless you want to do the nand thing). It doesn't help that they used dropbear (which I'm sure has its merits) and the key/pair process is a bit more complicated..

@causalloop
Copy link

Just fyi, its still root-able. Might need to start from scratch - and (sorry I don't recall which line off hand) I think one of the lines that gets added to one of the boot/tty settings in the instructions isn't valid anymore and causes something weird if I remember.. I'm at 3.44 now and got ssh working (if you've got the UART still going, you can interrupt the boot process and it would seem to have the same effect as the nand hack did). I haven't gotten the normal UART working again (aside from when I interrupt boot), but I haven't been sufficiently motivated to fix it either - though I'm pretty sure the original instructions on... winkroot.. rootwink.. whatever it is - should still work for that.

As for the WH2... last I heard, I think the DB is now encrypted, but I don't know if thats necessarily a showstopper if you can still run aprontest (don't know if that works either - I don't have one). I haven't heard anything else as of this post (from the root-ing site).

HTH

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

3 participants